aboutsummaryrefslogtreecommitdiff
path: root/include/sqfs
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-15 18:07:47 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-15 18:07:47 +0200
commit129e1758a5e2cf851f042e139fdd808a9be9ce94 (patch)
tree2d94d2135446afe659e94f57103d2e2eab26389c /include/sqfs
parent8ee3ee9c71418dbdb73d4350c17056024fb7ec41 (diff)
Move sparse_map_t to libsquashfs headers, rename it to sqfs_sparse_map_t
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include/sqfs')
-rw-r--r--include/sqfs/io.h14
-rw-r--r--include/sqfs/predef.h1
2 files changed, 15 insertions, 0 deletions
diff --git a/include/sqfs/io.h b/include/sqfs/io.h
index 9784113..cf6f1fa 100644
--- a/include/sqfs/io.h
+++ b/include/sqfs/io.h
@@ -120,6 +120,20 @@ struct sqfs_file_t {
int (*truncate)(sqfs_file_t *file, uint64_t size);
};
+/**
+ * @struct sqfs_sparse_map_t
+ *
+ * @brief Describes the layout of a sparse file.
+ *
+ * This structure is part of a linked list that indicates where the actual
+ * data is located in a sparse file.
+ */
+struct sqfs_sparse_map_t {
+ sqfs_sparse_map_t *next;
+ uint64_t offset;
+ uint64_t count;
+};
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/include/sqfs/predef.h b/include/sqfs/predef.h
index 7aac1a8..95d907f 100644
--- a/include/sqfs/predef.h
+++ b/include/sqfs/predef.h
@@ -68,6 +68,7 @@ typedef struct sqfs_meta_reader_t sqfs_meta_reader_t;
typedef struct sqfs_meta_writer_t sqfs_meta_writer_t;
typedef struct sqfs_xattr_reader_t sqfs_xattr_reader_t;
typedef struct sqfs_file_t sqfs_file_t;
+typedef struct sqfs_sparse_map_t sqfs_sparse_map_t;
typedef struct sqfs_fragment_t sqfs_fragment_t;
typedef struct sqfs_dir_header_t sqfs_dir_header_t;