switch_root: stop at first non-option. Closes bug 1425.
No binary (build failed)
—
(log yok)
| @@ -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. | |