Fwd: Is there file reading max size limitation using ms-dos file system ?

Thomas Kim thomas73.kim at gmail.com
Mon Jan 12 10:01:45 UTC 2015


I am sorry for mistyping.
correct example for case 2 is below;

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, 0x800000, fp_in)); // 8MB reading
free(buffer);
fclose(fp_in);

Best Regards,
Thomas Kim

---------- Forwarded message ----------
From: Thomas Kim <thomas73.kim at gmail.com>
Date: 2015-01-12 18:59 GMT+09:00
Subject: Is there file reading max size limitation using ms-dos file system
?
To: "users at rtems.org" <users at rtems.org>


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/8a0ced5b/attachment-0002.html>


More information about the users mailing list