Displaying 2 results from an estimated 2 matches for "cfg_arg".
Did you mean:
cfg_args
2013 Jan 09
2
[PATCH] Fix pygrub handling non-default entry
...s index of first item.
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
Patch:
---
diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
index 1845485..eedfdb2 100644
--- a/tools/pygrub/src/pygrub
+++ b/tools/pygrub/src/pygrub
@@ -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...
2012 Oct 19
3
[PATCH] pygrub: Add option to list grub entries
...s an argument to pygrub.
Signed-off-by: Charles Arnold <carnold@suse.com>
diff -r c1c549c4fe9e tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub Mon Oct 15 16:51:44 2012 +0100
+++ b/tools/pygrub/src/pygrub Fri Oct 19 11:40:49 2012 -0600
@@ -595,7 +595,17 @@ def run_grub(file, entry, fs, cfg_args):
sel = g.run()
g = Grub(file, fs)
- if interactive:
+
+ if list_entries:
+ for i in range(len(g.cf.images)):
+ img = g.cf.images[i]
+ print "title: %s" % img.title
+ print " root: %s" % img.root
+ print...