X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=utils%2Fhooks%2F30-dtb-updates.c;h=f7de97695b8a20e06dadbffb98386239082d372a;hb=44ab15ff671fae26af2b5c8a5db8bcded677ef74;hp=66e7a77b63bddb21ed800448f88c6d267e1b294a;hpb=8107b37ad034f7fd201ed49dfcc7a8284e71de0a;p=petitboot diff --git a/utils/hooks/30-dtb-updates.c b/utils/hooks/30-dtb-updates.c index 66e7a77..f7de976 100644 --- a/utils/hooks/30-dtb-updates.c +++ b/utils/hooks/30-dtb-updates.c @@ -257,7 +257,7 @@ static int do_translate(void *fdt, int node, current_pci_flags = na > 2 ? of_read_number(addr, 1) : 0; child_pci_flags = cna > 2 ? of_read_number(ranges, 1) : 0; if (current_pci_flags != 0 && current_pci_flags != child_pci_flags) { - fprintf(stderr, "Unexpected change in flags: %lx, %lx\n", + fprintf(stderr, "Unexpected change in flags: %" PRIu64 ", %" PRIu64 "\n", current_pci_flags, child_pci_flags); return -1; } @@ -324,7 +324,7 @@ static int do_translate(void *fdt, int node, fprintf(stderr, "New address:\n\t"); for (i = 0; i < *addr_cells; i++) - fprintf(stderr, " %lx ", of_read_number(&addr[i], 1)); + fprintf(stderr, " %" PRIu64 " ", of_read_number(&addr[i], 1)); fprintf(stderr, "\n"); return 0; @@ -382,7 +382,7 @@ static int create_translated_addresses(struct offb_ctx *ctx, fprintf(stderr, "Final address:\n\t"); for (i = 0; i < addr_cells; i++) - fprintf(stderr, " %lx ", of_read_number(&addr[i], 1)); + fprintf(stderr, " %" PRIu64 " ", of_read_number(&addr[i], 1)); fprintf(stderr, "\n"); if (addr_cells + size_cells > reg_cells) { @@ -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 {