From 35eb6cc0f30c3b808798be651e3f22014f959d61 Mon Sep 17 00:00:00 2001 From: wuchushun Date: Mon, 15 Jul 2024 16:02:05 +0800 Subject: [PATCH] [fdb_tsdb.c][read_sector_info]: fix read last valid tsl --- src/fdb_tsdb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fdb_tsdb.c b/src/fdb_tsdb.c index d019476..aa4905d 100644 --- a/src/fdb_tsdb.c +++ b/src/fdb_tsdb.c @@ -238,7 +238,7 @@ static fdb_err_t read_sector_info(fdb_tsdb_t db, uint32_t addr, tsdb_sec_info_t tsl.addr.index = sector->empty_idx; while (read_tsl(db, &tsl) == FDB_NO_ERR) { - if (tsl.status == FDB_TSL_UNUSED) { + if (tsl.status == FDB_TSL_UNUSED || tsl.status == FDB_TSL_PRE_WRITE) { break; } sector->end_time = tsl.time;