aboutsummaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/switch_root.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index 700f7997e..bd1e9d5ce 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -73,8 +73,8 @@ int switch_root_main(int argc, char **argv)
// Parse args (-c console)
- opt_complementary = "-2";
- getopt32(argv, "c:", &console);
+ opt_complementary = "-2"; // minimum 2 params
+ getopt32(argv, "+c:", &console); // '+': stop parsing at first non-option
argv += optind;
// Change to new root directory and verify it's a different fs.