From: Denys Vlasenko Date: Sat, 13 Aug 2011 21:36:36 +0000 (+0200) Subject: swapoff: dont pass "p" in opt_complementary X-Git-Tag: 1_20_0~273 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c21c310e4646579d34bb9db25745b1121dc364d5;p=oweals%2Fbusybox.git swapoff: dont pass "p" in opt_complementary Signed-off-by: Denys Vlasenko --- diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c index 43ddb4031..e53e24c71 100644 --- a/util-linux/swaponoff.c +++ b/util-linux/swaponoff.c @@ -114,7 +114,8 @@ int swap_on_off_main(int argc UNUSED_PARAM, char **argv) #if !ENABLE_FEATURE_SWAPON_PRI ret = getopt32(argv, "a"); #else - opt_complementary = "p+"; + if (applet_name[5] == 'n') + opt_complementary = "p+"; ret = getopt32(argv, (applet_name[5] == 'n') ? "ap:" : "a", &g_flags); if (ret & 2) { // -p