mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 10:02:42 +03:00
[serial] Don't enable serial console without serial support
serial_console_init() would enable serial console support without knowing if the serial driver succeeded or not. As a result, the serial console would interfere with a normal keyboard on a system lacking serial support. Reported-by: Jan ONDREJ (SAL) <ondrejj(at)salstar.sk> Signed-off-by: Shao Miller <sha0.miller@gmail.com> Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
committed by
Michael Brown
parent
fcdfe81764
commit
a712dae709
@@ -18,9 +18,12 @@
|
||||
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;
|
||||
/*
|
||||
* Check if serial driver initialization is done.
|
||||
* If so, it's time to enable the serial console.
|
||||
*/
|
||||
if ( serial_initialized )
|
||||
serial_console.disabled = 0;
|
||||
}
|
||||
|
||||
struct console_driver serial_console __console_driver = {
|
||||
|
||||
Reference in New Issue
Block a user