summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-29 19:27:28 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2020-05-29 19:49:11 +0200
commit577aae140e05f2b7cd140926443517260c0132b7 (patch)
tree13edf3ca12b02443259a05129e538e6f77339f06 /include
parent50b901d5ebdad40227de66cd5a0a0f62548f1563 (diff)
Block processor: add flags to manage hashing & sparse block detection
This commit adds 2 new user settable flags to the block processor: - A flag to ignore sparse blocks and treat them like normal data blocks. - A flag to disable checksum computation altogether. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/sqfs/block.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/include/sqfs/block.h b/include/sqfs/block.h
index 7cc815c..582f128 100644
--- a/include/sqfs/block.h
+++ b/include/sqfs/block.h
@@ -97,6 +97,19 @@ typedef enum {
SQFS_BLK_DONT_DEDUPLICATE = 0x0008,
/**
+ * @brief Supress sparse block detection.
+ *
+ * If set, sparse blocks are no longer checked and flagged as such and
+ * are instead processed like normal blocks.
+ */
+ SQFS_BLK_IGNORE_SPARSE = 0x0010,
+
+ /**
+ * @brief Don't compute block data checksums.
+ */
+ SQFS_BLK_DONT_HASH = 0x0020,
+
+ /**
* @brief Set by the @ref sqfs_block_processor_t if it determines a
* block of a file to be sparse, i.e. only zero bytes.
*/
@@ -135,7 +148,7 @@ typedef enum {
/**
* @brief The combination of all flags that are user settable.
*/
- SQFS_BLK_USER_SETTABLE_FLAGS = 0x000F,
+ SQFS_BLK_USER_SETTABLE_FLAGS = 0x003F,
} SQFS_BLK_FLAGS;
#endif /* SQFS_BLOCK_H */