#include <sys/stat.h>
#include <sys/vfs.h>
-static const char df_usage[] = "df [filesystem ...]\n"
-#ifndef BB_FEATURE_TRIVIAL_HELP
- "\nPrint the filesystem space used and space available.\n"
-#endif
- ;
-
extern const char mtab_file[]; /* Defined in utility.c */
static int df(char *device, const char *mountPoint)
}
while (argc > 1) {
if ((mountEntry = findMountPoint(argv[1], mtab_file)) == 0) {
- fprintf(stderr, "%s: can't find mount point.\n", argv[1]);
+ errorMsg("%s: can't find mount point.\n", argv[1]);
exit(FALSE);
}
status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir);
}
while ((mountEntry = getmntent(mountTable))) {
- if (strcmp(mountEntry->mnt_fsname, "none") == 0) {
- continue;
- }
df(mountEntry->mnt_fsname, mountEntry->mnt_dir);
}
endmntent(mountTable);