[syslinux] [PATCH 3/4] elflink: Do clear screen even if we have no pDraw_Menu method

Liu Aleaxander aleaxander at gmail.com
Sat Oct 2 09:36:11 PDT 2010


Do clear screen even if we have no pDraw_Menu method, since user
may work in CLI mode and want to clear screen by pressing 'Ctrl-L'.

Signed-off-by: Liu Aleaxander <Aleaxander at gmail.com>
---
 core/elflink/cli.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/core/elflink/cli.c b/core/elflink/cli.c
index 4876dca..3099cb4 100644
--- a/core/elflink/cli.c
+++ b/core/elflink/cli.c
@@ -94,14 +94,13 @@ const char *edit_cmdline(const char *input, int top /*, int width */ ,
     x = y = 0;
 
     while (!done) {
-	if (redraw > 1 && pDraw_Menu != NULL) {
+	if (redraw > 1) {
 	    /* Clear and redraw whole screen */
 	    /* Enable ASCII on G0 and DEC VT on G1; do it in this order
 	       to avoid confusing the Linux console */
-	    /* clear_screen();
-	       draw_menu(-1, top, 1); */
 	    clear_screen();
-	    (*pDraw_Menu) (-1, top, 1);
+	    if (pDraw_Menu) 
+		    (*pDraw_Menu) (-1, top, 1);
 	    prev_len = 0;
 	    // printf("\033[0m\033[2J\033[H");
 	}
-- 
1.7.0.1




More information about the Syslinux mailing list