Lines Matching defs:vid_hdr
87 const struct ubi_vid_hdr *vid_hdr);
465 struct ubi_vid_hdr vid_hdr;
483 ubi_init_vid_buf(ubi, &vidb, &vid_hdr);
484 ubi_assert(&vid_hdr == ubi_get_vid_hdr(&vidb));
834 * @vid_hdr: the volume identifier header to check
837 * @vid_hdr. Returns zero if the VID header is OK and %1 if not.
840 const struct ubi_vid_hdr *vid_hdr)
842 int vol_type = vid_hdr->vol_type;
843 int copy_flag = vid_hdr->copy_flag;
844 int vol_id = be32_to_cpu(vid_hdr->vol_id);
845 int lnum = be32_to_cpu(vid_hdr->lnum);
846 int compat = vid_hdr->compat;
847 int data_size = be32_to_cpu(vid_hdr->data_size);
848 int used_ebs = be32_to_cpu(vid_hdr->used_ebs);
849 int data_pad = be32_to_cpu(vid_hdr->data_pad);
850 int data_crc = be32_to_cpu(vid_hdr->data_crc);
946 ubi_dump_vid_hdr(vid_hdr);
971 struct ubi_vid_hdr *vid_hdr = ubi_get_vid_hdr(vidb);
982 magic = be32_to_cpu(vid_hdr->magic);
987 if (ubi_check_pattern(vid_hdr, 0xFF, UBI_VID_HDR_SIZE)) {
1002 ubi_dump_vid_hdr(vid_hdr);
1009 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
1010 hdr_crc = be32_to_cpu(vid_hdr->hdr_crc);
1016 ubi_dump_vid_hdr(vid_hdr);
1026 err = validate_vid_hdr(ubi, vid_hdr);
1041 * This function writes the volume identifier header described by @vid_hdr to
1053 struct ubi_vid_hdr *vid_hdr = ubi_get_vid_hdr(vidb);
1065 vid_hdr->magic = cpu_to_be32(UBI_VID_HDR_MAGIC);
1066 vid_hdr->version = UBI_VERSION;
1067 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
1068 vid_hdr->hdr_crc = cpu_to_be32(crc);
1070 err = self_check_vid_hdr(ubi, pnum, vid_hdr);
1193 * @vid_hdr: the volume identifier header to check
1199 const struct ubi_vid_hdr *vid_hdr)
1207 magic = be32_to_cpu(vid_hdr->magic);
1214 err = validate_vid_hdr(ubi, vid_hdr);
1224 ubi_dump_vid_hdr(vid_hdr);
1243 struct ubi_vid_hdr *vid_hdr;
1253 vid_hdr = ubi_get_vid_hdr(vidb);
1260 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
1261 hdr_crc = be32_to_cpu(vid_hdr->hdr_crc);
1266 ubi_dump_vid_hdr(vid_hdr);
1272 err = self_check_vid_hdr(ubi, pnum, vid_hdr);