grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Call a module's init function only after the module is succe


From: Robert Millan
Subject: Re: [PATCH] Call a module's init function only after the module is successfully added
Date: Sat, 25 Jul 2009 18:07:43 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Wed, Jul 22, 2009 at 02:25:14PM -0400, Pavel Roskin wrote:
> On Wed, 2009-07-22 at 19:36 +0200, Robert Millan wrote:
> > On Tue, Jul 21, 2009 at 04:02:48PM -0400, Pavel Roskin wrote:
> > > 
> > > By the way, kern/dl.c have some unused functions (grub_dl_unload_all).
> > 
> > grub_machine_fini() used to rely on this, but at some point we concluded it
> > wasn't useful to change machine state when loading an OS, other than things
> > specific to each particular loader.
> 
> As I said, I missed calls in *.S files.  grub_linux16_boot() and
> grub_chainloader_real_boot() still use it.  Perhaps they shouldn't.

linux16.mod needs to transfer control to Linux with VGA in known state
(text mode), so grub_console_fini() has to be called, but this can
be simplified.  There's no reason we have to unload all modules just
to archieve this effect IMHO.

Same applies for chainloader.

linux.mod can transfer control both in text or graphical mode, so it
doesn't have this problem.

-- 
Robert Millan

  The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
  how) you may access your data; but nobody's threatening your freedom: we
  still allow you to remove your data and not access it at all."




reply via email to

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