diff options
Diffstat (limited to 'lib/sqfs/src')
-rw-r--r-- | lib/sqfs/src/xattr/xattr_writer_record.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/sqfs/src/xattr/xattr_writer_record.c b/lib/sqfs/src/xattr/xattr_writer_record.c index 81bbf6b..082331c 100644 --- a/lib/sqfs/src/xattr/xattr_writer_record.c +++ b/lib/sqfs/src/xattr/xattr_writer_record.c @@ -46,8 +46,8 @@ int sqfs_xattr_writer_begin(sqfs_xattr_writer_t *xwr, sqfs_u32 flags) return 0; } -int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr, const char *key, - const void *value, size_t size) +int sqfs_xattr_writer_add_kv(sqfs_xattr_writer_t *xwr, const char *key, + const void *value, size_t size) { size_t i, key_index, old_value_index, value_index; sqfs_u64 kv_pair; @@ -98,6 +98,12 @@ int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr, const char *key, return array_append(&xwr->kv_pairs, &kv_pair); } +int sqfs_xattr_writer_add(sqfs_xattr_writer_t *xwr, const sqfs_xattr_t *ent) +{ + return sqfs_xattr_writer_add_kv(xwr, ent->key, + ent->value, ent->value_len); +} + int sqfs_xattr_writer_end(sqfs_xattr_writer_t *xwr, sqfs_u32 *out) { kv_block_desc_t blk; |