Robert Millan wrote:
> On Thu, Jan 03, 2008 at 02:04:14AM +0100, Robert Millan wrote:
>>> So, if you don't hesitate to create so many variables, you can simply 
>>> create "normal_color", "normal_background_color", "highlight_color" 
>>> and "highlight_background_color", although I don't know who would like it.
>> Sounds like this could save us some code space.  I'd go for _fg and _bg to
>> preserve alignment in the names.
> 
> Uhm actually, splitting those in _fg and _bg was a bit of a hassle, because 
> GRUB
> internally thinks of colors as (bg << 4 | fg) like vga does, so obtaining them
> from two separate variables didn't bring any real benefit.
> 
> See attached new patch, using variable hooks.
> 
> Note: if you're going to test this using "configfile" command, think that
> this opens a new context and exposes the problem with hooks I just reported
> in the other thread.

About error handling:

Why not call grub_error() with error message and just return from
callback, and let prompt handle error processing (grub_print_error()).
This would keep error reporting centralized.

About new context:

Shouldn't new context have clone of it's parent contexts settings?


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to