aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUzi Erdenebileg <lzijbuan@gmail.com>2019-10-22 08:49:10 +0800
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-10-23 10:11:48 +0200
commitfe19ebb094c5c31533a23c6ab24317aae10ac230 (patch)
tree90df7346e1d2fe60c5bd602b1d3700d4a2260252
parent908449e1d50404278eb961ec8470781f1ba2deda (diff)
bugfix: Check no_xattr flag
-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);