summaryrefslogtreecommitdiff
path: root/bin/gensquashfs/mkfs.c
diff options
context:
space:
mode:
authorEnno Boland <g@s01.de>2021-12-16 19:22:23 +0100
committerDavid Oberhollenzer <goliath@infraroot.at>2022-11-07 15:39:15 +0100
commitc7cd8bd5edeca20f1807dfc5ac7127417509e77a (patch)
tree0a93a1a3de4f06cab9df00a3d382e16b18728116 /bin/gensquashfs/mkfs.c
parentb7877c45fc7fe47709c963e15214a3dd5fc71e32 (diff)
implement parser for xattr files as produced by getfattr --dump XXX
Diffstat (limited to 'bin/gensquashfs/mkfs.c')
-rw-r--r--bin/gensquashfs/mkfs.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/gensquashfs/mkfs.c b/bin/gensquashfs/mkfs.c
index cb891f9..171a887 100644
--- a/bin/gensquashfs/mkfs.c
+++ b/bin/gensquashfs/mkfs.c
@@ -143,6 +143,7 @@ int main(int argc, char **argv)
int status = EXIT_FAILURE;
istream_t *sortfile = NULL;
void *sehnd = NULL;
+ void *xattrmap = NULL;
sqfs_writer_t sqfs;
options_t opt;
@@ -156,6 +157,11 @@ int main(int argc, char **argv)
if (sehnd == NULL)
goto out;
}
+ if (opt.xattr_file != NULL) {
+ xattrmap = xattr_open_map_file(opt.xattr_file);
+ if (xattrmap == NULL)
+ goto out;
+ }
if (opt.sortfile != NULL) {
sortfile = istream_open_file(opt.sortfile);
@@ -180,7 +186,7 @@ int main(int argc, char **argv)
goto out;
if (opt.infile == NULL) {
- if (xattrs_from_dir(&sqfs.fs, opt.packdir, sehnd,
+ if (xattrs_from_dir(&sqfs.fs, opt.packdir, sehnd, xattrmap,
sqfs.xwr, opt.scan_xattr)) {
goto out;
}