summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util-linux/swaponoff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 43ddb40..e53e24c 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