summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorTito Ragusa2014-04-01 09:51:27 +0200
committerDenys Vlasenko2014-04-01 09:51:27 +0200
commitc9a67133d6a947532b560c7f2b9391ec299dd97f (patch)
tree429766020254f7c5fa4468c86514fd5a8529bf90 /util-linux
parenta3f326cd6619cadb44cb4bb051b1d4e54bcd3477 (diff)
downloadbusybox-c9a67133d6a947532b560c7f2b9391ec299dd97f.zip
busybox-c9a67133d6a947532b560c7f2b9391ec299dd97f.tar.gz
swapon/swapoff: -a returns 0 on ignored errors
Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/swaponoff.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index acdb677..7548726 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -116,9 +116,8 @@ static int swap_enable_disable(char *device)
}
}
- if (err) {
- if (!quiet)
- bb_simple_perror_msg(device);
+ if (err && !quiet) {
+ bb_simple_perror_msg(device);
return 1;
}
return 0;