fopen file size error when file size is over around 6MB
Sebastian Huber
sebastian.huber at embedded-brains.de
Tue Sep 8 05:41:45 UTC 2015
Which information do you get via fstat()?
On 08/09/15 06:47, Chan Kim wrote:
> Hello, rtems users,
>
> After mounting SD card under /mnt, I can read and write files now. But when the file size is bigger than 5Mbytes, the file size information reads wrong. If it's less than 5Mbytes, read and write is ok.
>
> For example, when the file size is 10MByte,
> fpsrc = fopen("/mnt/dir2/sample10m.dat","r");
> fseek(fpsrc, 0L, SEEK_END);
> size = ftell(fpsrc);
> printk("numbytes = %d\n", size);
> fseek(fpsrc, 0L, SEEK_SET);
> result :
> numbytes = 4194304 <=== this is exactly 4MByte (when the file size is 10MB)
>
> Is there something I should set for IMFS configuration?
> I see (#define MSDOS_MAX_FILE_SIZE 0xFFFFFFFF) in msdos.h.
>
> Thanks,
>
> Chan
> _______________________________________________
> users mailing list
> users at rtems.org
> http://lists.rtems.org/mailman/listinfo/users
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list