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