]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/Shell: Check the OpenVolume result in OpenRootByHandle()
authorHao Wu <hao.a.wu@intel.com>
Tue, 14 Nov 2017 05:29:03 +0000 (13:29 +0800)
committerHao Wu <hao.a.wu@intel.com>
Wed, 15 Nov 2017 12:47:14 +0000 (20:47 +0800)
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>

No differences found