[syslinux:elflink] Revert "menu: Make "menu clear" the default"

syslinux-bot for Matt Fleming matt.fleming at intel.com
Tue Nov 27 12:30:05 PST 2012


Commit-ID:  75afaf55d70cda7a24533df124183f8624190438
Gitweb:     http://www.syslinux.org/commit/75afaf55d70cda7a24533df124183f8624190438
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Tue, 27 Nov 2012 13:31:26 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Tue, 27 Nov 2012 13:44:12 +0000

Revert "menu: Make "menu clear" the default"

This reverts commit 6ab02b6682c0b693b3e4f9afcc2ab8775f804f0a.

People are reporting that the above commit causes a regression in
behaviour between 4.0x and 5.0x. It also makes the MENU CLEAR
directive obsolete and requires that users change their existing
config files to restore the old behaviour.

The commit was intended to solve the same bug that commit 87320b8de8f3
("ldlinux: Disable VGA graphics when loading a kernel") addresses but
without breaking vesacon, see, commit e04ee714164d ('Revert "ldlinux:
Disable VGA graphics when loading a kernel"') for more details.

Reported-by: Ady <ady-sf at hotmail.com>
Cc: H. Peter Anvin <hpa at zytor.com>
Signed-off-by: Matt Fleming <matt.fleming at intel.com>

---
 com32/menu/menumain.c   | 10 +++-------
 com32/menu/readconfig.c |  4 +---
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/com32/menu/menumain.c b/com32/menu/menumain.c
index 487f829..dc99da6 100644
--- a/com32/menu/menumain.c
+++ b/com32/menu/menumain.c
@@ -1110,7 +1110,7 @@ int main(int argc, char *argv[])
 {
     const char *cmdline;
     struct menu *m;
-    int rows, cols, cursorrow;
+    int rows, cols;
     int i;
 
     (void)argc;
@@ -1152,15 +1152,11 @@ int main(int argc, char *argv[])
 	local_cursor_enable(true);
 	cmdline = run_menu();
 
-	if (clearmenu) {
+	if (clearmenu)
 	    clear_screen();
-	    cursorrow = 1;
-	} else {
-	    cursorrow = END_ROW;
-	}
 
 	local_cursor_enable(false);
-	printf("\033[?25h\033[%d;1H\033[0m", cursorrow);
+	printf("\033[?25h\033[%d;1H\033[0m", END_ROW);
 
 	if (cmdline) {
 	    uint32_t type = parse_image_type(cmdline);
diff --git a/com32/menu/readconfig.c b/com32/menu/readconfig.c
index 3690e48..d6f9873 100644
--- a/com32/menu/readconfig.c
+++ b/com32/menu/readconfig.c
@@ -35,7 +35,7 @@ struct menu *root_menu, *start_menu, *hide_menu, *menu_list;
 /* These are global parameters regardless of which menu we're displaying */
 int shiftkey = 0;		/* Only display menu if shift key pressed */
 int hiddenmenu = 0;
-int clearmenu = 1;
+int clearmenu = 0;
 long long totaltimeout = 0;
 const char *hide_key[KEY_MAX];
 
@@ -749,8 +749,6 @@ static void parse_config_file(FILE * f)
 		refstr_put(command);
 	    } else if ((ep = looking_at(p, "clear"))) {
 		clearmenu = 1;
-	    } else if ((ep = looking_at(p, "noclear"))) {
-		clearmenu = 0;
 	    } else if ((ep = is_message_name(p, &msgnr))) {
 		refstr_put(m->messages[msgnr]);
 		m->messages[msgnr] = refstrdup(skipspace(ep));


More information about the Syslinux-commits mailing list