summaryrefslogtreecommitdiff
path: root/lib/efi_loader/efi_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/efi_loader/efi_file.c')
-rw-r--r--lib/efi_loader/efi_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/efi_loader/efi_file.c b/lib/efi_loader/efi_file.c
index 9d709a8db0..4b4422205d 100644
--- a/lib/efi_loader/efi_file.c
+++ b/lib/efi_loader/efi_file.c
@@ -200,6 +200,10 @@ static struct efi_file_handle *file_open(struct file_system *fs,
fs_exists(fh->path)))
goto error;
+ /* fs_exists() calls fs_close(), so open file system again */
+ if (set_blk_dev(fh))
+ goto error;
+
/* figure out if file is a directory: */
fh->isdir = is_dir(fh);
} else {