mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 16:11:56 +08:00
mtdconfig/nvs: return 0 when delete a non-exist kv
Deleting a non-existent key-value pair is deemed a successful deletion. Signed-off-by: zhaoxingyu1 <zhaoxingyu1@xiaomi.com>
This commit is contained in:
@@ -1923,7 +1923,7 @@ static ssize_t nvs_write(FAR struct nvs_fs *fs,
|
||||
|
||||
if (pdata->len == 0)
|
||||
{
|
||||
return -ENOENT;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user