/* @handle: handle to be checked Return: status code  */
static efi_status_t check_node_type(efi_handle_t handle)
/* @handle: handle to be checked Return: status code  */
static efi_status_t check_node_type(efi_handle_t handle)
{
	efi_status_t r, ret = EFI_SUCCESS;
	const struct efi_device_path *dp;
	r = EFI_CALL(systab.boottime->open_protocol(
			handle, &efi_guid_device_path, (void **)&dp,
			NULL, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL));
	if (r == EFI_SUCCESS && dp) {
		const struct efi_device_path *node = efi_dp_last_node(dp);
		if (!node || node->type == DEVICE_PATH_TYPE_MEDIA_DEVICE)
			ret = EFI_UNSUPPORTED;
	}
	return ret;
}