From 6496dd86e71c865832f42d9bff0062415a288a84 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Thu, 26 Nov 2009 16:48:35 +0100 Subject: 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 --- com32/hdt/hdt-common.c | 5 ++++- com32/hdt/hdt-common.h | 4 ++++ 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[]) { -- cgit v1.2.1