summaryrefslogtreecommitdiff
path: root/EdkNt32Pkg
diff options
context:
space:
mode:
authordtang2 <dtang2@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-07 02:36:29 +0000
committerdtang2 <dtang2@6f19259b-4bc3-4df7-8a09-765794883524>2006-11-07 02:36:29 +0000
commit7228815241b74b8a8f034a4cc9f80a11c0ee199b (patch)
treeac53e982da3a84284f1d5c4c2249cdc032d8188e /EdkNt32Pkg
parent1df07b635e4f941f5f29d08dd1e572d028f3fb5f (diff)
downloadedk2-platforms-7228815241b74b8a8f034a4cc9f80a11c0ee199b.tar.xz
Bug fix for "Unplug U Disk during exploer using File Explorer cause tiano halt"
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1906 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkNt32Pkg')
-rw-r--r--EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c
index 5f304e0b8f..db835cf534 100644
--- a/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c
+++ b/EdkNt32Pkg/Dxe/PlatformBds/Generic/BootMaint/FileExplorer.c
@@ -148,7 +148,8 @@ Returns:
BM_FILE_CONTEXT *NewFileContext;
FORM_ID FormId;
BOOLEAN ExitFileExplorer;
-
+ EFI_STATUS Status;
+
NewMenuEntry = NULL;
NewFileContext = NULL;
ExitFileExplorer = FALSE;
@@ -180,7 +181,11 @@ Returns:
if (NewFileContext->IsDir ) {
RemoveEntryList (&NewMenuEntry->Link);
BOpt_FreeMenu (&DirectoryMenu);
- BOpt_FindFiles (CallbackData, NewMenuEntry);
+ Status = BOpt_FindFiles (CallbackData, NewMenuEntry);
+ if (EFI_ERROR (Status)) {
+ ExitFileExplorer = TRUE;
+ goto exit;
+ }
CreateMenuStringToken (CallbackData, CallbackData->FeHiiHandle, &DirectoryMenu);
BOpt_DestroyMenuEntry (NewMenuEntry);
@@ -247,7 +252,7 @@ Returns:
}
}
}
-
+exit:
return ExitFileExplorer;
}