/* @ops: contains AVB ops handlers @partition: partition name (NUL-terminated UTF-8 string) @out_size_num_bytes: returns the value of a partition size */
static AvbIOResult get_size_of_partition(AvbOps *ops, const char *partition, u64 *out_size_num_bytes)
/* @ops: contains AVB ops handlers @partition: partition name (NUL-terminated UTF-8 string) @out_size_num_bytes: returns the value of a partition size */
static AvbIOResult get_size_of_partition(AvbOps *ops, const char *partition, u64 *out_size_num_bytes)
{
	struct mmc_part *part;
	if (!out_size_num_bytes)
		return AVB_IO_RESULT_ERROR_INSUFFICIENT_SPACE;
	part = get_partition(ops, partition);
	if (!part)
		return AVB_IO_RESULT_ERROR_NO_SUCH_PARTITION;
	*out_size_num_bytes = part->info.blksz * part->info.size;
	return AVB_IO_RESULT_OK;
}