diff options
Diffstat (limited to 'contrib/syslinux-4.02/gpxe/src/core/serial_console.c')
-rw-r--r-- | contrib/syslinux-4.02/gpxe/src/core/serial_console.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/syslinux-4.02/gpxe/src/core/serial_console.c b/contrib/syslinux-4.02/gpxe/src/core/serial_console.c new file mode 100644 index 0000000..0300482 --- /dev/null +++ b/contrib/syslinux-4.02/gpxe/src/core/serial_console.c @@ -0,0 +1,31 @@ +#include <gpxe/init.h> +#include <gpxe/serial.h> +#include "console.h" + +/** @file + * + * Serial console + * + */ + +struct console_driver serial_console __console_driver; + +static void serial_console_init ( void ) { + /* Serial driver initialization should already be done, + * time to enable the serial console. */ + serial_console.disabled = 0; +} + +struct console_driver serial_console __console_driver = { + .putchar = serial_putc, + .getchar = serial_getc, + .iskey = serial_ischar, + .disabled = 1, +}; + +/** + * Serial console initialisation function + */ +struct init_fn serial_console_init_fn __init_fn ( INIT_CONSOLE ) = { + .initialise = serial_console_init, +}; |