From 136d24f6433f82ec261654c6a395107268087614 Mon Sep 17 00:00:00 2001 From: carles Date: Sun, 3 Jan 2010 21:08:51 +0100 Subject: [PATCH] 2010-01-03 Carles Pina i Estany * kern/env.c (grub_env_unset): Set the variable to "" if has hooks. --- ChangeLog | 4 ++++ kern/env.c | 7 ++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6cdfd57d7..4b5080ebf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-01-03 Carles Pina i Estany + + * kern/env.c (grub_env_unset): Set the variable to "" if has hooks. + 2010-01-03 Carles Pina i Estany * po/POTFILES: Sort correctly. diff --git a/kern/env.c b/kern/env.c index 969227dec..8f94e891e 100644 --- a/kern/env.c +++ b/kern/env.c @@ -264,10 +264,11 @@ grub_env_unset (const char *name) if (! var) return; - /* XXX: It is not possible to unset variables with a read or write - hook. */ if (var->read_hook || var->write_hook) - return; + { + grub_env_set (name, ""); + return; + } grub_env_remove (var);