forked from pool/syslinux
- fix timeout counter to work more accurate (bnc #691211)
OBS-URL: https://build.opensuse.org/package/show/system:install:head/syslinux?expand=0&rev=63
This commit is contained in:
parent
02979a2d0b
commit
6b72616086
61
syslinux-4.04-timeout.diff
Normal file
61
syslinux-4.04-timeout.diff
Normal file
@ -0,0 +1,61 @@
|
||||
diff --git a/core/ui.inc b/core/ui.inc
|
||||
index 0a4bb56..97945c9 100644
|
||||
--- a/core/ui.inc
|
||||
+++ b/core/ui.inc
|
||||
@@ -529,30 +529,36 @@ kernel_corrupt: mov si,err_notkernel
|
||||
; which can be adjusted by the caller based on the corresponding
|
||||
; master variables; on return they're updated.
|
||||
;
|
||||
-; This cheats. If we say "no timeout" we actually get a timeout of
|
||||
-; 7.5 years.
|
||||
-;
|
||||
getchar_timeout:
|
||||
call vgashowcursor
|
||||
call reset_idle
|
||||
|
||||
.loop:
|
||||
- push word [__jiffies]
|
||||
+ push dword [__jiffies]
|
||||
call pollchar
|
||||
jnz .got_char
|
||||
call do_idle
|
||||
- pop ax
|
||||
- cmp ax,[__jiffies] ; Has the timer advanced?
|
||||
+ pop eax
|
||||
+ sub eax,[__jiffies] ; Has the timer advanced?
|
||||
je .loop
|
||||
|
||||
- dec dword [ThisKbdTo]
|
||||
- jz .timeout
|
||||
- dec dword [ThisTotalTo]
|
||||
- jnz .loop
|
||||
+ ; more than one tick may have passed, keep the diff in eax
|
||||
+ neg eax
|
||||
+
|
||||
+ cmp dword [ThisKbdTo],0
|
||||
+ jz .chk_total
|
||||
+ sub [ThisKbdTo],eax
|
||||
+ jbe .timeout
|
||||
+
|
||||
+.chk_total:
|
||||
+ cmp dword [ThisTotalTo],0
|
||||
+ jz .loop
|
||||
+ sub [ThisTotalTo],eax
|
||||
+ ja .loop
|
||||
|
||||
.timeout:
|
||||
; Timeout!!!!
|
||||
- pop cx ; Discard return address
|
||||
+ pop ecx ; Discard return address
|
||||
call vgahidecursor
|
||||
mov si,Ontimeout ; Copy ontimeout command
|
||||
mov di,command_line
|
||||
@@ -561,7 +567,7 @@ getchar_timeout:
|
||||
jmp command_done
|
||||
|
||||
.got_char:
|
||||
- pop cx ; Discard
|
||||
+ pop ecx ; Discard
|
||||
call getchar
|
||||
call vgahidecursor
|
||||
ret
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 21 13:10:04 CET 2014 - snwint@suse.de
|
||||
|
||||
- fix timeout counter to work more accurate (bnc #691211)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 5 16:23:01 CET 2014 - snwint@suse.de
|
||||
|
||||
|
@ -48,6 +48,7 @@ Patch10: %{name}-%{version}-isohybrid_mbr.diff
|
||||
Patch11: %{name}-%{version}-localboot.diff
|
||||
Patch12: %{name}-%{version}-geometry.diff
|
||||
Patch13: %{name}-%{version}-nostrip.diff
|
||||
Patch14: %{name}-%{version}-timeout.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%description
|
||||
@ -77,6 +78,7 @@ Authors:
|
||||
%patch11 -p1
|
||||
%patch12 -p1
|
||||
%patch13 -p0
|
||||
%patch14 -p1
|
||||
|
||||
%build
|
||||
cp %{SOURCE2} .
|
||||
|
Loading…
Reference in New Issue
Block a user