diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-22 01:50:14 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@gmail.com> | 2022-03-22 14:08:40 -0400 |
commit | f3cdace86c8b60a4efaced23b2d31c16dc610da9 (patch) | |
tree | e5f92c300aba9931f15e3aa92d3aa1fa06518788 /cmd_format.c | |
parent | 5c050d221353de74b36b085a79c414c678063203 (diff) |
cmd_format: verbose no longer on by default
Instead, we now have a -v option
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Diffstat (limited to 'cmd_format.c')
-rw-r--r-- | cmd_format.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/cmd_format.c b/cmd_format.c index 058d4154..d25163a7 100644 --- a/cmd_format.c +++ b/cmd_format.c @@ -46,6 +46,7 @@ x(0, version, required_argument) \ x(0, no_initialize, no_argument) \ x('f', force, no_argument) \ x('q', quiet, no_argument) \ +x('v', verbose, no_argument) \ x('h', help, no_argument) static void usage(void) @@ -73,6 +74,7 @@ static void usage(void) "\n" " -f, --force\n" " -q, --quiet Only print errors\n" + " -v, --verbose Verbose filesystem initialization\n" " -h, --help Display this help and exit\n" "\n" "Device specific options must come before corresponding devices, e.g.\n" @@ -116,7 +118,7 @@ int cmd_format(int argc, char *argv[]) darray(char *) device_paths; struct format_opts opts = format_opts_default(); struct dev_opts dev_opts = dev_opts_default(), *dev; - bool force = false, no_passphrase = false, quiet = false, initialize = true; + bool force = false, no_passphrase = false, quiet = false, initialize = true, verbose = false; unsigned v; int opt; @@ -128,7 +130,7 @@ int cmd_format(int argc, char *argv[]) struct bch_opts fs_opts = bch2_parse_opts(fs_opt_strs); while ((opt = getopt_long(argc, argv, - "-L:U:g:fqh", + "-L:U:g:fqhv", format_opts, NULL)) != -1) switch (opt) { @@ -208,6 +210,8 @@ int cmd_format(int argc, char *argv[]) case 'q': quiet = true; break; + case 'v': + verbose = true; case O_help: case 'h': usage(); @@ -259,7 +263,7 @@ int cmd_format(int argc, char *argv[]) struct bch_opts mount_opts = bch2_opts_empty(); - opt_set(mount_opts, verbose, true); + opt_set(mount_opts, verbose, verbose); /* * Start the filesystem once, to allocate the journal and create |