/* @part_name: Named partition to lookup @dev_desc: Pointer to returned blk_desc pointer @part_info: Pointer to returned disk_partition_t @response: Pointer to fastboot response buffer  */
int fastboot_mmc_get_part_info(const char *part_name, struct blk_desc **dev_desc, disk_partition_t *part_info, char *response)
/* @part_name: Named partition to lookup @dev_desc: Pointer to returned blk_desc pointer @part_info: Pointer to returned disk_partition_t @response: Pointer to fastboot response buffer  */
int fastboot_mmc_get_part_info(const char *part_name, struct blk_desc **dev_desc, disk_partition_t *part_info, char *response)
{
	int r;
	*dev_desc = blk_get_dev("mmc", CONFIG_FASTBOOT_FLASH_MMC_DEV);
	if (!*dev_desc) {
		fastboot_fail("block device not found", response);
		return -ENOENT;
	}
	if (!part_name || !strcmp(part_name, "")) {
		fastboot_fail("partition not given", response);
		return -ENOENT;
	}
	r = part_get_info_by_name_or_alias(*dev_desc, part_name, part_info);
	if (r < 0) {
		fastboot_fail("partition not found", response);
		return r;
	}
	return r;
}