← Commit list

6dd03f04e

Denis Vlasenko
Denis Vlasenko
2008-02-13
FAILED Duration: 13s

Subject

switch_root: stop at first non-option. Closes bug 1425.

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/switch_root.c+2 -2
@@ -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.