- delete BootOrder if there is no more boot option. [bnc#883545] OBS-URL: https://build.opensuse.org/request/show/240152 OBS-URL: https://build.opensuse.org/package/show/Base:System/efibootmgr?expand=0&rev=17
15 lines
433 B
Diff
15 lines
433 B
Diff
diff --git a/src/efibootmgr/efibootmgr.c b/src/efibootmgr/efibootmgr.c
|
|
index 7ea1887..b01a05a 100644
|
|
--- a/src/efibootmgr/efibootmgr.c
|
|
+++ b/src/efibootmgr/efibootmgr.c
|
|
@@ -380,6 +380,9 @@ remove_from_boot_order(uint16_t num)
|
|
}
|
|
}
|
|
|
|
+ if (new_i == 0)
|
|
+ return delete_variable(&boot_order);
|
|
+
|
|
/* Now new_data has what we need */
|
|
new_data_size = new_i * sizeof(uint16_t);
|
|
memset(&(boot_order.Data), 0, boot_order.DataSize);
|