mirror of
https://github.com/ipxe/ipxe
synced 2025-12-21 04:20:17 +03:00
[console] Allow consoles to update the recorded console size
Provide a mechanism for consoles to update the recorded console width and height, and use this width and height to provide the curses COLS and LINES variables. We choose not to use ANSI escape sequences to obtain the width and height, for two reasons: - iPXE's model is that all output is sent to all consoles; we could therefore end up with multiple consoles reporting conflicting widths and heights - when a serial console is in use, we probably don't want to resize the output shown on the BIOS console to match the size of the serial console, since it's likely that the serial console is in use only for debugging. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -10,6 +10,12 @@ FILE_LICENCE ( GPL2_OR_LATER );
|
||||
/** Current console usage */
|
||||
int console_usage = CONSOLE_USAGE_STDOUT;
|
||||
|
||||
/** Console width */
|
||||
unsigned int console_width = CONSOLE_DEFAULT_WIDTH;
|
||||
|
||||
/** Console height */
|
||||
unsigned int console_height = CONSOLE_DEFAULT_HEIGHT;
|
||||
|
||||
/**
|
||||
* Write a single character to each console device
|
||||
*
|
||||
@@ -138,6 +144,9 @@ int console_configure ( struct console_configuration *config ) {
|
||||
struct console_driver *console;
|
||||
int rc;
|
||||
|
||||
/* Reset console width and height */
|
||||
console_set_size ( CONSOLE_DEFAULT_WIDTH, CONSOLE_DEFAULT_HEIGHT );
|
||||
|
||||
/* Try to configure each console */
|
||||
for_each_table_entry ( console, CONSOLES ) {
|
||||
if ( ( console->configure ) &&
|
||||
|
||||
Reference in New Issue
Block a user