|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] Fix pygrub handling non-default entry
# HG changeset patch
# User Miroslav Rezanina <mrezanin@xxxxxxxxxx>
# Date 1358430787 0
# Node ID 414e6d1c9680614e283d48dbe9d91452de8c27b6
# Parent 7359c3122c5d935476ee494706db5249c8df6abc
Fix pygrub handling non-default entry
If we pass 0 as pygrub --entry argument (i.e. we want to boot first item),
default value is used instead. This is dueto wrong check for range of allowed
values of index - 0 is index of first item.
Signed-off-by: Miroslav Rezanina <mrezanin@xxxxxxxxxx>
Acked-by: Matt Wilson <msw@xxxxxxxxxx>
Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Committed-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
---
diff -r 7359c3122c5d -r 414e6d1c9680 tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub Thu Jan 17 13:53:03 2013 +0000
+++ b/tools/pygrub/src/pygrub Thu Jan 17 13:53:07 2013 +0000
@@ -613,7 +613,7 @@ def run_grub(file, entry, fs, cfg_args):
# set the entry to boot as requested
if entry is not None:
idx = get_entry_idx(g.cf, entry)
- if idx is not None and idx > 0 and idx < len(g.cf.images):
+ if idx is not None and idx >= 0 and idx < len(g.cf.images):
sel = idx
if sel == -1:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |