[syslinux:elflink] CLI: Add Ctrl + V support for printing the Syslinux version

syslinux-bot for Matt Fleming matt.fleming at intel.com
Mon Nov 5 08:03:09 PST 2012


Commit-ID:  967ee8a1ed49092ed2a6296936698a40b115a013
Gitweb:     http://www.syslinux.org/commit/967ee8a1ed49092ed2a6296936698a40b115a013
Author:     Matt Fleming <matt.fleming at intel.com>
AuthorDate: Thu, 1 Nov 2012 12:26:22 +0000
Committer:  Matt Fleming <matt.fleming at intel.com>
CommitDate: Fri, 2 Nov 2012 14:06:36 +0000

CLI: Add Ctrl + V support for printing the Syslinux version

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 at intel.com>

---
 com32/elflink/ldlinux/cli.c |   10 ++++++++++
 core/diskstart.inc          |    1 +
 core/include/core.h         |    1 +
 core/pxelinux.asm           |    3 ++-
 4 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/com32/elflink/ldlinux/cli.c b/com32/elflink/ldlinux/cli.c
index 65a5057..ebeaeec 100644
--- a/com32/elflink/ldlinux/cli.c
+++ b/com32/elflink/ldlinux/cli.c
@@ -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) {
diff --git a/core/diskstart.inc b/core/diskstart.inc
index c8f7936..8806593 100644
--- a/core/diskstart.inc
+++ b/core/diskstart.inc
@@ -142,6 +142,7 @@ print_bios:
 		call writestr_early
 
 		section .earlybss
+		global BIOSName
 		alignb 2
 %define	HAVE_BIOSNAME 1
 BIOSName	resw 1
diff --git a/core/include/core.h b/core/include/core.h
index da94dbf..a6ecbc4 100644
--- a/core/include/core.h
+++ b/core/include/core.h
@@ -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;
 
diff --git a/core/pxelinux.asm b/core/pxelinux.asm
index 35c7408..63334ff 100644
--- a/core/pxelinux.asm
+++ b/core/pxelinux.asm
@@ -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


More information about the Syslinux-commits mailing list