summaryrefslogtreecommitdiffstats
path: root/utils/hooks/30-dtb-updates.c
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-03-10 16:44:33 +1100
committerSamuel Mendoza-Jonas <sam@mendozajonas.com>2017-03-17 11:34:15 +1100
commit7219a3a770f6321da7413cbd60b1107c8c530086 (patch)
tree8cd2b83291f9b2a1b77b951446c4c5c034b9c478 /utils/hooks/30-dtb-updates.c
parent8107b37ad034f7fd201ed49dfcc7a8284e71de0a (diff)
downloadpetitboot-7219a3a770f6321da7413cbd60b1107c8c530086.zip
petitboot-7219a3a770f6321da7413cbd60b1107c8c530086.tar.gz
util/hooks: Don't update DT when ttyS* console activev1.4.2
Update 30-dtb-updates to not accidentally treat ttyS* consoles as tty* and update linux,stdout-path with the VGA console details. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
Diffstat (limited to 'utils/hooks/30-dtb-updates.c')
-rw-r--r--utils/hooks/30-dtb-updates.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/hooks/30-dtb-updates.c b/utils/hooks/30-dtb-updates.c
index 66e7a77..e161d87 100644
--- a/utils/hooks/30-dtb-updates.c
+++ b/utils/hooks/30-dtb-updates.c
@@ -515,7 +515,10 @@ static int set_stdout(struct offb_ctx *ctx)
if (strncmp(boot_console, "/dev/", strlen("/dev/")) != 0) {
/* We already have the full path */
stdout_path = talloc_strdup(ctx, boot_console);
- } else if (strstr(boot_console, "tty") != NULL) {
+ /* Check for a tty* console but don't accidentally catch
+ * ttyS* consoles */
+ } else if (strstr(boot_console, "tty") != NULL &&
+ strstr(boot_console, "ttyS") == NULL) {
fprintf(stderr, "TTY recognised: %s\n", boot_console);
stdout_path = get_vga_path(ctx);
} else {
OpenPOWER on IntegriCloud