]>
git.ipfire.org Git - thirdparty/u-boot.git/blob - cmd/console.c
1 // SPDX-License-Identifier: GPL-2.0+
4 * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
12 #include <stdio_dev.h>
14 extern void _do_coninfo (void);
15 static int do_coninfo(cmd_tbl_t
*cmd
, int flag
, int argc
, char * const argv
[])
18 struct list_head
*list
= stdio_get_list();
19 struct list_head
*pos
;
20 struct stdio_dev
*dev
;
22 /* Scan for valid output and input devices */
24 puts ("List of available devices:\n");
26 list_for_each(pos
, list
) {
27 dev
= list_entry(pos
, struct stdio_dev
, list
);
29 printf ("%-8s %08x %c%c ",
32 (dev
->flags
& DEV_FLAGS_INPUT
) ? 'I' : '.',
33 (dev
->flags
& DEV_FLAGS_OUTPUT
) ? 'O' : '.');
35 for (l
= 0; l
< MAX_FILES
; l
++) {
36 if (stdio_devices
[l
] == dev
) {
37 printf ("%s ", stdio_names
[l
]);
46 /***************************************************/
49 coninfo
, 3, 1, do_coninfo
,
50 "print console devices and information",