aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/common/writer.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/common/writer.c b/lib/common/writer.c
index a4b764a..1221358 100644
--- a/lib/common/writer.c
+++ b/lib/common/writer.c
@@ -215,14 +215,16 @@ int sqfs_writer_finish(sqfs_writer_t *sqfs, const sqfs_writer_cfg_t *cfg)
return -1;
}
- if (!cfg->quiet)
- fputs("Writing extended attributes...\n", stdout);
+ if (!cfg->no_xattr) {
+ if (!cfg->quiet)
+ fputs("Writing extended attributes...\n", stdout);
- ret = sqfs_xattr_writer_flush(sqfs->xwr, sqfs->outfile,
- &sqfs->super, sqfs->cmp);
- if (ret) {
- sqfs_perror(cfg->filename, "writing extended attributes", ret);
- return -1;
+ ret = sqfs_xattr_writer_flush(sqfs->xwr, sqfs->outfile,
+ &sqfs->super, sqfs->cmp);
+ if (ret) {
+ sqfs_perror(cfg->filename, "writing extended attributes", ret);
+ return -1;
+ }
}
sqfs->super.bytes_used = sqfs->outfile->get_size(sqfs->outfile);