From: Tito Ragusa Date: Tue, 1 Apr 2014 07:51:27 +0000 (+0200) Subject: swapon/swapoff: -a returns 0 on ignored errors X-Git-Tag: 1_23_0~141 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c9a67133d6a947532b560c7f2b9391ec299dd97f;p=oweals%2Fbusybox.git swapon/swapoff: -a returns 0 on ignored errors Signed-off-by: Tito Ragusa Signed-off-by: Denys Vlasenko --- diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index acdb67729..75487267b 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;