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,5 +1,10 @@
|
|||
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>'.
|
||||
(GRUB_GET_PASSWORD): Gettextizze string.
|
||||
* include/grub/normal.h (STANDARD_MARGIN): New macro, moved from
|
||||
|
|
12
kern/env.c
12
kern/env.c
|
@ -170,8 +170,16 @@ grub_env_export (const char *name)
|
|||
struct grub_env_var *var;
|
||||
|
||||
var = grub_env_find (name);
|
||||
if (var)
|
||||
var->type = GRUB_ENV_VAR_GLOBAL;
|
||||
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