Commit 1f4f4347 authored by Richard Weinberger's avatar Richard Weinberger Committed by Artem Bityutskiy

UBI: use own macros for the layout volume

This is a minor nicification: UBI_LAYOUT_VOLUME_TYPE and
UBI_LAYOUT_VOLUME_ALIGN are currently defined but not used -
use them.
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
parent 4a59c797
...@@ -322,7 +322,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si, ...@@ -322,7 +322,7 @@ static int create_vtbl(struct ubi_device *ubi, struct ubi_scan_info *si,
goto out_free; goto out_free;
} }
vid_hdr->vol_type = UBI_VID_DYNAMIC; vid_hdr->vol_type = UBI_LAYOUT_VOLUME_TYPE;
vid_hdr->vol_id = cpu_to_be32(UBI_LAYOUT_VOLUME_ID); vid_hdr->vol_id = cpu_to_be32(UBI_LAYOUT_VOLUME_ID);
vid_hdr->compat = UBI_LAYOUT_VOLUME_COMPAT; vid_hdr->compat = UBI_LAYOUT_VOLUME_COMPAT;
vid_hdr->data_size = vid_hdr->used_ebs = vid_hdr->data_size = vid_hdr->used_ebs =
...@@ -632,7 +632,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si, ...@@ -632,7 +632,7 @@ static int init_volumes(struct ubi_device *ubi, const struct ubi_scan_info *si,
return -ENOMEM; return -ENOMEM;
vol->reserved_pebs = UBI_LAYOUT_VOLUME_EBS; vol->reserved_pebs = UBI_LAYOUT_VOLUME_EBS;
vol->alignment = 1; vol->alignment = UBI_LAYOUT_VOLUME_ALIGN;
vol->vol_type = UBI_DYNAMIC_VOLUME; vol->vol_type = UBI_DYNAMIC_VOLUME;
vol->name_len = sizeof(UBI_LAYOUT_VOLUME_NAME) - 1; vol->name_len = sizeof(UBI_LAYOUT_VOLUME_NAME) - 1;
memcpy(vol->name, UBI_LAYOUT_VOLUME_NAME, vol->name_len + 1); memcpy(vol->name, UBI_LAYOUT_VOLUME_NAME, vol->name_len + 1);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment