summaryrefslogtreecommitdiff
path: root/util-linux/switch_root.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/switch_root.c')
-rw-r--r--util-linux/switch_root.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index 3270893..fb6057a 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -97,9 +97,8 @@ int switch_root_main(int argc UNUSED_PARAM, char **argv)
struct statfs stfs;
dev_t rootdev;
- // Parse args (-c console)
- opt_complementary = "-2"; // minimum 2 params
- getopt32(argv, "+c:", &console); // '+': stop at first non-option
+ // Parse args (-c console). '+': stop at first non-option
+ getopt32(argv, "^+" "c:" "\0" "-2" /* minimum 2 args */, &console);
argv += optind;
newroot = *argv++;