44 #if defined(STATFS_IN_SYS_MOUNT_H)
45 #include <sys/param.h>
46 #include <sys/mount.h>
47 #elif defined(STATFS_IN_SYS_VFS_H)
49 #elif defined(STATVFS_IN_SYS_STATVFS_H)
50 #include <sys/statvfs.h>
51 #elif defined(STATFS_IN_SYS_STATFS_H)
52 #include <sys/statfs.h>
55 #error "please specify the include file with `struct statfs'"
57 #error "please specify the include file with `struct statvfs'"
70 const char *myname =
"fsspace";
73 #ifdef USE_STRUCT_FS_DATA
76 if (statfs(path, &fsbuf) < 0)
83 if (statfs(path, &fsbuf) < 0)
92 if (statvfs(path, &fsbuf) < 0)
98 msg_info(
"%s: %s: block size %lu, blocks free %lu",
111 int main(
int argc,
char **argv)
116 msg_fatal(
"usage: %s filesystem...", argv[0]);
118 while (--argc && *++argv) {
121 *argv, sp.block_size, sp.block_free);
int main(int argc, char **argv)
VSTREAM * vstream_printf(const char *fmt,...)
NORETURN msg_fatal(const char *fmt,...)
int vstream_fflush(VSTREAM *stream)
void fsspace(const char *path, struct fsspace *sp)
void msg_info(const char *fmt,...)