Skip to contentSkip to conversation

UBI io.c self_check_peb_vid_hdr().

DISCUSSION Bill Pringlemeir 1 participant 1 message Sep 9, 2013 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

This routine has,

static int self_check_peb_vid_hdr(const struct ubi_device *ubi, int pnum)

{
	int err;
	uint32_t crc, hdr_crc;
	struct ubi_vid_hdr *vid_hdr;
	void *p;
...
	crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_EC_HDR_SIZE_CRC);
                                                ^^^^

Shouldn't it be,

	crc = crc32(UBI_CRC32_INIT, vid_hdr, UBI_VID_HDR_SIZE_CRC);
                                                ^^^^^

Or are the structures assumed to be the same size?

Tia,
Bill Pringlemeir.