[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] pygrub: Add option to list grub entries
Charles Arnold writes ("[Xen-devel] [PATCH] pygrub: Add option to list grub entries"): > pygrub: Add option to list grub entries > > The argument to "--entry" allows 2 syntaxes, either directly the entry number > in menu.lst, or the whole string behind the "title" key word. This poses the > following issue: > >From Dom0 there is no way to guess the number and, or the complete title > string because this string contains the kernel version, which will change > with a kernel update. > This patch adds [-l|--list-entries] as an argument to pygrub. > + 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 " kernel: %s" % img.kernel[1] > + print " args: %s" % img.args > + print " initrd: %s" % img.initrd[1] Is it possible for any of these to contain newlines ? I don't think so but I'm not entirely sure. If it is then they need to be quoted somehow or the caller may be unable to unambigously parse the output. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |