grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] emu: fix unusable terminal after exit


From: Michael Chang
Subject: Re: [PATCH] emu: fix unusable terminal after exit
Date: Mon, 28 Dec 2015 16:47:14 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

On Wed, Dec 23, 2015 at 02:45:20PM +0300, Andrei Borzenkov wrote:
> On Wed, Dec 23, 2015 at 12:49 PM, Michael Chang <address@hidden> wrote:
> > The grub-emu's grub_exit function will exit immediately without any
> > housekeeping work for restoring terminal settings and leaves unusable
> > terminal in the end. Fix the problem by calling grub_reboot to allow
> > doing the housekeeping work and restoring the terminal settings.
> >
> > ---
> >  grub-core/commands/minicmd.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c
> > index a3a1182..63ffeb5 100644
> > --- a/grub-core/commands/minicmd.c
> > +++ b/grub-core/commands/minicmd.c
> > @@ -181,7 +181,11 @@ grub_mini_cmd_exit (struct grub_command *cmd 
> > __attribute__ ((unused)),
> >                     int argc __attribute__ ((unused)),
> >                     char *argv[] __attribute__ ((unused)))
> >  {
> > +#if defined (GRUB_MACHINE_EMU)
> > +  grub_reboot ();
> > +#else
> >    grub_exit ();
> > +#endif
> >    /* Not reached.  */
> >  }
> >
> 
> No, please. Just make EMU grub_exit do the right thing (assuming it is
> the right thing :)

I'm not sure it's right thing either, that's why I was not trying to
modify grub_exit because EMU shares it with utils, as souce file
grub-core/kern/emu/misc.c is also part of libgrubkern.a used also in
other platforms.

But anyway, please check attached patch again, which tries to separate
the EMU's grub_exit with the one in libgrubkern.a. 

Thanks.

Attachment: grub-exit.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]