Commit 88c0698e by Alexander Popov

Emit WARNING for the cmdline options that exist multiple times

Don't emit ERROR here. Even GitHub Actions machines have repeated options
in /proc/cmdline.

Also see the comment in cmdline parsing for x86:
https://elixir.bootlin.com/linux/v5.16.7/source/arch/x86/boot/cmdline.c#L21
```
In accordance with standard Linux practice, if this option is repeated,
this returns the last instance on the command line.
```
parent be0bde21
...@@ -194,7 +194,7 @@ def parse_cmdline_file(parsed_options, fname): ...@@ -194,7 +194,7 @@ def parse_cmdline_file(parsed_options, fname):
name = opt name = opt
value = '' # '' is not None value = '' # '' is not None
if name in parsed_options: if name in parsed_options:
sys.exit(f'[!] ERROR: cmdline option "{name}" exists multiple times') print(f'[!] WARNING: cmdline option "{name}" exists multiple times')
value = normalize_cmdline_options(name, value) value = normalize_cmdline_options(name, value)
parsed_options[name] = value parsed_options[name] = value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment