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