1
0
Fork 0
forked from len0rd/rockbox

Tie NVRAM CRC to NVRAM_BLOCK_SIZE

by tying initial to NVRAM_BLOCK_SIZE we get automatic invalidation when the
system_status struct changes

Change-Id: Icd8fad14bdd31dddd609833830c939d5560feeb1
This commit is contained in:
William Wilgus 2025-01-19 00:23:13 -05:00 committed by William Wilgus
parent 4e271642df
commit af859acf04

View file

@ -146,7 +146,7 @@ long lasttime = 0;
static unsigned int nvram_crc(char *buf, int max_len) static unsigned int nvram_crc(char *buf, int max_len)
{ {
return crc_32(&buf[NVRAM_DATA_START], max_len - NVRAM_DATA_START - 1, 0xffffffff); return crc_32(&buf[NVRAM_DATA_START], max_len - NVRAM_DATA_START - 1, NVRAM_BLOCK_SIZE);
} }
static void read_nvram_data(void) static void read_nvram_data(void)