audk/ShellPkg/Application/Shell
Hao Wu 996bd353d2 ShellPkg/Shell: Check the OpenVolume result in OpenRootByHandle()
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=779

For the API EfiShellOpenRootByHandle():

The return status of the call to SimpleFileSystem->OpenVolume should be
checked.

It is possible that there is a media change in the device (like CD/DVD
ROM). In such case, the volume root opened and/or the device path opened
previously (also within EfiShellOpenRootByHandle) may be invalid.

This commit adds a check for the result of OpenVolume before subsequently
calling functions like EfiShellGetMapFromDevicePath() &
ConvertEfiFileProtocolToShellHandle().

Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
2017-11-15 20:47:14 +08:00
..
ConsoleLogger.c ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ConsoleLogger.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ConsoleWrappers.c ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ConsoleWrappers.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
FileHandleInternal.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
FileHandleWrappers.c ShellPkg: Fix a bug ">>v" cannot append data to environment variable 2017-01-06 20:46:41 +08:00
FileHandleWrappers.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
Shell.c ShellPkg: Fix MSFT C4255 warning 2017-11-14 18:19:14 +08:00
Shell.h ShellPkg/Shell: clean up bogus member types in SPLIT_LIST 2017-04-26 12:10:30 +02:00
Shell.inf ShellPkg: add GUID declaration for FILE_GUID of UEFI Shell app to package 2017-03-22 15:32:16 +00:00
Shell.uni report line number for command errors in a script. 2016-05-12 08:15:00 -07:00
ShellEnvVar.c ShellPkg/Application: Fix ">v" cannot update environment variable 2016-12-09 09:26:28 +08:00
ShellEnvVar.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellManParser.c ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellManParser.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellParametersProtocol.c ShellPkg: Refine type cast for pointer subtraction 2017-03-06 14:16:00 +08:00
ShellParametersProtocol.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00
ShellProtocol.c ShellPkg/Shell: Check the OpenVolume result in OpenRootByHandle() 2017-11-15 20:47:14 +08:00
ShellProtocol.h ShellPkg/Application: Remove unnecessary EFIAPI 2016-10-09 10:27:45 +08:00