mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 13:56:20 +00:00
console: Print out complete stdio device list
At present if both CONSOLE_MUX and SYS_CONSOLE_IS_IN_ENV are on, during boot, the printed out stdio devices are incomplete, e.g.: with "stdout=serial,vidconsole", only "vidconsole" is printed. For such case, we can print out the stdio device name from the environment variables. Signed-off-by: Bin Meng <bmeng@tinylab.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
f30fd55e82
commit
6b343ab38d
1 changed files with 21 additions and 9 deletions
|
@ -1014,6 +1014,17 @@ static void stdio_print_current_devices(void)
|
||||||
{
|
{
|
||||||
char *stdinname, *stdoutname, *stderrname;
|
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 {
|
||||||
stdinname = stdio_devices[stdin] ?
|
stdinname = stdio_devices[stdin] ?
|
||||||
stdio_devices[stdin]->name :
|
stdio_devices[stdin]->name :
|
||||||
"No input devices available!";
|
"No input devices available!";
|
||||||
|
@ -1023,6 +1034,7 @@ static void stdio_print_current_devices(void)
|
||||||
stderrname = stdio_devices[stderr] ?
|
stderrname = stdio_devices[stderr] ?
|
||||||
stdio_devices[stderr]->name :
|
stdio_devices[stderr]->name :
|
||||||
"No error devices available!";
|
"No error devices available!";
|
||||||
|
}
|
||||||
|
|
||||||
/* Print information */
|
/* Print information */
|
||||||
puts("In: ");
|
puts("In: ");
|
||||||
|
|
Loading…
Add table
Reference in a new issue