grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Handler support


From: Bean
Subject: Re: [PATCH] Handler support
Date: Sun, 15 Feb 2009 23:14:18 +0800

Hi,

The new version contains the following changes:

1, The handler module register commands terminal_input and
terminal_output. This is for backward compatible of grub.cfg.
Currently, the commands are registered manually, but this process
could be automated with a new command interface design.

2, Add a new class, grub_named_list, which represents a named list:

struct grub_named_list
{
  struct grub_named_list *next;
  const char *name;
};

it also introduce a new function, grub_named_list_find, which can be
used to lookup a object by name.

The relationship between different class:

list - named list + - handler + - terminal input
                        |                |
                        |               + - terminal output
                       + - handler class

You can use macros like GRUB_AS_LIST, GRUB_AS_NAMED_LIST and
GRUB_AS_HANDLER to cast pointer of a certain class to its ancestors.

-- 
Bean

Attachment: handler_3.diff
Description: Text Data


reply via email to

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