summaryrefslogtreecommitdiff
path: root/shim.c
diff options
context:
space:
mode:
Diffstat (limited to 'shim.c')
-rw-r--r--shim.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/shim.c b/shim.c
index dcf1c516..32b3ae95 100644
--- a/shim.c
+++ b/shim.c
@@ -41,6 +41,7 @@
#include "signature.h"
#include "netboot.h"
#include "shim_cert.h"
+#include "ucs2.h"
#define DEFAULT_LOADER L"\\grub.efi"
#define MOK_MANAGER L"\\MokManager.efi"
@@ -1328,6 +1329,7 @@ EFI_STATUS set_second_stage (EFI_HANDLE image_handle)
{
EFI_STATUS status;
EFI_LOADED_IMAGE *li;
+ CHAR16 *bootpath = NULL;
CHAR16 *start = NULL, *c;
int i, remaining_size = 0;
@@ -1361,7 +1363,10 @@ EFI_STATUS set_second_stage (EFI_HANDLE image_handle)
}
}
- second_stage = (CHAR16 *)li->LoadOptions;
+ bootpath = DevicePathToStr(li->FilePath);
+ if (!StrCaseCmp(bootpath, (CHAR16 *)li->LoadOptions))
+ second_stage = (CHAR16 *)li->LoadOptions;
+
if (start && remaining_size > 0) {
load_options = start;
load_options_size = remaining_size;