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.