summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2019-02-23 11:20:23 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2019-03-02 23:34:26 +0100
commit30a231dcce0b4daf6102cffcdc5c81db8ddaaa48 (patch)
tree1b411db32ef5659dc93c5a279c27350d700cb4ce /lib
parentcfba74d0bef350d81241b059180bcc5a1e93bdfa (diff)
efi_loader: do not add \ in efi_fs_from_name()
In the `efidebug boot add` command we do not want an unsolicited leading backslash added to the file name. There is no good reason to mark a loaded file with a backslash as absolute. Anyway when reading files the file name will be interpreted as relative to root directory of the device. So let's get rid of this backslash. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_device_path.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/efi_loader/efi_device_path.c b/lib/efi_loader/efi_device_path.c
index 98c36e798f5..53b40c8c3c2 100644
--- a/lib/efi_loader/efi_device_path.c
+++ b/lib/efi_loader/efi_device_path.c
@@ -985,12 +985,7 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
if (!path)
return EFI_SUCCESS;
- if (!is_net) {
- /* Add leading / to fs paths, because they're absolute */
- snprintf(filename, sizeof(filename), "/%s", path);
- } else {
- snprintf(filename, sizeof(filename), "%s", path);
- }
+ snprintf(filename, sizeof(filename), "%s", path);
/* DOS style file path: */
s = filename;
while ((s = strchr(s, '/')))