Skip to main content

Module util

Module util 

Source
Expand description

§Shared helpers for on-disk structures

Little-endian writer functions for placing typed values into raw byte buffers at known offsets, and a raw CRC32C matching the kernel’s format.

Functions§

csum_tree_block
Recompute the CRC32C checksum of a tree block and write it into the header.
raw_crc32c
Raw CRC32C matching the kernel’s crc32c() function.
write_le_u16
Write a little-endian u16 into buf at byte offset off.
write_le_u32
Write a little-endian u32 into buf at byte offset off.
write_le_u64
Write a little-endian u64 into buf at byte offset off.
write_uuid
Write a UUID (16 bytes) into buf at byte offset off.