summaryrefslogtreecommitdiffstats
path: root/utils/hooks/30-add-offb.c
diff options
context:
space:
mode:
Diffstat (limited to 'utils/hooks/30-add-offb.c')
-rw-r--r--utils/hooks/30-add-offb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/hooks/30-add-offb.c b/utils/hooks/30-add-offb.c
index eca9d13..aff3844 100644
--- a/utils/hooks/30-add-offb.c
+++ b/utils/hooks/30-add-offb.c
@@ -512,7 +512,10 @@ static int set_stdout(struct offb_ctx *ctx)
return 0;
}
- if (strstr(boot_console, "tty") != NULL) {
+ 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) {
fprintf(stderr, "TTY recognised: %s\n", boot_console);
stdout_path = get_vga_path(ctx);
} else {
OpenPOWER on IntegriCloud