hello, here is a patch to improve and fix few bugs in pygrub of xen-booloader. 1) If you already patched my last 2 patches on top of last Jeremy''s patch, then go on to apply pygrub.aq.patch. # diffstat pygrub.aq.patch pygrub | 53 +++++++++++++++++++++++++++-------------------------- 1 files changed, 27 insertions(+), 26 deletions(-) 2) If you havent applied any patches on top of last Jeremy''s patch, the take pygrub.aq2.patch instead (this patch includes fix on /boot/grub/menu.lst problem). # diffstat pygrub.aq2.patch pygrub | 63 ++++++++++++++++++++++++++++++++++++--------------------------- 1 files changed, 36 insertions(+), 27 deletions(-) List of changes: - temporarily remove usage of use_default_colors(), since python 2.3 doesnt support this method. - allow user to press ''q'' to quit pygrub - corretly handle timeout feature - fix bug on fill_entries (incorrect check & display menu items) - incorrect check on boot entry (idx variable) - remove abundant checking on disk image - deinitialize curses before quitting. - fix few typos Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com> _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Jeremy Katz
2005-Apr-29 15:17 UTC
Re: [Xen-devel] [PATCH] xen-booloader: pygrub improvement & bug fix
On Fri, 2005-04-29 at 12:56 +0900, aq wrote:> here is a patch to improve and fix few bugs in pygrub of xen-booloader.Cool, thanks. Comments below> List of changes: > - temporarily remove usage of use_default_colors(), since python 2.3 > doesnt support this method.It would be better to actually check for the method and call it if available.. something like if hasattr(curses, ''use_default_colors'') curses.use_default_colors()> - allow user to press ''q'' to quit pygrubI had this at one point and then removed it -- the question is if you quit, then what are you wanting to boot? I guess it would be aborting the domain boot (which is the result you get), but thinking further down the road, what does that mean on a reboot? So I just decided the best thing to do was not to allow this.> - deinitialize curses before quitting.curses should get de-initialized when you leave curses.wrapper -- are you not seeing this? Thanks, Jeremy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
aq
2005-Apr-29 15:52 UTC
Re: [Xen-devel] [PATCH] xen-booloader: pygrub improvement & bug fix
On 4/30/05, Jeremy Katz <katzj@redhat.com> wrote:> On Fri, 2005-04-29 at 12:56 +0900, aq wrote: > > here is a patch to improve and fix few bugs in pygrub of xen-booloader. > > Cool, thanks. Comments below > > > List of changes: > > - temporarily remove usage of use_default_colors(), since python 2.3 > > doesnt support this method. > > It would be better to actually check for the method and call it if > available.. something like > if hasattr(curses, ''use_default_colors'') curses.use_default_colors()fine. but anyway i am implementing color feature, so perhaps we dont need those default color.> > > - allow user to press ''q'' to quit pygrub > > I had this at one point and then removed it -- the question is if you > quit, then what are you wanting to boot? I guess it would be aborting > the domain boot (which is the result you get), but thinking further down > the road, what does that mean on a reboot? So I just decided the best > thing to do was not to allow this.for me, it is nice to allow pepole to cancel the tool. without this option, how can you allow people to quit once they dont want to run anymore? so i think it is fine to keep it that way.> > > - deinitialize curses before quitting. > > curses should get de-initialized when you leave curses.wrapper -- are > you not seeing this?right, thanks for pointing out this. by the way, pygrub is an ugly name. the fact that this tool is written in python is what users care least. how about renamming it to a more make-sense name? like xengrub, or (even better) xenloader? regards, aq _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel