SIGN IN SIGN UP

init/main.c: use bootconfig_cmdline_requested() for the runtime opt-in

setup_boot_config() open-coded the same "is bootconfig requested on the
kernel command line?" check that setup_arch() performs via the shared
bootconfig_cmdline_requested() helper. Switch it to the helper so the
early (setup_arch) and late (setup_boot_config) paths use one parser and
cannot disagree on what counts as opt-in.

The helper also reports the offset of the init arguments following a "--"
separator, which is exactly what initargs_offs needs, so the local
parse_args() call, its bootconfig_params() callback and the tmp_cmdline
copy are removed.

No functional change intended.

Link: https://lore.kernel.org/all/20260626-bootconfig_using_tools-v7-9-24ab72139c29@debian.org/

Suggested-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Signed-off-by: Breno Leitao <leitao@debian.org>
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
B
Breno Leitao committed
85595d3f964825c833fd2597521fcef67c3071de
Parent: 378517c
Committed by Masami Hiramatsu (Google) <mhiramat@kernel.org> on 7/2/2026, 12:15:46 PM