diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/lib/flash_ts.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/firmware/lib/flash_ts.c b/firmware/lib/flash_ts.c index 5f041749..25a46c17 100644 --- a/firmware/lib/flash_ts.c +++ b/firmware/lib/flash_ts.c @@ -13,7 +13,7 @@ // These match the linux driver #define FLASH_TS_MAGIC 0x53542a46 -#define FLASH_TS_HEADER_SIZE 24 +#define FLASH_TS_HEADER_SIZE 16 #define FLASH_TS_MAX_SIZE 16384 #define FLASH_TS_MAX_ELEMENT_SIZE (FLASH_TS_MAX_SIZE - FLASH_TS_HEADER_SIZE) @@ -113,6 +113,7 @@ static void flash_ts_scan_partition(flash_ts_state *ts) { } // It's good & newer than our current version + VBDEBUG(("Found good version %d\n", ts->temp.version)); ts->current_block = block; Memcpy(&ts->current, &ts->temp, sizeof(ts->current)); } @@ -336,7 +337,7 @@ int flash_ts_set(const char *key, const char *value) { if (ts->length + keylen + 1 + value_len + 1 > FLASH_TS_MAX_ELEMENT_SIZE) { // Not enough space, restore previous - VBDEBUG(("Not enough space to write %d data bytes\n", value_len)); + VBDEBUG(("Not enough space to write %d data bytes\n", (int)value_len)); Memcpy(&state.current, &state.temp, sizeof(state.temp)); return -1; } |