[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter i
From: |
Mark Langsdorf |
Subject: |
Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys |
Date: |
Thu, 08 Mar 2012 12:13:04 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2 |
On 03/08/2012 11:56 AM, Eric Blake wrote:
> On 03/08/2012 09:59 AM, Mark Langsdorf wrote:
>> Allow load_image_targphys to load files on systems with more than 2G of
>> emulated memory by changing the max_sz parameter from an int to an
>> unsigned long.
>
> unsigned long is still 32-bits on a 32-bit host. You probably want to
> be using off_t.
I know that unsigned long is 32-bits. The issue is more that
comparing 0xf000_0000 > 0x1000_0000 returns FALSE if both values
are compared as signed ints, the way the current code does.
Strict correctness would be for max_sz to be of type size_t, and I
can change it to that if people would prefer, but unsigned long is
clear enough in this instance.
--Mark Langsdorf
Calxeda, Inc.
- [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Mark Langsdorf, 2012/03/08
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Eric Blake, 2012/03/08
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys,
Mark Langsdorf <=
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Markus Armbruster, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Mark Langsdorf, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Alexander Graf, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Mark Langsdorf, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Alexander Graf, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Peter Maydell, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Andreas Färber, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Peter Maydell, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Andreas Färber, 2012/03/09
- Re: [Qemu-devel] [PATCH] use an unsigned long for the max_sz parameter in load_image_targphys, Alexander Graf, 2012/03/09