diff mbox series

[v14,06/10] eficonfig: scan media device in eficonfig startup

Message ID 20220826064223.23288-7-masahisa.kojima@linaro.org
State Superseded
Headers show
Series enable menu-driven UEFI variable maintenance | expand

Commit Message

Masahisa Kojima Aug. 26, 2022, 6:42 a.m. UTC
In eficonfig startup, scan media devices and update
the UEFI boot option.

Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org>
---
Newly created in v14

 cmd/eficonfig.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/cmd/eficonfig.c b/cmd/eficonfig.c
index 772b38d29a..946c4b1d08 100644
--- a/cmd/eficonfig.c
+++ b/cmd/eficonfig.c
@@ -2059,6 +2059,10 @@  static int do_eficonfig(struct cmd_tbl *cmdtp, int flag, int argc, char *const a
 	if (ret != EFI_SUCCESS)
 		return CMD_RET_FAILURE;
 
+	ret = eficonfig_generate_media_device_boot_option();
+	if (ret != EFI_SUCCESS && ret != EFI_NOT_FOUND)
+		return ret;
+
 	while (1) {
 		efi_menu = eficonfig_create_fixed_menu(maintenance_menu_items,
 						       ARRAY_SIZE(maintenance_menu_items));