11 int fd
= open("/bin/sh", O_RDONLY
);
14 if (-1 == statfs("/bin/sh", &fs
)) {
15 perror("statfs failed:");
18 if (-1 == fstatfs(fd
, &fs
)) {
19 perror("statfs failed:");
24 pfs
= malloc(sizeof(struct statfs
));
28 statfs("/bin/sh", pfs
);
29 pfs
= malloc(sizeof(struct statfs
));
33 pfs
= malloc(sizeof(struct statfs
) - 3);
34 statfs("/bin/sh", pfs
);
36 char* badstring
= strdup("/bin/sh");
39 statfs(badstring
, &fs
);