CLI: Add Ctrl + V support for printing the Syslinux version
authorMatt Fleming <matt.fleming@intel.com>
Thu, 1 Nov 2012 12:26:22 +0000 (12:26 +0000)
committerMatt Fleming <matt.fleming@intel.com>
Fri, 2 Nov 2012 14:06:36 +0000 (14:06 +0000)
The cli code is missing support for printing the version string that
is available in Syslinux 4.06 and earlier.

Signed-off-by: Matt Fleming <matt.fleming@intel.com>
com32/elflink/ldlinux/cli.c
core/diskstart.inc
core/include/core.h
core/pxelinux.asm

index 65a5057..ebeaeec 100644 (file)
@@ -13,6 +13,7 @@
 #include <sys/exec.h>
 #include <sys/module.h>
 #include <dprintf.h>
+#include <core.h>
 
 #include "getkey.h"
 #include "menu.h"
@@ -421,6 +422,15 @@ const char *edit_cmdline(const char *input, int top /*, int width */ ,
                redraw = 1;
                break;
            }
+       case KEY_CTRL('V'):
+           if (BIOSName)
+               eprintf("%s%s%s", syslinux_banner,
+                       MK_PTR(0, BIOSName), copyright_str);
+           else
+               eprintf("%s%s", syslinux_banner, copyright_str);
+
+           redraw = 1;
+           break;
 
        default:
            if (key >= ' ' && key <= 0xFF && len < MAX_CMDLINE_LEN - 1) {
index c8f7936..8806593 100644 (file)
@@ -142,6 +142,7 @@ print_bios:
                call writestr_early
 
                section .earlybss
+               global BIOSName
                alignb 2
 %define        HAVE_BIOSNAME 1
 BIOSName       resw 1
index da94dbf..a6ecbc4 100644 (file)
@@ -24,6 +24,7 @@ extern char cmd_line[];
 extern char ConfigFile[];
 extern char syslinux_banner[];
 extern char copyright_str[];
+extern uint16_t BIOSName;
 extern char StackBuf[];
 extern unsigned int __bcopyxx_len;
 
index 35c7408..63334ff 100644 (file)
@@ -81,12 +81,13 @@ InitStack   resd 1
 PXEStack       resd 1                  ; Saved stack during PXE call
 
                alignb 4
-                global DHCPMagic, RebootTime, APIVer
+                global DHCPMagic, RebootTime, APIVer, BIOSName
 RebootTime     resd 1                  ; Reboot timeout, if set by option
 StrucPtr       resw 2                  ; Pointer to PXENV+ or !PXE structure
 APIVer         resw 1                  ; PXE API version found
 LocalBootType  resw 1                  ; Local boot return code
 DHCPMagic      resb 1                  ; PXELINUX magic flags
+BIOSName       resw 1                  ; Dummy variable - always 0
 
                section .text16
                global StackBuf