cris: remove call to HIDDEN_JUMPTARGET
[uclibc-ng.git] / test / misc / tst-statfs.c
blobb8b4229ba541e87881d786c0ed6aa77809887465
1 #include <sys/vfs.h>
2 #include <errno.h>
3 #include <stdio.h>
4 #include <stdlib.h>
5 #include <string.h>
7 int
8 main(int argc, char* argv[])
10 struct statfs s;
11 int ret = 0, i;
13 for (i = 1; i < argc; i++) {
14 if (statfs(argv[i], &s) != 0) {
15 fprintf(stderr, "%s: %s: statfs failed. %s\n",
16 *argv, argv[i], strerror(errno));
17 exit(EXIT_FAILURE);
19 ++ret;
20 printf("statfs %s:\n\tblocks=%lld\n\tblkfree=%lld\n\tbsize=%d\n",
21 argv[i], s.f_blocks, s.f_bfree, s.f_bsize);
22 #ifdef _STATFS_F_FRSIZE
23 printf("\tfrsize=%lld\n", s.f_frsize);
24 #elif defined __mips__
25 printf("\tfrsize=mips, unsupported?\n");
26 #else
27 # error no _STATFS_F_FRSIZE
28 #endif
30 exit(ret ? EXIT_SUCCESS : EXIT_FAILURE);