diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-13 17:25:31 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-13 17:25:31 +0000 |
commit | 6dd03f04ea3292d10ce06feda2f0c8272be0fb83 (patch) | |
tree | d7fa90ad831980ff9f0283f6b780c0f3879c7c84 /util-linux/switch_root.c | |
parent | 87cf2ee8abec24e6399653e4856ab3543e7aadf7 (diff) | |
download | busybox-w32-6dd03f04ea3292d10ce06feda2f0c8272be0fb83.tar.gz busybox-w32-6dd03f04ea3292d10ce06feda2f0c8272be0fb83.tar.bz2 busybox-w32-6dd03f04ea3292d10ce06feda2f0c8272be0fb83.zip |
switch_root: stop at first non-option. Closes bug 1425.
Diffstat (limited to 'util-linux/switch_root.c')
-rw-r--r-- | util-linux/switch_root.c | 4 |
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) | |||
73 | 73 | ||
74 | // Parse args (-c console) | 74 | // Parse args (-c console) |
75 | 75 | ||
76 | opt_complementary = "-2"; | 76 | opt_complementary = "-2"; // minimum 2 params |
77 | getopt32(argv, "c:", &console); | 77 | getopt32(argv, "+c:", &console); // '+': stop parsing at first non-option |
78 | argv += optind; | 78 | argv += optind; |
79 | 79 | ||
80 | // Change to new root directory and verify it's a different fs. | 80 | // Change to new root directory and verify it's a different fs. |