Skip to content

Commit d9d07d7

Browse files
committed
cmd: consider multiplexing in coninfo
If console multiplexing in enabled (CONFIG_CONSOLE_MUX=y), the output of the coninfo command should show the file association (stdin, stderr, stdout) for all devices not only the default ones. Signed-off-by: Heinrich Schuchardt <[email protected]> Reviewed-by: Simon Glass <[email protected]>
1 parent 6fc4fc3 commit d9d07d7

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

cmd/console.c

+9-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*/
1010
#include <common.h>
1111
#include <command.h>
12+
#include <iomux.h>
1213
#include <stdio_dev.h>
1314

1415
extern void _do_coninfo (void);
@@ -33,9 +34,15 @@ static int do_coninfo(struct cmd_tbl *cmd, int flag, int argc,
3334
(dev->flags & DEV_FLAGS_OUTPUT) ? "O" : "");
3435

3536
for (l = 0; l < MAX_FILES; l++) {
36-
if (stdio_devices[l] == dev) {
37-
printf("| |-- %s\n", stdio_names[l]);
37+
if (CONFIG_IS_ENABLED(CONSOLE_MUX)) {
38+
if (iomux_match_device(console_devices[l],
39+
cd_count[l], dev) >= 0)
40+
printf("| |-- %s\n", stdio_names[l]);
41+
} else {
42+
if (stdio_devices[l] == dev)
43+
printf("| |-- %s\n", stdio_names[l]);
3844
}
45+
3946
}
4047
}
4148
return 0;

0 commit comments

Comments
 (0)