From 6f170b087c83ea252fc3aff6f5ecafe0ec721fba Mon Sep 17 00:00:00 2001 From: andersen Date: Thu, 4 Nov 1999 21:18:07 +0000 Subject: More stuff. git-svn-id: svn://busybox.net/trunk/busybox@74 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- df.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'df.c') diff --git a/df.c b/df.c index f8a953f7d..94b6b8231 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); } -- cgit v1.2.3-55-g6feb