diff options
author | Matt Fleming <matt.fleming@intel.com> | 2012-11-01 12:26:22 +0000 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2012-11-02 14:06:36 +0000 |
commit | 967ee8a1ed49092ed2a6296936698a40b115a013 (patch) | |
tree | e9007396cb62b96e10bbcd4bbeac967f77d91019 | |
parent | 8eb17b56985cd5aea70ab5947585615b08da6151 (diff) | |
download | syslinux-967ee8a1ed49092ed2a6296936698a40b115a013.tar.gz syslinux-967ee8a1ed49092ed2a6296936698a40b115a013.tar.xz syslinux-967ee8a1ed49092ed2a6296936698a40b115a013.zip |
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@intel.com>
-rw-r--r-- | com32/elflink/ldlinux/cli.c | 10 | ||||
-rw-r--r-- | core/diskstart.inc | 1 | ||||
-rw-r--r-- | core/include/core.h | 1 | ||||
-rw-r--r-- | 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 65a50577..ebeaeece 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 c8f79366..8806593d 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 da94dbf4..a6ecbc4a 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 35c74088..63334ffa 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 |