summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/sqfs/xattr_writer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sqfs/xattr_writer.c b/lib/sqfs/xattr_writer.c
index fd35ca3..0360abc 100644
--- a/lib/sqfs/xattr_writer.c
+++ b/lib/sqfs/xattr_writer.c
@@ -566,6 +566,12 @@ int sqfs_xattr_writer_flush(sqfs_xattr_writer_t *xwr, sqfs_file_t *file,
size_t i, count;
int err;
+ if (xwr->num_pairs == 0 || xwr->num_blocks == 0) {
+ super->xattr_id_table_start = 0xFFFFFFFFFFFFFFFFUL;
+ super->flags |= SQFS_FLAG_NO_XATTRS;
+ return 0;
+ }
+
mw = sqfs_meta_writer_create(file, cmp, 0);
if (mw == NULL)
return SQFS_ERROR_ALLOC;