[Aboriginal] uClibc-0.9.33.2 statfs() does not populate the `f_frsize' field of `struct statfs'

Rajeev V. Pillai rajeev_v_pillai at yahoo.com
Wed Dec 26 16:53:51 PST 2012


This bug has already been reported to the uClibc Bugzilla system.

On uClibc-0.9.33.2, statfs() does not populate the `f_frsize' field of `struct
statfs' even though it defines _STATFS_F_FRSIZE.

/* BEGIN test code */

#define _FILE_OFFSET_BITS 64

#include <sys/vfs.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int
main(int argc, char* argv[])
{
struct statfs s;
int i;

for (i = 1; i < argc; i++) {
if (statfs(argv[i], &s) != 0) {
fprintf(stderr, "%s: %s: statfs failed. %s\n",
*argv, argv[i], strerror(errno));
exit(EXIT_FAILURE);
}
printf("%s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n",
argv[i], s.f_blocks, s.f_bfree, s.f_bsize);
#ifdef _STATFS_F_FRSIZE
printf("\tfrsize=%d\n", s.f_frsize);     /* RANDOM values printed */
#endif
}
exit(EXIT_SUCCESS);
}

/* END test code */




More information about the Aboriginal mailing list