]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/EfiDevice.c
Added a PCD to turn on/off probing Block IO devices to detect add/remove/change....
[mirror_edk2.git] / EmbeddedPkg / Ebl / EfiDevice.c
index 354a6d7720c250f30212ec72bbd0c83f2d1f68ef..2f9a6067267cc4e950000d17ac53bd1f2444f589 100644 (file)
@@ -210,34 +210,13 @@ EblDeviceCmd (
   UINTN         Index;\r
   UINTN         CurrentRow;\r
   UINTN         Max;\r
   UINTN         Index;\r
   UINTN         CurrentRow;\r
   UINTN         Max;\r
-  EFI_OPEN_FILE *File;\r
 \r
   CurrentRow = 0;\r
 \r
   // Need to call here to make sure Device Counts are valid\r
   EblUpdateDeviceLists ();\r
 \r
 \r
   CurrentRow = 0;\r
 \r
   // Need to call here to make sure Device Counts are valid\r
   EblUpdateDeviceLists ();\r
 \r
-  //\r
-  // Probe for media insertion/removal in removable media devices\r
-  //\r
-  Max = EfiGetDeviceCounts (EfiOpenBlockIo);\r
-  if (Max != 0) {\r
-    for (Index = 0; Index < Max; Index++) {\r
-      File = EfiDeviceOpenByType (EfiOpenBlockIo, Index);\r
-      if (File != NULL) {\r
-        if (File->FsBlockIoMedia->RemovableMedia) {\r
-          // Probe to see if media is present (or not) or media changed\r
-          //  this causes the ReinstallProtocolInterface() to fire in the\r
-          //  block io driver to update the system about media change events\r
-          File->FsBlockIo->ReadBlocks (File->FsBlockIo, File->FsBlockIo->Media->MediaId, (EFI_LBA)0, 0, NULL);\r
-        }\r
-        EfiClose (File);\r
-      }\r
-    }\r
-  }\r
-\r
   // Now we can print out the info...\r
   // Now we can print out the info...\r
-\r
   Max = EfiGetDeviceCounts (EfiOpenFirmwareVolume);\r
   if (Max != 0) {\r
     AsciiPrint ("Firmware Volume Devices:\n");\r
   Max = EfiGetDeviceCounts (EfiOpenFirmwareVolume);\r
   if (Max != 0) {\r
     AsciiPrint ("Firmware Volume Devices:\n");\r