Is there file reading max size limitation using ms-dos file system ?
Thomas Kim
thomas73.kim at gmail.com
Mon Jan 12 09:59:13 UTC 2015
Dear Sir,
I am testing standard File I/O on ms-dos file system.
also, 19MB file(testfile.bin) is included on 32MB ms-dos file storage.
There is two example for testing fread().
Case 1: Normal
FILE * fp_in;
void *buffer;
fp_in = fopen("/mnt/file/testfile.bin", "rb");
buffer = malloc(0x800000); // 8MB
printf("4MB size:%d\n", fread(buffer, 1, 0x400000, fp_in)); // 4MB reading
free(buffer);
fclose(fp_in);
Case 2: Abnormal
FILE * fp_in;
void *buffer;
fp_in = fopen("/mnt/file/testfile.bin", "rb");
buffer = malloc(0x800000); // 8MB
printf("8MB size:%d\n", fread(buffer, 1, 0x200000, fp_in)); // 8MB reading
free(buffer);
fclose(fp_in);
Output of case 1 : 4MB size:4194304 ==> OK
Output of case 2 : 8MB size:6590976 ==> FAIL (Wanted value = 8388608)
I guess that fread() function have a limitation for reading file reading
size.
Please let me know how to increase max file size using fread() function.
Best Regards,
Thomas Kim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150112/64e5a34f/attachment-0001.html>
More information about the users
mailing list