summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorINAGAKI Hiroshi2024-03-12 04:14:24 +0000
committerRobert Marko2024-03-25 09:28:50 +0000
commitca8c30208d5e1aaa2c0e3f732c4c9944735e9850 (patch)
treef6a1aaba1ee81250003847f4cf397f8ad41950fb
parent49ea930a862c8eeb4996170b34a930f5848895e9 (diff)
downloadprocd-ca8c30208d5e1aaa2c0e3f732c4c9944735e9850.tar.gz
inittab: fallback when multiple "console=" is detected
Linux Kernel uses a console in the last "console=" parameter in bootargs as /dev/console, so falllback to /dev/console or get_active_console() when multiple "console=" parameter is found in bootargs, instead of using the first console. Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
-rw-r--r--inittab.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/inittab.c b/inittab.c
index 128268a..73a2174 100644
--- a/inittab.c
+++ b/inittab.c
@@ -192,7 +192,8 @@ static void askconsole(struct init_action *a)
* is in the device tree
*/
tty = get_cmdline_val("console", line, sizeof(line));
- if (tty == NULL) {
+ if (tty == NULL ||
+ get_cmdline_val_offset("console", line, sizeof(line), 1)) {
if (dev_exist("console"))
tty = "console";
else