On Wed, 31 Mar 2004 10:08:09 +0200 (MEST), Eric Auer wrote:

The 2 GB or maybe 4 GB limit is because something must accidentally use 32bit ints instead of long long int

Right! The erropr happens at line 293 of boot.c (loff_t is 64-bit long long, off_t is 32-bit):


fs_test((loff_t) ((total_sectors & ~1)-1) * (loff_t)logical_sector_size, logical_sector_size);

int fs_test(loff_t pos,size_t size) in io.c calls llseek(fd,pos,0) which fails to return pos.
loff_t llseek(int fd, loff_t offset, int whence) in io.c just returns VolumeSeek(offset).
off_t VolumeSeek(off_t offset) in volume.c sets loff_t VolumePointer to offset and returns it.


Oops! VolumeSeek() should be loff_t(loff_t offset) instead of off_t VolumeSeek(off_t offset)! But there must be yet another bug, because when I changed it, the bug was still there, although the code generated for VolumeSeek() became correct. Will try to catch the other bug tomorrow.

Lucho


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to