diff options
author | Matt Kraai <kraai@debian.org> | 2001-12-20 23:13:26 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-12-20 23:13:26 +0000 |
commit | 1f0c43668ac332cbcf61cbdf71844799327cc8b9 (patch) | |
tree | 97414e991363fa613f229019d697280cae1097e0 /util-linux/umount.c | |
parent | 31c73af656813b5cadcb1dd27adb9bbc62a98987 (diff) | |
download | busybox-w32-1f0c43668ac332cbcf61cbdf71844799327cc8b9.tar.gz busybox-w32-1f0c43668ac332cbcf61cbdf71844799327cc8b9.tar.bz2 busybox-w32-1f0c43668ac332cbcf61cbdf71844799327cc8b9.zip |
Remove `== TRUE' tests and convert `!= TRUE' and `== FALSE' tests to use !.
Diffstat (limited to 'util-linux/umount.c')
-rw-r--r-- | util-linux/umount.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/util-linux/umount.c b/util-linux/umount.c index 99db3084c..29e2e3b66 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c | |||
@@ -179,19 +179,19 @@ static int do_umount(const char *name) | |||
179 | status = umount(name); | 179 | status = umount(name); |
180 | 180 | ||
181 | #if defined CONFIG_FEATURE_MOUNT_LOOP | 181 | #if defined CONFIG_FEATURE_MOUNT_LOOP |
182 | if (freeLoop == TRUE && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9)) | 182 | if (freeLoop && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9)) |
183 | /* this was a loop device, delete it */ | 183 | /* this was a loop device, delete it */ |
184 | del_loop(blockDevice); | 184 | del_loop(blockDevice); |
185 | #endif | 185 | #endif |
186 | #if defined CONFIG_FEATURE_MOUNT_FORCE | 186 | #if defined CONFIG_FEATURE_MOUNT_FORCE |
187 | if (status != 0 && doForce == TRUE) { | 187 | if (status != 0 && doForce) { |
188 | status = umount2(blockDevice, MNT_FORCE); | 188 | status = umount2(blockDevice, MNT_FORCE); |
189 | if (status != 0) { | 189 | if (status != 0) { |
190 | error_msg_and_die("forced umount of %s failed!", blockDevice); | 190 | error_msg_and_die("forced umount of %s failed!", blockDevice); |
191 | } | 191 | } |
192 | } | 192 | } |
193 | #endif | 193 | #endif |
194 | if (status != 0 && doRemount == TRUE && errno == EBUSY) { | 194 | if (status != 0 && doRemount && errno == EBUSY) { |
195 | status = mount(blockDevice, name, NULL, | 195 | status = mount(blockDevice, name, NULL, |
196 | MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL); | 196 | MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL); |
197 | if (status == 0) { | 197 | if (status == 0) { |
@@ -202,7 +202,7 @@ static int do_umount(const char *name) | |||
202 | } | 202 | } |
203 | if (status == 0) { | 203 | if (status == 0) { |
204 | #if defined CONFIG_FEATURE_MTAB_SUPPORT | 204 | #if defined CONFIG_FEATURE_MTAB_SUPPORT |
205 | if (useMtab == TRUE) | 205 | if (useMtab) |
206 | erase_mtab(name); | 206 | erase_mtab(name); |
207 | #endif | 207 | #endif |
208 | return (TRUE); | 208 | return (TRUE); |
@@ -282,15 +282,15 @@ extern int umount_main(int argc, char **argv) | |||
282 | } | 282 | } |
283 | 283 | ||
284 | mtab_read(); | 284 | mtab_read(); |
285 | if (umountAll == TRUE) { | 285 | if (umountAll) { |
286 | if (umount_all() == TRUE) | 286 | if (umount_all()) |
287 | return EXIT_SUCCESS; | 287 | return EXIT_SUCCESS; |
288 | else | 288 | else |
289 | return EXIT_FAILURE; | 289 | return EXIT_FAILURE; |
290 | } | 290 | } |
291 | if (realpath(*argv, path) == NULL) | 291 | if (realpath(*argv, path) == NULL) |
292 | perror_msg_and_die("%s", path); | 292 | perror_msg_and_die("%s", path); |
293 | if (do_umount(path) == TRUE) | 293 | if (do_umount(path)) |
294 | return EXIT_SUCCESS; | 294 | return EXIT_SUCCESS; |
295 | perror_msg_and_die("%s", *argv); | 295 | perror_msg_and_die("%s", *argv); |
296 | } | 296 | } |