Add check to see if there is a media in the disk device. If not return
EFI_NO_MEDIA directly.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19446
6f19259b-4bc3-4df7-8a09-
765794883524
Status = EFI_SUCCESS;\r
Blocking = (BOOLEAN) ((Token == NULL) || (Token->Event == NULL));\r
\r
+ if (!(Media->MediaPresent)) {\r
+ return EFI_NO_MEDIA;\r
+ }\r
+\r
if (Media->MediaId != MediaId) {\r
return EFI_MEDIA_CHANGED;\r
}\r