Hello Justin, Justin Schoeman wrote: > > Eugene Kuznetsov wrote: > > > > Hello Justin, > > [...] > > JS> 2) How do I get my files longer than 4GB? For some reason I cannot seem > > JS> to get it right, even with programs that claim to support long file > > JS> names! As far as I can see, compiling with -D_FILE_OFFSET_BITS=64 > > JS> should do the trick, and it does seem to work, if you "nm" the result, > > JS> you can see it uses open64, rather than open, but all the read/write > > JS> functions remain the same! > > > > It's a bit tricky. You should compile with -DLARGEFILE64_SOURCE, use > > O_LARGEFILE when opening file, and make sure that you've got support > > or large files in both kernel and filesystem ( you need kernel 2.4; > > write to FAT32 partition, because AFAIK ext2 filesystem does not > > support large files ). > > Ah - thanks. I forgot about the fs problem - apparently you must mount > reiserfs partitions with "-o conv" to upgrade 3.5.x disk format to 3.6 > for large files (although you cannot then mount the partition under > Linux 2.2.x again, but why would you want to ;-> ). I have just compiled an application which in turn produced a file with a size of 4.7 GB on an ext2 partition, it seems that is possible to produce such large files also under ext2. I have kernel 2.4.5, what you also need is a new glibc, I have used 2.2. I had to change the application slightly in order to get such a large file, the following way: open(realfname,O_WRONLY|O_CREAT | O_LARGEFILE, 0644); Then I also had to pass a few defines to the compiler (which is a gcc 2.95-2 in my case ;-): -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE Last but not least there's also an article in the net regarding this topic: http://www.suse.de/~aj/linux_lfs.html Ah, 2 more things. I believe the blocksize of my ext2 partition the file was written on is 4 kB/block. And there was also an article in the german i'x 8/2000 where some hints were given. HtH Gerd > > -justin > > _______________________________________________ > Video4linux-list mailing list > Video4linux-list@xxxxxxxxxx > https://listman.redhat.com/mailman/listinfo/video4linux-list