parseconfig, ui: store the label name unmangled
authorSebastian Herbszt <herbszt@gmx.de>
Tue, 22 Jul 2008 15:09:55 +0000 (17:09 +0200)
committerH. Peter Anvin <hpa@zytor.com>
Tue, 22 Jul 2008 17:18:21 +0000 (13:18 -0400)
Store the label names unmangled and match those against command_line.

- Sebastian

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
core/parseconfig.inc
core/ui.inc

index 7fb6ddf..843a733 100644 (file)
@@ -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
index f593ce1..0ff9d10 100644 (file)
@@ -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"