ia64/xen-unstable
changeset 15400:3187ffc5272c
x86: fix early option scanning
Make sure command lines like
... vgaxyz vga=
... console=vga vga=
do not mistakenly ignore the vga= option due to finding 'vga' earlier
on the line.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Make sure command lines like
... vgaxyz vga=
... console=vga vga=
do not mistakenly ignore the vga= option due to finding 'vga' earlier
on the line.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author | kfraser@localhost.localdomain |
---|---|
date | Wed Jun 20 14:57:49 2007 +0100 (2007-06-20) |
parents | 168b143a1a88 |
children | 2805246f6cac |
files | xen/arch/x86/boot/cmdline.S |
line diff
1.1 --- a/xen/arch/x86/boot/cmdline.S Wed Jun 20 14:43:41 2007 +0100 1.2 +++ b/xen/arch/x86/boot/cmdline.S Wed Jun 20 14:57:49 2007 +0100 1.3 @@ -119,30 +119,31 @@ 3: pop %edi 1.4 ret 1.5 1.6 .Lfind_option: 1.7 + mov 4(%esp),%eax 1.8 + dec %eax 1.9 push %ebx 1.10 - push 4+8(%esp) 1.11 - push 4+8(%esp) 1.12 +1: pushl 4+8(%esp) 1.13 + inc %eax 1.14 + push %eax 1.15 call .Lstrstr 1.16 add $8,%esp 1.17 test %eax,%eax 1.18 jz 3f 1.19 cmp %eax,4+4(%esp) 1.20 - je 1f 1.21 + je 2f 1.22 cmpb $' ',-1(%eax) 1.23 - jne 2f 1.24 -1: mov %eax,%ebx 1.25 - push 4+8(%esp) 1.26 + jne 1b 1.27 +2: mov %eax,%ebx 1.28 + pushl 4+8(%esp) 1.29 call .Lstrlen 1.30 add $4,%esp 1.31 - xchg %eax,%ebx 1.32 - add %eax,%ebx 1.33 + xadd %eax,%ebx 1.34 cmpb $'\0',(%ebx) 1.35 je 3f 1.36 cmpb $' ',(%ebx) 1.37 je 3f 1.38 cmpb $'=',(%ebx) 1.39 - je 3f 1.40 -2: xor %eax,%eax 1.41 + jne 1b 1.42 3: pop %ebx 1.43 ret 1.44