]> git.ipfire.org Git - thirdparty/util-linux.git/commit
lib: Add crc32c function that can deal with holes
authorJeremy Linton <jeremy.linton@arm.com>
Fri, 14 Apr 2023 23:07:29 +0000 (18:07 -0500)
committerJeremy Linton <jeremy.linton@arm.com>
Fri, 14 Apr 2023 23:49:27 +0000 (18:49 -0500)
commit2598e25fb68ff37182fdb026b52055f177ceb24d
treefc3db365679ac371315af20d9062956710ad23d1
parent89779c1efc8643bdeea4f94c05f6254d5374ecf9
lib: Add crc32c function that can deal with holes

XFS, and possibly other filesystems expect that the CRC field
is excluded (or rather RAZ) during the CRC operation. Lets
create a generic helper that is similar to the CRC32 version
ul_crc32_exclude_offset() which computes the CRC while replacing
exclude_len bytes of exclude_off with zeros.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
include/crc32c.h
lib/crc32c.c