summaryrefslogtreecommitdiff
path: root/df.c
diff options
context:
space:
mode:
authorEric Andersen1999-11-04 21:18:07 +0000
committerEric Andersen1999-11-04 21:18:07 +0000
commitd0246fb72b40320a74376af1bb944fef2c9b734f (patch)
tree9fa93d2acf052107f2b682ce2e77725eb7ec9d84 /df.c
parent3ae0c789627a29dbd76793eb666efe19144b30f0 (diff)
downloadbusybox-d0246fb72b40320a74376af1bb944fef2c9b734f.zip
busybox-d0246fb72b40320a74376af1bb944fef2c9b734f.tar.gz
More stuff.
Diffstat (limited to 'df.c')
-rw-r--r--df.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/df.c b/df.c
index f8a953f..94b6b82 100644
--- a/df.c
+++ b/df.c
@@ -31,6 +31,7 @@
static const char df_usage[] = "df [filesystem ...]\n"
"\n" "\tPrint the filesystem space used and space available.\n";
+extern const char mtab_file[]; /* Defined in utility.c */
static int df(char *device, const char *mountPoint)
{
@@ -113,7 +114,7 @@ extern int df_main(int argc, char **argv)
int status;
while (argc > 1) {
- if ((mountEntry = findMountPoint(argv[1], "/proc/mounts")) ==
+ if ((mountEntry = findMountPoint(argv[1], mtab_file)) ==
0) {
fprintf(stderr, "%s: can't find mount point.\n", argv[1]);
return 1;
@@ -129,9 +130,9 @@ extern int df_main(int argc, char **argv)
FILE *mountTable;
struct mntent *mountEntry;
- mountTable = setmntent("/proc/mounts", "r");
+ mountTable = setmntent(mtab_file, "r");
if (mountTable == 0) {
- perror("/proc/mounts");
+ perror(mtab_file);
exit(FALSE);
}