inittab: fallback when multiple "console=" is detected
[project/procd.git] / inittab.c
index 128268a03fdbd2163210007a555a8bfe2ef82dee..73a2174a97b6eb36778c1790e853c9ad18c000e8 100644 (file)
--- 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