summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-03-21 15:56:31 +0100
committerKay Sievers <kay@vrfy.org>2013-03-21 15:58:14 +0100
commit66d4d3b8b0db047bd2ea388e8c33f96e0a1e6b44 (patch)
tree9d188c04cd84a58c759c3cb9d2d41cdaeef34273 /src
parent9f9363a7e71efe5a9ab34be32d15bc5e2a398e72 (diff)
remember LoaderEntryOneShot value for dump
<derRichard> kay: btw: in dump_status() you print LoaderEntryOneShot, but config_default_entry_select() is called before that and deletes the var... <kay> derRichard: oh :)
Diffstat (limited to 'src')
-rw-r--r--src/efi/gummiboot.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/efi/gummiboot.c b/src/efi/gummiboot.c
index 0a5ab29..b97e8f5 100644
--- a/src/efi/gummiboot.c
+++ b/src/efi/gummiboot.c
@@ -76,6 +76,7 @@ typedef struct {
UINTN timeout_sec_config;
INTN timeout_sec_efivar;
CHAR16 *entry_default_pattern;
+ CHAR16 *entry_oneshot;
CHAR16 *options_edit;
CHAR16 *entries_auto;
} Config;
@@ -503,10 +504,8 @@ static VOID dump_status(Config *config, CHAR16 *loaded_image_path) {
if (efivar_get_int(L"LoaderConfigTimeout", &i) == EFI_SUCCESS)
Print(L"LoaderConfigTimeout: %d\n", i);
- if (efivar_get(L"LoaderEntryOneShot", &s) == EFI_SUCCESS) {
- Print(L"LoaderEntryOneShot: %s\n", s);
- FreePool(s);
- }
+ if (config->entry_oneshot)
+ Print(L"LoaderEntryOneShot: %s\n", config->entry_oneshot);
if (efivar_get(L"LoaderDeviceIdentifier", &s) == EFI_SUCCESS) {
Print(L"LoaderDeviceIdentifier: %s\n", s);
FreePool(s);
@@ -1512,6 +1511,8 @@ static VOID config_default_entry_select(Config *config) {
break;
}
}
+
+ config->entry_oneshot = StrDuplicate(var);
efivar_set(L"LoaderEntryOneShot", NULL, TRUE);
FreePool(var);
if (found)
@@ -1843,6 +1844,7 @@ static VOID config_free(Config *config) {
FreePool(config->entries);
FreePool(config->entry_default_pattern);
FreePool(config->options_edit);
+ FreePool(config->entry_oneshot);
FreePool(config->entries_auto);
}