Lines Matching defs:ebhdr
118 struct chfs_eb_hdr ebhdr;
129 ebhdr.ec_hdr.magic = htole32(CHFS_MAGIC_BITMASK);
130 ebhdr.ec_hdr.erase_cnt = htole32(1);
131 ebhdr.ec_hdr.crc_ec = htole32(crc32(0,
132 (uint8_t *)&ebhdr.ec_hdr + 8, 4));
134 memcpy(buf, &ebhdr.ec_hdr, CHFS_EB_EC_HDR_SIZE);
143 ebhdr.u.nand_hdr.lid = htole32(lebnumber++);
144 ebhdr.u.nand_hdr.serial = htole64(++(max_serial));
145 ebhdr.u.nand_hdr.crc = htole32(crc32(0,
146 (uint8_t *)&ebhdr.u.nand_hdr + 4,
148 memcpy(buf, &ebhdr.u.nand_hdr, CHFS_EB_HDR_NAND_SIZE);
150 ebhdr.u.nor_hdr.lid = htole32(lebnumber++);
151 ebhdr.u.nor_hdr.crc = htole32(crc32(0,
152 (uint8_t *)&ebhdr.u.nor_hdr + 4,
154 memcpy(buf, &ebhdr.u.nor_hdr, CHFS_EB_HDR_NOR_SIZE);