From: Hao Wu Date: Tue, 14 Nov 2017 05:29:03 +0000 (+0800) Subject: ShellPkg/Shell: Check the OpenVolume result in OpenRootByHandle() X-Git-Tag: edk2-stable201903~3097 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=996bd353d28f6bf48ea6047c71f95c59ac378e61;hp=996bd353d28f6bf48ea6047c71f95c59ac378e61 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 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Ruiyu Ni ---