diff options
author | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-03-10 16:44:33 +1100 |
---|---|---|
committer | Samuel Mendoza-Jonas <sam@mendozajonas.com> | 2017-03-17 11:34:15 +1100 |
commit | 7219a3a770f6321da7413cbd60b1107c8c530086 (patch) | |
tree | 8cd2b83291f9b2a1b77b951446c4c5c034b9c478 | |
parent | 8107b37ad034f7fd201ed49dfcc7a8284e71de0a (diff) | |
download | petitboot-1.4.2.zip petitboot-1.4.2.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>
-rw-r--r-- | utils/hooks/30-dtb-updates.c | 5 |
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 { |