• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/mtd/ubi/

Lines Matching refs:vid_hdr

100 				  const struct ubi_vid_hdr *vid_hdr);
108 #define paranoid_check_vid_hdr(ubi, pnum, vid_hdr) 0
750 * @vid_hdr: the volume identifier header to check
753 * @vid_hdr. Returns zero if the VID header is OK and %1 if not.
756 const struct ubi_vid_hdr *vid_hdr)
758 int vol_type = vid_hdr->vol_type;
759 int copy_flag = vid_hdr->copy_flag;
760 int vol_id = ubi32_to_cpu(vid_hdr->vol_id);
761 int lnum = ubi32_to_cpu(vid_hdr->lnum);
762 int compat = vid_hdr->compat;
763 int data_size = ubi32_to_cpu(vid_hdr->data_size);
764 int used_ebs = ubi32_to_cpu(vid_hdr->used_ebs);
765 int data_pad = ubi32_to_cpu(vid_hdr->data_pad);
766 int data_crc = ubi32_to_cpu(vid_hdr->data_crc);
862 ubi_dbg_dump_vid_hdr(vid_hdr);
871 * @vid_hdr: &struct ubi_vid_hdr object where to store the read volume
876 * @pnum and stores it in @vid_hdr. It also checks CRC checksum of the read
890 struct ubi_vid_hdr *vid_hdr, int verbose)
899 p = (char *)vid_hdr - ubi->vid_hdr_shift;
917 magic = ubi32_to_cpu(vid_hdr->magic);
929 check_pattern(vid_hdr, 0xFF, UBI_VID_HDR_SIZE)) {
954 ubi_dbg_dump_vid_hdr(vid_hdr);
959 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
960 hdr_crc = ubi32_to_cpu(vid_hdr->hdr_crc);
966 ubi_dbg_dump_vid_hdr(vid_hdr);
972 err = validate_vid_hdr(ubi, vid_hdr);
985 * @vid_hdr: the volume identifier header to write
987 * This function writes the volume identifier header described by @vid_hdr to
989 * @vid_hdr->magic and the @vid_hdr->version fields, as well as calculates
990 * header CRC checksum and stores it at vid_hdr->hdr_crc.
997 struct ubi_vid_hdr *vid_hdr)
1010 vid_hdr->magic = cpu_to_ubi32(UBI_VID_HDR_MAGIC);
1011 vid_hdr->version = UBI_VERSION;
1012 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
1013 vid_hdr->hdr_crc = cpu_to_ubi32(crc);
1015 err = paranoid_check_vid_hdr(ubi, pnum, vid_hdr);
1019 p = (char *)vid_hdr - ubi->vid_hdr_shift;
1129 * @vid_hdr: the volume identifier header to check
1135 const struct ubi_vid_hdr *vid_hdr)
1140 magic = ubi32_to_cpu(vid_hdr->magic);
1147 err = validate_vid_hdr(ubi, vid_hdr);
1157 ubi_dbg_dump_vid_hdr(vid_hdr);
1176 struct ubi_vid_hdr *vid_hdr;
1179 vid_hdr = ubi_zalloc_vid_hdr(ubi);
1180 if (!vid_hdr)
1183 p = (char *)vid_hdr - ubi->vid_hdr_shift;
1189 crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_EC_HDR_SIZE_CRC);
1190 hdr_crc = ubi32_to_cpu(vid_hdr->hdr_crc);
1195 ubi_dbg_dump_vid_hdr(vid_hdr);
1201 err = paranoid_check_vid_hdr(ubi, pnum, vid_hdr);
1204 ubi_free_vid_hdr(ubi, vid_hdr);