16ab868efc
- Update to 0.4 - Rebase patches + shim-suse-build.patch + shim-mokmanager-support-crypt-hash-method.patch + shim-bnc804631-fix-broken-bootpath.patch + shim-bnc798043-no-doulbe-separators.patch + shim-bnc807760-change-pxe-2nd-loader-name.patch + shim-bnc808106-correct-certcount.patch + shim-mokmanager-ui-revamp.patch - Add patches + shim-merge-lf-loader-code.patch: merge the Linux Foundation loader UI code + shim-fix-pointer-casting.patch: fix a casting issue and the size of an empty vendor cert + shim-fix-simple-file-selector.patch: fix the buffer allocation in the simple file selector - Remove upstreamed patches + shim-support-mok-delete.patch + shim-reboot-after-changes.patch + shim-clear-queued-key.patch + shim-local-key-sign-mokmanager.patch + shim-get-2nd-stage-loader.patch + shim-fix-loadoptions.patch - Remove unused patch: shim-mokmanager-new-pw-hash.patch and shim-keep-unsigned-mokmanager.patch - Install the vendor certificate to /etc/uefi/certs OBS-URL: https://build.opensuse.org/request/show/184039 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory/shim?expand=0&rev=28
60 lines
1.4 KiB
Diff
60 lines
1.4 KiB
Diff
From cf7f87688efab2712f41b47eaad32e75ec730653 Mon Sep 17 00:00:00 2001
|
|
From: Gary Ching-Pang Lin <glin@suse.com>
|
|
Date: Fri, 1 Mar 2013 18:04:06 +0800
|
|
Subject: [PATCH] Remove double-separators from the bootpath
|
|
|
|
---
|
|
shim.c | 27 ++++++++++++++++++++-------
|
|
1 file changed, 20 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/shim.c b/shim.c
|
|
index 0622c72..806f065 100644
|
|
--- a/shim.c
|
|
+++ b/shim.c
|
|
@@ -969,7 +969,7 @@ static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
|
|
{
|
|
EFI_DEVICE_PATH *devpath;
|
|
EFI_HANDLE device;
|
|
- int i;
|
|
+ int i, j, last = -1;
|
|
unsigned int pathlen = 0;
|
|
EFI_STATUS efi_status = EFI_SUCCESS;
|
|
CHAR16 *bootpath;
|
|
@@ -989,14 +989,27 @@ static EFI_STATUS generate_path(EFI_LOADED_IMAGE *li, CHAR16 *ImagePath,
|
|
if (bootpath[i] == '/')
|
|
bootpath[i] = '\\';
|
|
}
|
|
+
|
|
for (i=pathlen; i>0; i--) {
|
|
- if (bootpath[i] == '\\' && bootpath[i-1] != '\\')
|
|
- break;
|
|
+ if (bootpath[i] == '\\' && bootpath[i-1] == '\\')
|
|
+ bootpath[i] = '/';
|
|
+ else if (last == -1 && bootpath[i] == '\\')
|
|
+ last = i;
|
|
+ }
|
|
+
|
|
+ if (last == -1 && bootpath[0] == '\\')
|
|
+ last = 0;
|
|
+ bootpath[last+1] = '\0';
|
|
+
|
|
+ if (last > 0) {
|
|
+ for (i = 0, j = 0; bootpath[i] != '\0'; i++) {
|
|
+ if (bootpath[i] != '/') {
|
|
+ bootpath[j] = bootpath[i];
|
|
+ j++;
|
|
+ }
|
|
+ }
|
|
+ bootpath[j] = '\0';
|
|
}
|
|
- if (bootpath[i] == '\\')
|
|
- bootpath[i+1] = '\0';
|
|
- else
|
|
- bootpath[0] = '\0';
|
|
|
|
while (*ImagePath == '\\')
|
|
ImagePath++;
|
|
--
|
|
1.8.1.4
|
|
|