diff options
author | Christophe Fergeau <cfergeau@mandriva.com> | 2009-04-09 11:09:55 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-04-09 11:19:53 -0700 |
commit | f4f69c52bfdac6a71e090006198f5f81069c5544 (patch) | |
tree | 794873febf559910d2fd579565de9c8cf282772b /modules | |
parent | 0ee7a002e1b1274ef55d9ee056ad01c4f4021158 (diff) | |
download | syslinux-f4f69c52bfdac6a71e090006198f5f81069c5544.tar.gz |
gfxboot: parse DEFAULT keywork in syslinux config filesyslinux-3.74
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@mandriva.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gfxboot.asm | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/modules/gfxboot.asm b/modules/gfxboot.asm index 7640914b..e3aed13f 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 |