summaryrefslogtreecommitdiff
path: root/unpack/options.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-19 17:36:53 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-09-20 18:34:16 +0200
commit37a1176c3191cd722de613e26eda91518ca73751 (patch)
tree037aedf6f9de72203130102c05fe1bdf956275e0 /unpack/options.c
parent5dcd267e9f0c5d93793e6d5e68279bd5dde5dff6 (diff)
Remove fstree code from rdsquashfs
Use the directory reader from libsquashfs instead. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/options.c')
-rw-r--r--unpack/options.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/unpack/options.c b/unpack/options.c
index c7689eb..190a78b 100644
--- a/unpack/options.c
+++ b/unpack/options.c
@@ -124,19 +124,19 @@ void process_command_line(options_t *opt, int argc, char **argv)
switch (i) {
case 'D':
- opt->rdtree_flags |= RDTREE_NO_DEVICES;
+ opt->rdtree_flags |= SQFS_TREE_NO_DEVICES;
break;
case 'S':
- opt->rdtree_flags |= RDTREE_NO_SOCKETS;
+ opt->rdtree_flags |= SQFS_TREE_NO_SOCKETS;
break;
case 'F':
- opt->rdtree_flags |= RDTREE_NO_FIFO;
+ opt->rdtree_flags |= SQFS_TREE_NO_FIFO;
break;
case 'L':
- opt->rdtree_flags |= RDTREE_NO_SLINKS;
+ opt->rdtree_flags |= SQFS_TREE_NO_SLINKS;
break;
case 'E':
- opt->rdtree_flags |= RDTREE_NO_EMPTY;
+ opt->rdtree_flags |= SQFS_TREE_NO_EMPTY;
break;
case 'C':
opt->flags |= UNPACK_CHMOD;
@@ -150,7 +150,6 @@ void process_command_line(options_t *opt, int argc, char **argv)
#ifdef HAVE_SYS_XATTR_H
case 'X':
opt->flags |= UNPACK_SET_XATTR;
- opt->rdtree_flags |= RDTREE_READ_XATTR;
break;
#endif
case 'T':
@@ -167,7 +166,6 @@ void process_command_line(options_t *opt, int argc, char **argv)
break;
case 'x':
opt->op = OP_RDATTR;
- opt->rdtree_flags |= RDTREE_READ_XATTR;
opt->cmdpath = get_path(opt->cmdpath, optarg);
break;
case 'l':
@@ -202,6 +200,10 @@ void process_command_line(options_t *opt, int argc, char **argv)
goto fail_arg;
}
+ if (opt->op == OP_LS || opt->op == OP_CAT || opt->op == OP_RDATTR) {
+ opt->rdtree_flags |= SQFS_TREE_NO_RECURSE;
+ }
+
if (optind >= argc) {
fputs("Missing image argument\n", stderr);
goto fail_arg;