diff options
author | Erwan Velu <erwan.velu@free.fr> | 2009-11-26 16:48:35 +0100 |
---|---|---|
committer | Erwan Velu <erwan.velu@free.fr> | 2009-12-04 10:11:13 +0100 |
commit | 6496dd86e71c865832f42d9bff0062415a288a84 (patch) | |
tree | 4a6d5da33246a9b33b2fbdd78a37ea30841842fe | |
parent | fe290baf3c7c294e3fa200279169b44791a34b45 (diff) | |
download | syslinux-6496dd86e71c865832f42d9bff0062415a288a84.tar.gz |
hdt: Adding novesa for future use
Impact: none
In a close future, as vesa will be enabled by default, let's anticipate
the novesa command
-rw-r--r-- | com32/hdt/hdt-common.c | 5 | ||||
-rw-r--r-- | com32/hdt/hdt-common.h | 4 | ||||
-rw-r--r-- | com32/hdt/hdt.c | 3 |
3 files changed, 10 insertions, 2 deletions
diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c index 754798c4..5c3ab669 100644 --- a/com32/hdt/hdt-common.c +++ b/com32/hdt/hdt-common.c @@ -90,12 +90,15 @@ void detect_parameters(const int argc, const char *argv[], convert_isolinux_filename(hardware->reboot_label, hardware); } else if (!strncmp(argv[i], "vesa", 4)) { vesamode = true; - max_console_lines = 24; + max_console_lines = CLI_VESA_MAX_LINES; /* If the user defines a background image */ if (!strncmp(argv[i], "vesa=", 5)) { strncpy(hardware->vesa_background, argv[i] + 5, sizeof(hardware->vesa_background)); } + } else if (!strncmp(argv[i], "novesa", 6)) { + vesamode = false; + max_console_lines = CLI_MAX_LINES; } else if (!strncmp(argv[i], "auto=", 5)) { /* The auto= parameter is separated in several argv[] * as it can contains spaces. diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h index 6001df26..e04ab720 100644 --- a/com32/hdt/hdt-common.h +++ b/com32/hdt/hdt-common.h @@ -72,6 +72,10 @@ /* Graphic to load in background when using the vesa mode */ #define CLI_DEFAULT_BACKGROUND "backgnd.png" +/* The maximum number of lines */ +#define MAX_CLI_LINES 20 +#define MAX_VESA_CLI_LINES 24 + /* Defines if the cli is quiet*/ bool quiet; diff --git a/com32/hdt/hdt.c b/com32/hdt/hdt.c index 40323222..1a438a36 100644 --- a/com32/hdt/hdt.c +++ b/com32/hdt/hdt.c @@ -40,9 +40,10 @@ int display_line_nb = 0; bool disable_more_printf = false; + /* Defines the number of lines in the console * Default is 20 for a std console */ -int max_console_lines = 20; +int max_console_lines = MAX_CLI_LINES; int main(const int argc, const char *argv[]) { |