swapoff: dont pass "p" in opt_complementary

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2011-08-13 23:36:36 +02:00
parent c97578de6b
commit c21c310e46

View File

@ -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