aboutsummaryrefslogtreecommitdiffstats
path: root/gpxe/src/core/console.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpxe/src/core/console.c')
-rw-r--r--gpxe/src/core/console.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/gpxe/src/core/console.c b/gpxe/src/core/console.c
index c9773f71..e22d2601 100644
--- a/gpxe/src/core/console.c
+++ b/gpxe/src/core/console.c
@@ -5,10 +5,7 @@
/** @file */
-static struct console_driver console_drivers[0]
- __table_start ( struct console_driver, console );
-static struct console_driver console_drivers_end[0]
- __table_end ( struct console_driver, console );
+FILE_LICENCE ( GPL2_OR_LATER );
/**
* Write a single character to each console device.
@@ -28,8 +25,7 @@ void putchar ( int character ) {
if ( character == '\n' )
putchar ( '\r' );
- for ( console = console_drivers; console < console_drivers_end ;
- console++ ) {
+ for_each_table_entry ( console, CONSOLES ) {
if ( ( ! console->disabled ) && console->putchar )
console->putchar ( character );
}
@@ -51,8 +47,7 @@ void putchar ( int character ) {
static struct console_driver * has_input ( void ) {
struct console_driver *console;
- for ( console = console_drivers; console < console_drivers_end ;
- console++ ) {
+ for_each_table_entry ( console, CONSOLES ) {
if ( ( ! console->disabled ) && console->iskey ) {
if ( console->iskey () )
return console;