Lines Matching defs:crc
156 lfs_block_t block, lfs_off_t off, lfs_size_t size, uint32_t *crc) {
169 *crc = lfs_crc(*crc, &dat, diff);
446 uint32_t crc;
451 fcrc->crc = lfs_fromle32(fcrc->crc);
457 fcrc->crc = lfs_tole32(fcrc->crc);
1126 uint32_t crc = lfs_crc(0xffffffff, &dir->rev, sizeof(dir->rev));
1144 crc = lfs_crc(crc, &tag, sizeof(tag));
1149 // we only might be erased if the last tag was a crc
1160 // check the crc attr
1173 if (crc != dcrc) {
1180 // toss our crc into the filesystem seed for
1181 // pseudorandom numbers, note we use another crc here
1184 lfs->seed = lfs_crc(lfs->seed, &crc, sizeof(crc));
1195 // reset crc, hasfcrc
1196 crc = 0xffffffff;
1200 // crc the entry first, hopefully leaving it in the cache
1204 lfs_tag_dsize(tag)-sizeof(tag), &crc);
1318 dir->erased = (fcrc_ == fcrc.crc);
1546 uint32_t crc;
1563 commit->crc = lfs_crc(commit->crc, buffer, size);
1622 // - 5-word crc with fcrc to check following prog (middle of block)
1623 // - 2-word crc with no following prog (end of block)
1631 // create crc tags to fill up remainder of commit, note that
1638 // too large for crc tag? need padding commits
1667 .crc = 0xffffffff
1671 commit->block, noff, fcrc.size, &fcrc.crc);
1686 // build commit crc
1689 uint32_t crc;
1695 commit->crc = lfs_crc(commit->crc, &ccrc.tag, sizeof(lfs_tag_t));
1696 ccrc.crc = lfs_tole32(commit->crc);
1708 crc1 = commit->crc;
1714 // reset crc for next commit
1715 commit->crc = 0xffffffff;
1733 uint32_t crc = 0xffffffff;
1736 commit->block, off, off1-off, &crc);
1741 // check non-padding commits against known crc
1742 if (crc != crc1) {
1746 // make sure to check crc in case we happen to pick
1747 // up an unrelated crc (frozen block?)
1750 commit->block, off1, sizeof(uint32_t), &crc);
1755 if (crc != 0) {
1936 .crc = 0xffffffff,
2021 // complete commit with crc
2102 // - crc: 4+4 = 8 bytes
2222 .crc = 0xffffffff,
2268 // finalize commit with the crc
5171 static void lfs1_crc(uint32_t *crc, const void *buffer, size_t size) {
5172 *crc = lfs_crc(*crc, buffer, size);
5184 lfs_off_t off, lfs_size_t size, uint32_t *crc) {
5192 lfs1_crc(crc, &c, 1);
5265 uint32_t crc = 0xffffffff;
5267 lfs1_crc(&crc, &test, sizeof(test));
5270 (0x7fffffff & test.size) - sizeof(test), &crc);
5278 if (crc != 0) {