diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-04 23:30:58 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-05-05 00:10:28 +0200 |
commit | da5656a8a696863e0d9941091c09c75b03a6070b (patch) | |
tree | 175f713894fda83722be311e6b66bb957da11eaa /mkfs/options.c | |
parent | a2750dee0e4c374ae51f83eead7eb7df3c018d95 (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 'mkfs/options.c')
-rw-r--r-- | mkfs/options.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mkfs/options.c b/mkfs/options.c index 4d49a9b..0a556eb 100644 --- a/mkfs/options.c +++ b/mkfs/options.c @@ -17,11 +17,12 @@ static struct option long_opts[] = { { "dev-block-size", required_argument, NULL, 'B' }, { "defaults", required_argument, NULL, 'd' }, { "force", no_argument, NULL, 'f' }, + { "quiet", no_argument, NULL, 'q' }, { "version", no_argument, NULL, 'V' }, { "help", no_argument, NULL, 'h' }, }; -static const char *short_opts = "c:b:B:d:fhV"; +static const char *short_opts = "c:b:B:d:fqhV"; enum { DEF_UID = 0, @@ -97,6 +98,7 @@ static const char *help_string = " mtime=<value> 0 if not set.\n" "\n" " --force, -f Overwrite the output file if it exists.\n" +" --quiet, -q Do not print out progress reports.\n" " --help, -h Print help text and exit.\n" " --version, -V Print version information and exit.\n" "\n"; @@ -260,6 +262,9 @@ void process_command_line(options_t *opt, int argc, char **argv) case 'f': opt->outmode = O_WRONLY | O_CREAT | O_TRUNC; break; + case 'q': + opt->quiet = true; + break; case 'h': printf(help_string, __progname, SQFS_DEFAULT_BLOCK_SIZE, SQFS_DEVBLK_SIZE); |