]> git.ozlabs.org Git - petitboot/blobdiff - utils/hooks/30-add-offb.c
Consolidate petitboot,tty and petitboot,console
[petitboot] / utils / hooks / 30-add-offb.c
index eca9d133520da3a41282de4bbb971c95e428375c..aff3844dd5e9f613e8d1717085e108408eb76c9d 100644 (file)
@@ -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 {