diff options
Diffstat (limited to 'df.c')
-rw-r--r-- | df.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -42,7 +42,7 @@ static int df(char *device, const char *mountPoint) | |||
42 | 42 | ||
43 | if (statfs(mountPoint, &s) != 0) { | 43 | if (statfs(mountPoint, &s) != 0) { |
44 | perror(mountPoint); | 44 | perror(mountPoint); |
45 | return 1; | 45 | return FALSE; |
46 | } | 46 | } |
47 | 47 | ||
48 | if (s.f_blocks > 0) { | 48 | if (s.f_blocks > 0) { |
@@ -64,7 +64,7 @@ static int df(char *device, const char *mountPoint) | |||
64 | 64 | ||
65 | } | 65 | } |
66 | 66 | ||
67 | return 0; | 67 | return TRUE; |
68 | } | 68 | } |
69 | 69 | ||
70 | extern int df_main(int argc, char **argv) | 70 | extern int df_main(int argc, char **argv) |
@@ -83,15 +83,15 @@ extern int df_main(int argc, char **argv) | |||
83 | if ((mountEntry = findMountPoint(argv[1], mtab_file)) == | 83 | if ((mountEntry = findMountPoint(argv[1], mtab_file)) == |
84 | 0) { | 84 | 0) { |
85 | fprintf(stderr, "%s: can't find mount point.\n", argv[1]); | 85 | fprintf(stderr, "%s: can't find mount point.\n", argv[1]); |
86 | return 1; | 86 | exit( FALSE); |
87 | } | 87 | } |
88 | status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | 88 | status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); |
89 | if (status != 0) | 89 | if (status != 0) |
90 | return status; | 90 | exit( status); |
91 | argc--; | 91 | argc--; |
92 | argv++; | 92 | argv++; |
93 | } | 93 | } |
94 | return 0; | 94 | exit( TRUE); |
95 | } else { | 95 | } else { |
96 | FILE *mountTable; | 96 | FILE *mountTable; |
97 | struct mntent *mountEntry; | 97 | struct mntent *mountEntry; |
@@ -105,10 +105,10 @@ extern int df_main(int argc, char **argv) | |||
105 | while ((mountEntry = getmntent(mountTable))) { | 105 | while ((mountEntry = getmntent(mountTable))) { |
106 | int status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); | 106 | int status = df(mountEntry->mnt_fsname, mountEntry->mnt_dir); |
107 | if (status) | 107 | if (status) |
108 | return status; | 108 | exit( status); |
109 | } | 109 | } |
110 | endmntent(mountTable); | 110 | endmntent(mountTable); |
111 | } | 111 | } |
112 | 112 | ||
113 | return 0; | 113 | exit( TRUE); |
114 | } | 114 | } |