/* Returns the opaque pointer to a physical disk context. */
VOID* HiiGetDiskContextCB(UINT8 DiskIndex)
/* Returns the opaque pointer to a physical disk context. */
VOID* HiiGetDiskContextCB(UINT8 DiskIndex)
{
  OPAL_DRIVER_DEVICE  *Dev;
  UINT8               CurrentDisk;
  Dev         = OpalDriverGetDeviceList ();
  CurrentDisk = 0;
  if (DiskIndex >= GetDeviceCount ()) {
    return NULL;
  }
  while (Dev != NULL) {
    if (CurrentDisk == DiskIndex) {
      return Dev;
    } else {
      Dev = Dev->Next;
      CurrentDisk++;
    }
  }
  return NULL;
}