fincs/FeOS — Issue #13: stat::st_size reports wrong size
Author: mtheall
Created: 2011-11-07 04:32:58+00:00
State: open

If I perform stat() on a file, the st_size field contains the wrong filesize. I tested against FeOS-built and devkitARM-built:

struct stat buf;
printf("stat: %d\n", stat("/data/anagram/dict.z", &buf));
printf("size: %d\n", buf.st_size);
fopen("/data/anagram/dict.z", "r");
fseek(fp, 0, SEEK_END);
printf("size: %d\n", ftell(fp));

Output with FeOS app:
stat: 0
size: 65477632
size: 91148

Output with devkitARM app:
stat: 0
size: 91148
size: 91148