From 39baf6dff76ac3ab16d8831144a382f1ea6e9085 Mon Sep 17 00:00:00 2001 From: Gary Ching-Pang Lin Date: Tue, 30 Apr 2013 09:46:23 -0400 Subject: Don't update BootOrder until all csv files are processed --- fallback.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'fallback.c') diff --git a/fallback.c b/fallback.c index 6cc59aa6..d3179b6c 100644 --- a/fallback.c +++ b/fallback.c @@ -475,8 +475,6 @@ find_boot_csv(EFI_FILE_HANDLE fh, CHAR16 *dirname) } while (bs != 0); rc = EFI_SUCCESS; - if (nbootorder > 0) - rc = update_boot_order(); return rc; } @@ -587,9 +585,12 @@ find_boot_options(EFI_HANDLE device) } while (1); + if (rc == EFI_SUCCESS && nbootorder > 0) + rc = update_boot_order(); + uefi_call_wrapper(fh2->Close, 1, fh2); uefi_call_wrapper(fh->Close, 1, fh); - return EFI_SUCCESS; + return rc; } EFI_STATUS efi_main(EFI_HANDLE image, EFI_SYSTEM_TABLE *systab) -- cgit v1.2.3