diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 1999-11-04 21:18:07 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 1999-11-04 21:18:07 +0000 |
commit | 6f170b087c83ea252fc3aff6f5ecafe0ec721fba (patch) | |
tree | 9fa93d2acf052107f2b682ce2e77725eb7ec9d84 /df.c | |
parent | bef8b2f54d6b9421ae78bcba433832ba16d5b76f (diff) | |
download | busybox-w32-6f170b087c83ea252fc3aff6f5ecafe0ec721fba.tar.gz busybox-w32-6f170b087c83ea252fc3aff6f5ecafe0ec721fba.tar.bz2 busybox-w32-6f170b087c83ea252fc3aff6f5ecafe0ec721fba.zip |
More stuff.
git-svn-id: svn://busybox.net/trunk/busybox@74 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'df.c')
-rw-r--r-- | df.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -31,6 +31,7 @@ | |||
31 | static const char df_usage[] = "df [filesystem ...]\n" | 31 | static const char df_usage[] = "df [filesystem ...]\n" |
32 | "\n" "\tPrint the filesystem space used and space available.\n"; | 32 | "\n" "\tPrint the filesystem space used and space available.\n"; |
33 | 33 | ||
34 | extern const char mtab_file[]; /* Defined in utility.c */ | ||
34 | 35 | ||
35 | static int df(char *device, const char *mountPoint) | 36 | static int df(char *device, const char *mountPoint) |
36 | { | 37 | { |
@@ -113,7 +114,7 @@ extern int df_main(int argc, char **argv) | |||
113 | int status; | 114 | int status; |
114 | 115 | ||
115 | while (argc > 1) { | 116 | while (argc > 1) { |
116 | if ((mountEntry = findMountPoint(argv[1], "/proc/mounts")) == | 117 | if ((mountEntry = findMountPoint(argv[1], mtab_file)) == |
117 | 0) { | 118 | 0) { |
118 | fprintf(stderr, "%s: can't find mount point.\n", argv[1]); | 119 | fprintf(stderr, "%s: can't find mount point.\n", argv[1]); |
119 | return 1; | 120 | return 1; |
@@ -129,9 +130,9 @@ extern int df_main(int argc, char **argv) | |||
129 | FILE *mountTable; | 130 | FILE *mountTable; |
130 | struct mntent *mountEntry; | 131 | struct mntent *mountEntry; |
131 | 132 | ||
132 | mountTable = setmntent("/proc/mounts", "r"); | 133 | mountTable = setmntent(mtab_file, "r"); |
133 | if (mountTable == 0) { | 134 | if (mountTable == 0) { |
134 | perror("/proc/mounts"); | 135 | perror(mtab_file); |
135 | exit(FALSE); | 136 | exit(FALSE); |
136 | } | 137 | } |
137 | 138 | ||