diff options
author | Sebastian Herbszt <herbszt@gmx.de> | 2008-07-22 17:09:55 +0200 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-07-22 13:18:21 -0400 |
commit | 559ea7abec1acb497eca0bd74a583713e425302b (patch) | |
tree | 16322ba6aaac53996f843797de233c8976746f77 /core | |
parent | a8641f9842da20ad9c80ad28db8c10cdaaddfd55 (diff) | |
download | syslinux-elf-559ea7abec1acb497eca0bd74a583713e425302b.tar.gz syslinux-elf-559ea7abec1acb497eca0bd74a583713e425302b.tar.xz syslinux-elf-559ea7abec1acb497eca0bd74a583713e425302b.zip |
parseconfig, ui: store the label name unmangled
Store the label names unmangled and match those against command_line.
- Sebastian
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/parseconfig.inc | 11 | ||||
-rw-r--r-- | core/ui.inc | 20 |
2 files changed, 27 insertions, 4 deletions
diff --git a/core/parseconfig.inc b/core/parseconfig.inc index 7fb6ddf9..843a733f 100644 --- a/core/parseconfig.inc +++ b/core/parseconfig.inc @@ -307,7 +307,16 @@ pc_label: call commit_vk ; Commit any current vkernel rep stosw call pc_getline mov di,VKernelBuf+vk_vname - call mangle_name ; Mangle virtual name + mov cx,FILENAME_MAX-1 +.loop: + lodsb + cmp al,' ' + jna .done + mov [di],al + inc di + dec cx + jnz .loop +.done: mov byte [VKernel],1 ; We've seen a "label" statement mov si,VKernelBuf+vk_vname ; By default, rname == vname mov di,VKernelBuf+vk_rname diff --git a/core/ui.inc b/core/ui.inc index f593ce10..0ff9d104 100644 --- a/core/ui.inc +++ b/core/ui.inc @@ -308,12 +308,26 @@ vk_check: sub di,cx ; Return to beginning of buf push si - mov si,KernelName + mov si,command_line mov cx,FILENAME_MAX - es repe cmpsb +.loop: + dec cx + jz .done + lodsb + mov ah,[di] + inc di + cmp ah,al + je .match + jmp .nomatch +.match: + cmp al,' ' + jna .done + jmp .loop +.nomatch: pop si - je .found jmp .scan +.done: + pop si ; ; We *are* using a "virtual kernel" |