[syslinux] [PATCH] Gfxboot COMBOOT module
Christophe Fergeau
cfergeau at mandriva.com
Thu Apr 9 02:30:21 PDT 2009
Hi Sebastian,
I was asked to send this patch to the list, so here it is. It's a patch
I had in syslinux mandriva package to properly set the default entry to
select in the gfxboot theme. Let me know what you think about it, I'm
not really familiar with syslinux/COM code, so I'm not sure I'm
accessing things in memory as I should.
Thanks,
Christophe
PS: I'm attaching this patch in addition to inlining it since I'm not
sure thunderbird won't mangle it, let me know which way is better to
send patches.
--
From 2b374fcf9917aff18f2a3a9ba4ba539ccb98fb50 Mon Sep 17 00:00:00 2001
From: Christophe Fergeau <cfergeau at mandriva.com>
Date: Thu, 9 Apr 2009 11:09:55 +0200
Subject: [PATCH] gfxboot: parse DEFAULT keywork in syslinux config file
The gfxboot COM module currently ignores the DEFAULT entry set in
syslinux config file and always default to 0 instead. This patch parses
DEFAULT entries in the config file and set the default entry
accordingly.
Signed-off-by: Christophe Fergeau <cfergeau at mandriva.com>
---
modules/gfxboot.asm | 34 ++++++++++++++++++++++++++++++++--
1 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/modules/gfxboot.asm b/modules/gfxboot.asm
index 7640914..e3aed13 100644
--- a/modules/gfxboot.asm
+++ b/modules/gfxboot.asm
@@ -544,8 +544,8 @@ gfx_setup_menu:
mov di,[menu_seg]
mov [menu_desc+menu_ent_list+2],di
- mov word [menu_desc+menu_default],0
- mov [menu_desc+menu_default+2],di
+ mov word [menu_desc+menu_default],dentry_buf
+ mov [menu_desc+menu_default+2],cs
mov di,256
mov [menu_desc+menu_arg_list],di
@@ -699,6 +699,17 @@ parse_config:
pop si
jz .do_label
+ push si
+ push di
+ xor ecx,ecx
+ mov si,configbuf
+ mov di,default_keyword+1
+ mov cl, byte [default_keyword]
+ call memcmp
+ pop di
+ pop si
+ jz .do_default
+
.nextline:
call skipline
jmp .read
@@ -723,6 +734,22 @@ parse_config:
jmp .read
+.do_default:
+ call skipspace
+ jz .eof
+ jc .noparm
+ call ungetc
+ push es
+ push di
+ push cs
+ pop es
+ mov di,dentry_buf
+ call getline
+ pop di
+ pop es
+
+ jmp .read
+
.eof:
.noparm:
ret
@@ -854,6 +881,7 @@ configbuf times trackbufsize db 0
ungetc_cnt db 0
ungetcdata db 0
label_keyword db 6,'label',0
+default_keyword db 7,'default',0
label_cnt dw 0
msg_progname db 'gfxboot: ',0
@@ -875,6 +903,8 @@ gfx_slash db '/', 0
db0 db 0
max_cmd_len equ 2047
command_line times max_cmd_len+2 db 0
+dentry_buf times 512 db 0
+dentry_buf_len equ $ - dentry_buf
; menu entry descriptor
menu_entries equ 0
--
1.6.2.2
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-gfxboot-parse-DEFAULT-keywork-in-syslinux-config-fi.patch
URL: <http://www.zytor.com/pipermail/syslinux/attachments/20090409/01d8d2ce/attachment.ksh>
More information about the Syslinux
mailing list