diff options
author | Matt Kraai | 2001-12-20 23:13:26 +0000 |
---|---|---|
committer | Matt Kraai | 2001-12-20 23:13:26 +0000 |
commit | 1f0c43668ac332cbcf61cbdf71844799327cc8b9 (patch) | |
tree | 97414e991363fa613f229019d697280cae1097e0 /util-linux/umount.c | |
parent | 31c73af656813b5cadcb1dd27adb9bbc62a98987 (diff) | |
download | busybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.zip busybox-1f0c43668ac332cbcf61cbdf71844799327cc8b9.tar.gz |
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 99db308..29e2e3b 100644 --- a/util-linux/umount.c +++ b/util-linux/umount.c @@ -179,19 +179,19 @@ static int do_umount(const char *name) status = umount(name); #if defined CONFIG_FEATURE_MOUNT_LOOP - if (freeLoop == TRUE && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9)) + if (freeLoop && blockDevice != NULL && !strncmp("/dev/loop", blockDevice, 9)) /* this was a loop device, delete it */ del_loop(blockDevice); #endif #if defined CONFIG_FEATURE_MOUNT_FORCE - if (status != 0 && doForce == TRUE) { + if (status != 0 && doForce) { status = umount2(blockDevice, MNT_FORCE); if (status != 0) { error_msg_and_die("forced umount of %s failed!", blockDevice); } } #endif - if (status != 0 && doRemount == TRUE && errno == EBUSY) { + if (status != 0 && doRemount && errno == EBUSY) { status = mount(blockDevice, name, NULL, MS_MGC_VAL | MS_REMOUNT | MS_RDONLY, NULL); if (status == 0) { @@ -202,7 +202,7 @@ static int do_umount(const char *name) } if (status == 0) { #if defined CONFIG_FEATURE_MTAB_SUPPORT - if (useMtab == TRUE) + if (useMtab) erase_mtab(name); #endif return (TRUE); @@ -282,15 +282,15 @@ extern int umount_main(int argc, char **argv) } mtab_read(); - if (umountAll == TRUE) { - if (umount_all() == TRUE) + if (umountAll) { + if (umount_all()) return EXIT_SUCCESS; else return EXIT_FAILURE; } if (realpath(*argv, path) == NULL) perror_msg_and_die("%s", path); - if (do_umount(path) == TRUE) + if (do_umount(path)) return EXIT_SUCCESS; perror_msg_and_die("%s", *argv); } |