aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-05 19:15:13 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2023-06-05 16:22:00 +0200
commit2d3cb9c4323a803268206db3a9363abc67d908d0 (patch)
treeebf126a48931b46f5d76c42818754dbf054c68b5 /include
parentc9a8adc15f9de110771156fdc85fb98533648a53 (diff)
libsqfs: Add an xattr writer function to add a combined key-value struct
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'include')
-rw-r--r--include/sqfs/xattr_writer.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/include/sqfs/xattr_writer.h b/include/sqfs/xattr_writer.h
index 8820e51..d8f8343 100644
--- a/include/sqfs/xattr_writer.h
+++ b/include/sqfs/xattr_writer.h
@@ -94,8 +94,24 @@ SQFS_API int sqfs_xattr_writer_begin(sqfs_xattr_writer_t *xwr, sqfs_u32 flags);
*
* @return Zero on success, a negative @ref SQFS_ERROR value on failure.
*/
-SQFS_API int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr, const char *key,
- const void *value, size_t size);
+SQFS_API int sqfs_xattr_writer_add_kv(sqfs_xattr_writer_t *xwr,
+ const char *key,
+ const void *value, size_t size);
+
+/**
+ * @brief Add a key-value struct to the current block.
+ *
+ * @memberof sqfs_xattr_writer_t
+ *
+ * To add a key string and value blob, use @ref sqfs_xattr_writer_add_kv
+ *
+ * @param xwr A pointer to an xattr writer instance.
+ * @param ent A pointer to a combined key-value pair.
+ *
+ * @return Zero on success, a negative @ref SQFS_ERROR value on failure.
+ */
+SQFS_API int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr,
+ const sqfs_xattr_t *ent);
/**
* @brief Finish a generating a key-value block.