2009-12-21 Andreas Born <futur.andy@googlemail.com>
* kern/env.c (grub_env_export): Create nonexistent variables before exporting.
This commit is contained in:
parent
7f39d92f8d
commit
0175d51f49
2 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2009-12-21 Andreas Born <futur.andy@googlemail.com>
|
||||
|
||||
* kern/env.c (grub_env_export): Create nonexistent variables before
|
||||
exporting.
|
||||
|
||||
2009-12-20 Carles Pina i Estany <carles@pina.cat>
|
||||
|
||||
* include/grub/auth.h: Include `<grub/i18n.h>'.
|
||||
|
|
10
kern/env.c
10
kern/env.c
|
@ -170,7 +170,15 @@ grub_env_export (const char *name)
|
|||
struct grub_env_var *var;
|
||||
|
||||
var = grub_env_find (name);
|
||||
if (var)
|
||||
if (! var)
|
||||
{
|
||||
grub_err_t err;
|
||||
|
||||
err = grub_env_set (name, "");
|
||||
if (err)
|
||||
return err;
|
||||
var = grub_env_find (name);
|
||||
}
|
||||
var->type = GRUB_ENV_VAR_GLOBAL;
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
|
|
Loading…
Reference in a new issue