Blame view
cmd/console.c
1.02 KB
3863585bb Initial revision |
1 2 3 4 |
/* * (C) Copyright 2000 * Wolfgang Denk, DENX Software Engineering, wd@denx.de. * |
1a4596601 Add GPL-2.0+ SPDX... |
5 |
* SPDX-License-Identifier: GPL-2.0+ |
3863585bb Initial revision |
6 7 8 9 10 11 12 |
*/ /* * Boot support */ #include <common.h> #include <command.h> |
52cb4d4fb stdio/device: rew... |
13 |
#include <stdio_dev.h> |
3863585bb Initial revision |
14 |
|
3863585bb Initial revision |
15 |
extern void _do_coninfo (void); |
088f1b199 common/cmd_*.c: s... |
16 |
static int do_coninfo(cmd_tbl_t *cmd, int flag, int argc, char * const argv[]) |
3863585bb Initial revision |
17 |
{ |
c1de7a6da devices: merge to... |
18 |
int l; |
52cb4d4fb stdio/device: rew... |
19 |
struct list_head *list = stdio_get_list(); |
c1de7a6da devices: merge to... |
20 |
struct list_head *pos; |
52cb4d4fb stdio/device: rew... |
21 |
struct stdio_dev *dev; |
3863585bb Initial revision |
22 23 |
/* Scan for valid output and input devices */ |
aa5590b66 Patch by Thomas V... |
24 25 |
puts ("List of available devices: "); |
3863585bb Initial revision |
26 |
|
c1de7a6da devices: merge to... |
27 |
list_for_each(pos, list) { |
52cb4d4fb stdio/device: rew... |
28 |
dev = list_entry(pos, struct stdio_dev, list); |
3863585bb Initial revision |
29 |
|
1caf934a0 video: Drop DEV_F... |
30 |
printf ("%-8s %08x %c%c ", |
3863585bb Initial revision |
31 32 |
dev->name, dev->flags, |
3863585bb Initial revision |
33 34 35 36 37 38 39 40 41 42 43 44 45 |
(dev->flags & DEV_FLAGS_INPUT) ? 'I' : '.', (dev->flags & DEV_FLAGS_OUTPUT) ? 'O' : '.'); for (l = 0; l < MAX_FILES; l++) { if (stdio_devices[l] == dev) { printf ("%s ", stdio_names[l]); } } putc (' '); } return 0; } |
8bde7f776 * Code cleanup: |
46 47 48 |
/***************************************************/ |
0d4983930 Patch by Kenneth ... |
49 50 |
U_BOOT_CMD( coninfo, 3, 1, do_coninfo, |
2fb2604d5 Command usage cle... |
51 |
"print console devices and information", |
8bde7f776 * Code cleanup: |
52 53 |
"" ); |