summaryrefslogtreecommitdiff
path: root/bin/gensquashfs/options.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/options.c
parentb7877c45fc7fe47709c963e15214a3dd5fc71e32 (diff)
implement parser for xattr files as produced by getfattr --dump XXX
Diffstat (limited to 'bin/gensquashfs/options.c')
-rw-r--r--bin/gensquashfs/options.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/bin/gensquashfs/options.c b/bin/gensquashfs/options.c
index fc2d900..b554cb2 100644
--- a/bin/gensquashfs/options.c
+++ b/bin/gensquashfs/options.c
@@ -35,13 +35,14 @@ static struct option long_opts[] = {
#ifdef WITH_SELINUX
{ "selinux", required_argument, NULL, 's' },
#endif
+ { "xattr-file", required_argument, NULL, 'A' },
{ "sort-file", required_argument, NULL, 'S' },
{ "version", no_argument, NULL, 'V' },
{ "help", no_argument, NULL, 'h' },
{ NULL, 0, NULL, 0 },
};
-static const char *short_opts = "F:D:X:c:b:B:d:u:g:j:Q:S:kxoefqThV"
+static const char *short_opts = "F:D:X:c:b:B:d:u:g:j:Q:S:A:kxoefqThV"
#ifdef WITH_SELINUX
"s:"
#endif
@@ -107,6 +108,8 @@ static const char *help_string =
" --selinux, -s <file> Specify an SELinux label file to get context\n"
" attributes from.\n"
#endif
+" --xattr-file, -A <file> Specify an Xattr file to get extended attributes\n"
+" for loading xattrs\n"
" --keep-time, -k When using --pack-dir only, use the timestamps\n"
" from the input files instead of setting\n"
" defaults on all input paths.\n"
@@ -323,6 +326,9 @@ void process_command_line(options_t *opt, int argc, char **argv)
opt->selinux = optarg;
break;
#endif
+ case 'A':
+ opt->xattr_file = optarg;
+ break;
case 'S':
opt->sortfile = optarg;
break;