mirror of
https://xff.cz/git/u-boot/
synced 2025-09-05 02:32:11 +02:00
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>
This commit is contained in:
@@ -985,12 +985,7 @@ efi_status_t efi_dp_from_name(const char *dev, const char *devnr,
|
|||||||
if (!path)
|
if (!path)
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
|
||||||
if (!is_net) {
|
snprintf(filename, sizeof(filename), "%s", path);
|
||||||
/* Add leading / to fs paths, because they're absolute */
|
|
||||||
snprintf(filename, sizeof(filename), "/%s", path);
|
|
||||||
} else {
|
|
||||||
snprintf(filename, sizeof(filename), "%s", path);
|
|
||||||
}
|
|
||||||
/* DOS style file path: */
|
/* DOS style file path: */
|
||||||
s = filename;
|
s = filename;
|
||||||
while ((s = strchr(s, '/')))
|
while ((s = strchr(s, '/')))
|
||||||
|
Reference in New Issue
Block a user