Skip to content

Commit aeba337

Browse files
allow to disable validate operation
1 parent 28eb5c9 commit aeba337

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lfs.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ static int lfs_bd_flush_direct(lfs_t *lfs,
264264
return err;
265265
}
266266

267+
#ifdef LFS_CHECK_DATA
267268
if (validate) {
268269
// check data on disk
269270
lfs_cache_drop(lfs, rcache);
@@ -278,6 +279,10 @@ static int lfs_bd_flush_direct(lfs_t *lfs,
278279
return LFS_ERR_CORRUPT;
279280
}
280281
}
282+
#else
283+
(void)validate;
284+
(void)rcache;
285+
#endif
281286

282287
}
283288

0 commit comments

Comments
 (0)