[syslinux:master] Add support for "vga=current"

syslinux-bot for H. Peter Anvin hpa at zytor.com
Fri Jan 22 17:45:02 PST 2010


Commit-ID:  aab6f6014b1719db0254f108d89bb0b6750c822a
Gitweb:     http://syslinux.zytor.com/commit/aab6f6014b1719db0254f108d89bb0b6750c822a
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Fri, 22 Jan 2010 17:42:11 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Fri, 22 Jan 2010 17:42:11 -0800

Add support for "vga=current"

"vga=current" is a user-friendly synonym for "vga=0x0f04".

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 com32/lib/syslinux/load_linux.c |    3 +++
 core/runkernel.inc              |   11 +++++++----
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/com32/lib/syslinux/load_linux.c b/com32/lib/syslinux/load_linux.c
index db98516..df79362 100644
--- a/com32/lib/syslinux/load_linux.c
+++ b/com32/lib/syslinux/load_linux.c
@@ -253,6 +253,9 @@ int syslinux_boot_linux(void *kernel_buf, size_t kernel_size,
 	case 'n':		/* "normal" */
 	    video_mode = 0xffff;
 	    break;
+	case 'c':		/* "current" */
+	    video_mode = 0x0f04;
+	    break;
 	default:
 	    video_mode = strtoul(arg, NULL, 0);
 	    break;
diff --git a/core/runkernel.inc b/core/runkernel.inc
index c437d72..f6ede38 100644
--- a/core/runkernel.inc
+++ b/core/runkernel.inc
@@ -138,15 +138,18 @@ parse_cmdline:
 		jmp .next_opt
 
 opt_vga:
-		mov eax,[es:di-1]
+		mov ax,[es:di-1]
 		mov bx,-1
-		cmp eax,'=nor'			; vga=normal
+		cmp ax,'=nor'			; vga=normal
 		je .vc0
 		dec bx				; bx <- -2
-		cmp eax,'=ext'			; vga=ext
+		cmp ax,'=ext'			; vga=ext
 		je .vc0
 		dec bx				; bx <- -3
-		cmp eax,'=ask'			; vga=ask
+		cmp ax,'=ask'			; vga=ask
+		je .vc0
+		mov bx,0x0f04			; bx <- 0x0f04 (current mode)
+		cmp ax,'=cur'			; vga=current
 		je .vc0
 		call parseint_esdi		; vga=<number>
 		jc .skip			; Not an integer



More information about the Syslinux-commits mailing list