회신: fopen file size error when file size is over around 6MB

김찬 ckim at etri.re.kr
Tue Sep 8 06:26:07 UTC 2015


I'm away from my desk now and I'll try fstat when I get back. Thanks.



내 삼성 디바이스에서 보냈습니다


-------- 원본 메시지 --------
발신: Sebastian Huber <sebastian.huber at embedded-brains.de>
날짜: 2015/09/08 오후 2:42 (GMT+09:00)
수신: users at rtems.org
제목: Re: fopen file size error when file size is over around 6MB

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.

_______________________________________________
users mailing list
users at rtems.org
http://lists.rtems.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150908/47a3b484/attachment-0002.html>


More information about the users mailing list