From 6dd03f04ea3292d10ce06feda2f0c8272be0fb83 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 13 Feb 2008 17:25:31 +0000 Subject: switch_root: stop at first non-option. Closes bug 1425. --- util-linux/switch_root.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'util-linux') 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. -- cgit v1.2.3