From 5aa0f30173ecf3b6538b9136cb4783fc19266288 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Mon, 22 Mar 2021 11:30:15 +0100 Subject: Cleanup the block processor file structure A cleaner separation between common code, frontend code and backend code is made. The "is this byte blob zero" function is moved out to libutil (with test case and everything) with a more optimized implementation. Signed-off-by: David Oberhollenzer --- include/util.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include') diff --git a/include/util.h b/include/util.h index 6774be2..4b05340 100644 --- a/include/util.h +++ b/include/util.h @@ -30,4 +30,9 @@ void *alloc_array(size_t item_size, size_t nmemb); SQFS_INTERNAL sqfs_u32 xxh32(const void *input, const size_t len); +/* + Returns true if the given region of memory is filled with zero-bytes only. + */ +SQFS_INTERNAL bool is_memory_zero(const void *blob, size_t size); + #endif /* SQFS_UTIL_H */ -- cgit v1.2.3