summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Garrett <mjg@redhat.com>2012-10-09 09:39:36 -0400
committerMatthew Garrett <mjg@redhat.com>2012-10-09 09:43:08 -0400
commitfcb7401ed6b12cfff37c862928841857db8a6bf7 (patch)
tree86e6de4fafddd17e8531ce932de796fa750783f3
parentcfa77df48e731a63ff239fd697a9bef940f7e3f7 (diff)
downloadefi-boot-shim-fcb7401ed6b12cfff37c862928841857db8a6bf7.tar.gz
efi-boot-shim-fcb7401ed6b12cfff37c862928841857db8a6bf7.zip
Don't lose the last file in top-level directories
The filesystem callback was failing to account for the additional menu item to return to the filesystem list, and so the last file entry in the root directory would be missing from the list.
-rw-r--r--MokManager.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/MokManager.c b/MokManager.c
index 88785e6e..416cd97b 100644
--- a/MokManager.c
+++ b/MokManager.c
@@ -857,7 +857,6 @@ static UINTN filesystem_callback (void *data, void *data2) {
UINTN dircount = 0, i = 0;
struct menu_item *dircontent;
EFI_FILE *root = data;
- EFI_FILE *parent = data2;
uefi_call_wrapper(root->SetPosition, 2, root, 0);
@@ -887,8 +886,7 @@ static UINTN filesystem_callback (void *data, void *data2) {
buffersize = 0;
}
- if (parent)
- dircount++;
+ dircount++;
dircontent = AllocatePool(sizeof(struct menu_item) * dircount);