|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] pygrub: Workaround for Solaris CR 1143256
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236855501 0
# Node ID 3118041f2259709c529bfb2222f8071e8cc88de3
# Parent e261fa202e39707ebe3a4964e27fd50f286d8f09
pygrub: Workaround for Solaris CR 1143256.
The Solaris curses library has a broken timeout() function: after a
first timeout() call with a positive value for an argument, subsequent
calls will fail to reset it. So, getch() always times out, confusing
the pygrub timer in the main loop. Add an extra check to avoid exiting
prematurely.
Signed-off-by: Frank van der Linden <frank.vanderlinden@xxxxxxx>
---
tools/pygrub/src/pygrub | 6 +++++-
1 files changed, 5 insertions(+), 1 deletion(-)
diff -r e261fa202e39 -r 3118041f2259 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub Thu Mar 12 10:57:44 2009 +0000
+++ b/tools/pygrub/src/pygrub Thu Mar 12 10:58:21 2009 +0000
@@ -441,7 +441,11 @@ class Grub:
# Timed out waiting for a keypress
if mytime != -1:
mytime += 1
- if mytime >= int(timeout):
+ # curses.timeout() does not work properly on Solaris
+ # So we may come here even after a key has been pressed.
+ # Check both timeout and mytime to avoid exiting
+ # when we shouldn't.
+ if timeout != -1 and mytime >= int(timeout):
self.isdone = True
break
else:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] pygrub: Workaround for Solaris CR 1143256.,
Xen patchbot-unstable <=
|
|
|
|
|