summaryrefslogtreecommitdiff
path: root/unpack/rdsquashfs.c
diff options
context:
space:
mode:
authorDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-04 23:30:58 +0200
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>2019-05-05 00:10:28 +0200
commitda5656a8a696863e0d9941091c09c75b03a6070b (patch)
tree175f713894fda83722be311e6b66bb957da11eaa /unpack/rdsquashfs.c
parenta2750dee0e4c374ae51f83eead7eb7df3c018d95 (diff)
Print out what we are doing on the way and options to keep quiet
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack/rdsquashfs.c')
-rw-r--r--unpack/rdsquashfs.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/unpack/rdsquashfs.c b/unpack/rdsquashfs.c
index c286a78..f09847d 100644
--- a/unpack/rdsquashfs.c
+++ b/unpack/rdsquashfs.c
@@ -20,11 +20,12 @@ static struct option long_opts[] = {
{ "no-empty-dir", no_argument, NULL, 'E' },
{ "chmod", no_argument, NULL, 'C' },
{ "chown", no_argument, NULL, 'O' },
+ { "quiet", no_argument, NULL, 'q' },
{ "help", no_argument, NULL, 'h' },
{ "version", no_argument, NULL, 'V' },
};
-static const char *short_opts = "l:c:u:p:DSFLCOEhV";
+static const char *short_opts = "l:c:u:p:DSFLCOEqhV";
static const char *help_string =
"Usage: %s [OPTIONS] <squashfs-file>\n"
@@ -48,7 +49,8 @@ static const char *help_string =
" --chmod, -C Change permission flags of unpacked files to those\n"
" store in the squashfs image.\n"
" --chown, -O Change ownership of unpacked files to the UID/GID\n"
-" set in the squashfs iamge.\n"
+" set in the squashfs image.\n"
+" --quiet, -q Do not print out progress while unpacking.\n"
"\n"
" --help, -h Print help text and exit.\n"
" --version, -V Print version information and exit.\n"
@@ -201,6 +203,9 @@ int main(int argc, char **argv)
case 'p':
cmdpath = get_path(cmdpath, optarg);
break;
+ case 'q':
+ info.flags |= UNPACK_QUIET;
+ break;
case 'h':
printf(help_string, __progname);
status = EXIT_SUCCESS;