[syslinux] [PATCH] parseconfig, ui: store the label name unmangled
Sebastian Herbszt
herbszt at gmx.de
Tue Jul 22 11:34:51 PDT 2008
H. Peter Anvin wrote:
>> Index: syslinux-3.71-pre15/core/ui.inc
>> ===================================================================
>> --- syslinux-3.71-pre15.orig/core/ui.inc 2008-07-22 16:32:48.000000000 +0200
>> +++ syslinux-3.71-pre15/core/ui.inc 2008-07-22 16:32:58.000000000 +0200
>> @@ -308,12 +308,26 @@
>>
>> 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"
>>
>
> Hm... I don't think this works. In particular, consider the case when
> command_line contains "foo and some args" and the label is "foo". You
> will fail, because it will try to compare the space with the terminating
> null, which you do before hitting the cmp al,' ' at .match.
Knew i missed something because this code kind of looks messy. Will take a look.
- Sebastian
More information about the Syslinux
mailing list