summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-02-09 17:45:33 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-02-14 10:34:15 +0100
commit841f7a4ebbe76c7843a864a5f9ca8f5f95a23df8 (patch)
tree6dfb951b2d29ab73ced921dc6abf4e96cc75d111 /lib
parent9d30a941cce5ed055da18398f4deba18830d00d6 (diff)
downloadu-boot-841f7a4ebbe76c7843a864a5f9ca8f5f95a23df8.tar.gz
u-boot-841f7a4ebbe76c7843a864a5f9ca8f5f95a23df8.tar.xz
u-boot-841f7a4ebbe76c7843a864a5f9ca8f5f95a23df8.zip
efi_loader: '.' and '..' are directories
'.' and '..' are directories. So when looking for capsule files it is sufficient to check that the attribute EFI_FILE_DIRECTORY is not set. We don't have to check for these special names. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/efi_loader/efi_capsule.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/efi_loader/efi_capsule.c b/lib/efi_loader/efi_capsule.c
index 0d5a7b63ec..d39d731080 100644
--- a/lib/efi_loader/efi_capsule.c
+++ b/lib/efi_loader/efi_capsule.c
@@ -753,9 +753,7 @@ static efi_status_t efi_capsule_scan_dir(u16 ***files, unsigned int *num)
if (!tmp_size)
break;
- if (!(dirent->attribute & EFI_FILE_DIRECTORY) &&
- u16_strcmp(dirent->file_name, L".") &&
- u16_strcmp(dirent->file_name, L".."))
+ if (!(dirent->attribute & EFI_FILE_DIRECTORY))
count++;
}