diff options
author | Tom Rini <trini@konsulko.com> | 2023-08-02 12:13:16 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-02 12:13:16 -0400 |
commit | 38dedebc547f795efc3daad17f7c013c515e1285 (patch) | |
tree | a56e2dc62406de041c67a18c25dff02d362f36bb /common/console.c | |
parent | 7755b2200777f72dca87dd169138e95f011bbcb9 (diff) | |
parent | 02be57caf730e2213bc844bf1dbe58bedd2c3734 (diff) |
Merge https://source.denx.de/u-boot/custodians/u-boot-riscv
+ Fix compilation error for CI when enabling RTL8169 driver
+ Fix compilation error for pci_mmc.c by adding acpi_table header file
+ Support video console and usb keyboard on RISC-V QEMU virt machine
+ Support StarFive JH7110 PCIe driver
+ Enable PCI on Unmatched board
Diffstat (limited to 'common/console.c')
-rw-r--r-- | common/console.c | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/common/console.c b/common/console.c index 71ad8efd6f4..98c3ee6ca6b 100644 --- a/common/console.c +++ b/common/console.c @@ -1010,29 +1010,41 @@ int console_init_f(void) return 0; } -void stdio_print_current_devices(void) +static void stdio_print_current_devices(void) { - /* Print information */ - puts("In: "); - if (stdio_devices[stdin] == NULL) { - puts("No input devices available!\n"); + char *stdinname, *stdoutname, *stderrname; + + if (CONFIG_IS_ENABLED(CONSOLE_MUX) && + CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV)) { + /* stdin stdout and stderr are in environment */ + stdinname = env_get("stdin"); + stdoutname = env_get("stdout"); + stderrname = env_get("stderr"); + + stdinname = stdinname ? : "No input devices available!"; + stdoutname = stdoutname ? : "No output devices available!"; + stderrname = stderrname ? : "No error devices available!"; } else { - printf ("%s\n", stdio_devices[stdin]->name); + stdinname = stdio_devices[stdin] ? + stdio_devices[stdin]->name : + "No input devices available!"; + stdoutname = stdio_devices[stdout] ? + stdio_devices[stdout]->name : + "No output devices available!"; + stderrname = stdio_devices[stderr] ? + stdio_devices[stderr]->name : + "No error devices available!"; } + /* Print information */ + puts("In: "); + printf("%s\n", stdinname); + puts("Out: "); - if (stdio_devices[stdout] == NULL) { - puts("No output devices available!\n"); - } else { - printf ("%s\n", stdio_devices[stdout]->name); - } + printf("%s\n", stdoutname); puts("Err: "); - if (stdio_devices[stderr] == NULL) { - puts("No error devices available!\n"); - } else { - printf ("%s\n", stdio_devices[stderr]->name); - } + printf("%s\n", stderrname); } #if CONFIG_IS_ENABLED(SYS_CONSOLE_IS_IN_ENV) |