/* ubi_get_volume_info - get information about UBI volume. @desc: volume descriptor @vi: the information is stored here  */
void ubi_get_volume_info(struct ubi_volume_desc *desc, struct ubi_volume_info *vi)
/* ubi_get_volume_info - get information about UBI volume. @desc: volume descriptor @vi: the information is stored here  */
void ubi_get_volume_info(struct ubi_volume_desc *desc, struct ubi_volume_info *vi)
{
	const struct ubi_volume *vol = desc->vol;
	const struct ubi_device *ubi = vol->ubi;
	vi->vol_id = vol->vol_id;
	vi->ubi_num = ubi->ubi_num;
	vi->size = vol->reserved_pebs;
	vi->used_bytes = vol->used_bytes;
	vi->vol_type = vol->vol_type;
	vi->corrupted = vol->corrupted;
	vi->upd_marker = vol->upd_marker;
	vi->alignment = vol->alignment;
	vi->usable_leb_size = vol->usable_leb_size;
	vi->name_len = vol->name_len;
	vi->name = vol->name;
	vi->cdev = vol->cdev.dev;
}