diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-06-11 01:57:26 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-06-11 15:36:08 +0200 |
commit | 259a98985b4f93347923d1b2c3aaa535397aaa89 (patch) | |
tree | 0a008ffc3d59cfaeffaf0aed7e79d53dd7eef081 /lib/sqfs/xattr | |
parent | ec5ba7eb521626a85d2ab22e97eb1298b2ff6f55 (diff) |
Add flags to functions that might logically be expanded in the future
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/xattr')
-rw-r--r-- | lib/sqfs/xattr/xattr_writer.c | 8 | ||||
-rw-r--r-- | lib/sqfs/xattr/xattr_writer_record.c | 5 |
2 files changed, 10 insertions, 3 deletions
diff --git a/lib/sqfs/xattr/xattr_writer.c b/lib/sqfs/xattr/xattr_writer.c index 9de3823..c33d366 100644 --- a/lib/sqfs/xattr/xattr_writer.c +++ b/lib/sqfs/xattr/xattr_writer.c @@ -81,10 +81,14 @@ static void xattr_writer_destroy(sqfs_object_t *obj) free(xwr); } -sqfs_xattr_writer_t *sqfs_xattr_writer_create(void) +sqfs_xattr_writer_t *sqfs_xattr_writer_create(sqfs_u32 flags) { - sqfs_xattr_writer_t *xwr = calloc(1, sizeof(*xwr)); + sqfs_xattr_writer_t *xwr; + if (flags != 0) + return NULL; + + xwr = calloc(1, sizeof(*xwr)); if (str_table_init(&xwr->keys, XATTR_KEY_BUCKETS)) goto fail_keys; diff --git a/lib/sqfs/xattr/xattr_writer_record.c b/lib/sqfs/xattr/xattr_writer_record.c index 7cc55b6..aa87246 100644 --- a/lib/sqfs/xattr/xattr_writer_record.c +++ b/lib/sqfs/xattr/xattr_writer_record.c @@ -37,8 +37,11 @@ static int compare_u64(const void *a, const void *b) return (lhs < rhs ? -1 : (lhs > rhs ? 1 : 0)); } -int sqfs_xattr_writer_begin(sqfs_xattr_writer_t *xwr) +int sqfs_xattr_writer_begin(sqfs_xattr_writer_t *xwr, sqfs_u32 flags) { + if (flags != 0) + return SQFS_ERROR_UNSUPPORTED; + xwr->kv_start = xwr->num_pairs; return 0; } |