Re: variable hooks & global variables

2008-01-05 Thread Robert Millan
On Sat, Jan 05, 2008 at 02:22:17AM +0100, Yoshinori K. Okuji wrote: > On Thursday 03 January 2008 16:05, Robert Millan wrote: > > On Thu, Jan 03, 2008 at 04:03:11PM +0100, Robert Millan wrote: > > > When you set a variable hook (grub_register_variable_hook), this hook > > > isn't preserved after so

Re: variable hooks & global variables

2008-01-04 Thread Yoshinori K. Okuji
On Thursday 03 January 2008 16:05, Robert Millan wrote: > On Thu, Jan 03, 2008 at 04:03:11PM +0100, Robert Millan wrote: > > When you set a variable hook (grub_register_variable_hook), this hook > > isn't preserved after someone (e.g. configfile command) opens a new > > context (grub_env_context_op

Re: variable hooks & global variables

2008-01-03 Thread Robert Millan
I propose this patch to preserve hooks only when variables are already marked as global. Additionally, it exports "root" variable. On Thu, Jan 03, 2008 at 04:05:58PM +0100, Robert Millan wrote: > On Thu, Jan 03, 2008 at 04:03:11PM +0100, Robert Millan wrote: > > > > When you set a variable hook

Re: variable hooks & global variables

2008-01-03 Thread Robert Millan
On Thu, Jan 03, 2008 at 04:03:11PM +0100, Robert Millan wrote: > > When you set a variable hook (grub_register_variable_hook), this hook isn't > preserved after someone (e.g. configfile command) opens a new context > (grub_env_context_open), unless the variable has been set as global > (grub_env_e

variable hooks & global variables

2008-01-03 Thread Robert Millan
When you set a variable hook (grub_register_variable_hook), this hook isn't preserved after someone (e.g. configfile command) opens a new context (grub_env_context_open), unless the variable has been set as global (grub_env_export). Is this what we want? The only current user of variable hooks i