[ELDK] File Size limited to 2GB

Wolfgang Denk wd at denx.de
Tue Oct 20 22:39:32 CEST 2009

Dear Jonathan Haws,

In message <BB99A6BA28709744BF22A68E6D7EB51F03251FE8B1 at midas.usurf.usu.edu> you wrote:
> I am writing some code that needs to write files that are larger than 
> 2 GB.  My file system on my disk is EXT2, so I know it supports larger 
> files than that, however when I hit a 2 GB file size, I get errors 
> trying to write a file.
> I have tried including the flag O_LARGEFILE, however that is not 
> defined for a 32-bit system.  I checked the system limits with ulimit 
> -a and it says I have an unlimited file size (in blocks).  I believe 
> the limit is also inherent in older versions of GLibc, but I am 
> running 2.6.
> Any ideas?  What flag in the kernel am I missing?  Or is it something 
> in how my drive if formatted?  Any kind of help would be appreciated.

You may want to read the libc documentation, especially section
"1.3.4 Feature Test Macros" and the related documentation about the

Best regards,

Wolfgang Denk

DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Brain: an apparatus with which we think we think.    - Ambrose Bierce

More information about the eldk mailing list