return FileBuffer;\r
}\r
\r
+ Status = gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &TempDevicePath, &Handle);\r
+ ASSERT_EFI_ERROR (Status);\r
+\r
//\r
- // For device boot option only pointing to the removable device handle, \r
- // should make sure all its children handles (its child partion or media handles) are created and connected. \r
+ // For device boot option only pointing to the removable device handle,\r
+ // should make sure all its children handles (its child partion or media handles)\r
+ // are created and connected.\r
//\r
gBS->ConnectController (Handle, NULL, NULL, TRUE);\r
\r
// returned. After the Block IO protocol is reinstalled, subsequent\r
// Block IO read/write will success.\r
//\r
- Status = gBS->LocateDevicePath (&gEfiBlockIoProtocolGuid, &TempDevicePath, &Handle);\r
- ASSERT_EFI_ERROR (Status);\r
Status = gBS->HandleProtocol (Handle, &gEfiBlockIoProtocolGuid, (VOID **) &BlockIo);\r
ASSERT_EFI_ERROR (Status);\r
Buffer = AllocatePool (BlockIo->Media->BlockSize);\r