WIP Added/fixed tests for noop writes (where bd error can't be trusted)

This commit is contained in:
Christopher Haster
2020-01-29 17:50:38 -06:00
parent 47ab0426b1
commit 5e839df234
6 changed files with 80 additions and 188 deletions

6
lfs.c
View File

@@ -1300,9 +1300,9 @@ static int lfs_dir_commitcrc(lfs_t *lfs, struct lfs_commit *commit) {
// check against written crc to detect if block is readonly
// (we may pick up old commits)
// TODO rm me?
// if (i == noff && crc != ncrc) {
// return LFS_ERR_CORRUPT;
// }
if (i == noff && crc != ncrc) {
return LFS_ERR_CORRUPT;
}
crc = lfs_crc(crc, &dat, 1);
}