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));
827 * @vid_hdr: the volume identifier header to check
830 * @vid_hdr. Returns zero if the VID header is OK and %1 if not.
833 const struct ubi_vid_hdr *vid_hdr)
835 int vol_type = vid_hdr->vol_type;
836 int copy_flag = vid_hdr->copy_flag;
837 int vol_id = be32_to_cpu(vid_hdr->vol_id);
838 int lnum = be32_to_cpu(vid_hdr->lnum);
839 int compat = vid_hdr->compat;
840 int data_size = be32_to_cpu(vid_hdr->data_size);
841 int used_ebs = be32_to_cpu(vid_hdr->used_ebs);
842 int data_pad = be32_to_cpu(vid_hdr->data_pad);
843 int data_crc = be32_to_cpu(vid_hdr->data_crc);
944 ubi_dump_vid_hdr(vid_hdr);
969 struct ubi_vid_hdr *vid_hdr = ubi_get_vid_hdr(vidb);
980 magic = be32_to_cpu(vid_hdr->magic);
985 if (ubi_check_pattern(vid_hdr, 0xFF, UBI_VID_HDR_SIZE)) {
1000 ubi_dump_vid_hdr(vid_hdr);
1007 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
1008 hdr_crc = be32_to_cpu(vid_hdr->hdr_crc);
1014 ubi_dump_vid_hdr(vid_hdr);
1024 err = validate_vid_hdr(ubi, vid_hdr);
1039 * This function writes the volume identifier header described by @vid_hdr to
1051 struct ubi_vid_hdr *vid_hdr = ubi_get_vid_hdr(vidb);
1063 vid_hdr->magic = cpu_to_be32(UBI_VID_HDR_MAGIC);
1064 vid_hdr->version = UBI_VERSION;
1065 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
1066 vid_hdr->hdr_crc = cpu_to_be32(crc);
1068 err = self_check_vid_hdr(ubi, pnum, vid_hdr);
1191 * @vid_hdr: the volume identifier header to check
1197 const struct ubi_vid_hdr *vid_hdr)
1205 magic = be32_to_cpu(vid_hdr->magic);
1212 err = validate_vid_hdr(ubi, vid_hdr);
1222 ubi_dump_vid_hdr(vid_hdr);
1241 struct ubi_vid_hdr *vid_hdr;
1251 vid_hdr = ubi_get_vid_hdr(vidb);
1258 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
1259 hdr_crc = be32_to_cpu(vid_hdr->hdr_crc);
1264 ubi_dump_vid_hdr(vid_hdr);
1270 err = self_check_vid_hdr(ubi, pnum, vid_hdr);