swapoff: dont pass "p" in opt_complementary
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
c97578de6b
commit
c21c310e46
@ -114,7 +114,8 @@ int swap_on_off_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
#if !ENABLE_FEATURE_SWAPON_PRI
|
#if !ENABLE_FEATURE_SWAPON_PRI
|
||||||
ret = getopt32(argv, "a");
|
ret = getopt32(argv, "a");
|
||||||
#else
|
#else
|
||||||
opt_complementary = "p+";
|
if (applet_name[5] == 'n')
|
||||||
|
opt_complementary = "p+";
|
||||||
ret = getopt32(argv, (applet_name[5] == 'n') ? "ap:" : "a", &g_flags);
|
ret = getopt32(argv, (applet_name[5] == 'n') ? "ap:" : "a", &g_flags);
|
||||||
|
|
||||||
if (ret & 2) { // -p
|
if (ret & 2) { // -p
|
||||||
|
Loading…
Reference in New Issue
Block a user