mirror of
https://github.com/apache/nuttx.git
synced 2026-05-20 12:33:27 +08:00
bugfix: reading expired content need in expired range
By obtaining the erase value to set the nvs special ID instead of using a fixed value Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
This commit is contained in:
@@ -201,7 +201,8 @@ static inline size_t nvs_buffer_size(FAR struct nvs_fs *fs)
|
||||
static inline bool nvs_ate_expired(FAR struct nvs_fs *fs,
|
||||
FAR struct nvs_ate *entry)
|
||||
{
|
||||
return entry->expired[nvs_align_up(fs, sizeof(*entry))] != fs->erasestate;
|
||||
return entry->expired[nvs_align_up(fs, sizeof(*entry)) - sizeof(*entry)] !=
|
||||
fs->erasestate;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
|
||||
Reference in New Issue
Block a user