/* This function returns the device path protocol from the handle specified by Handle. If Handle is NULL or Handle does not contain a device path protocol, then NULL is returned. */
EFI_DEVICE_PATH_PROTOCOL* EFIAPI DevicePathFromHandle(IN EFI_HANDLE Handle)
/* This function returns the device path protocol from the handle specified by Handle. If Handle is NULL or Handle does not contain a device path protocol, then NULL is returned. */
EFI_DEVICE_PATH_PROTOCOL* EFIAPI DevicePathFromHandle(IN EFI_HANDLE Handle)
{
  EFI_DEVICE_PATH_PROTOCOL  *DevicePath;
  EFI_STATUS                Status;
  Status = gBS->HandleProtocol (
                  Handle,
                  &gEfiDevicePathProtocolGuid,
                  (VOID *)&DevicePath
                  );
  if (EFI_ERROR (Status)) {
    DevicePath = NULL;
  }
  return DevicePath;
}