grub-devel
[Top][All Lists]
Advanced

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

Re: normal/cmdline bug & patch


From: Tomas Ebenlendr
Subject: Re: normal/cmdline bug & patch
Date: Fri, 18 Jun 2004 13:38:24 +0200
User-agent: Mutt/1.5.6i

> "Yoshinori K. Okuji" <address@hidden> writes:
> 
> > This is possible in the same way as autoload in Emacs. For example, we 
> > can have /boot/grub/autoload.lst which is a table of commands and 
> > modules, like this:
> >
> > chainload chainload.mod
> > linux linux.mod
> > initrd linux.mod
> > multiboot mb.mod
> 
> How about other modules, like filesystems?

Here is one not so simple, but generic idea:

let's say that the table will be:
<module> <domain> <resource>

linux.mod cmd linux
ext2.mod fs /"file" like magic-recognition pattern (may have whitespaces)/

then we can have function (grub_ prefixes ommited):
  err_t loadresource(char * domain,load_determine_t hook, void * hook-arg);
and type
  typedef int load_determine_t(char * resource, void * arg);

in case "cmd" hook() will be simple: returns TRUE if
    strcmp(resource,(char*) arg) == 0
in case "fs" 'arg' will point to some fs structure, 'hook' will try to
    read sector as specified in recogition pattern (char * resource) and
    tries to match it.

-- 
                                 Tomas 'ebi' Ebenlendr
                                 http://get.to/ebik
                                 PF 2004.46326654523





reply via email to

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