All of lore.kernel.org
 help / color / mirror / Atom feed
From: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
To: Goffredo Baroncelli <kreijack@gmail.com>, <linux-btrfs@vger.kernel.org>
Cc: Goffredo Baroncelli <kreijack@inwind.it>
Subject: Re: [PATCH 1/7] Add -v -q switches to mkfs.btrfs.
Date: Tue, 16 Dec 2014 13:56:19 +0900	[thread overview]
Message-ID: <548FBB73.7030003@jp.fujitsu.com> (raw)
In-Reply-To: <1418673780-22000-2-git-send-email-kreijack@inwind.it>

(2014/12/16 5:02), Goffredo Baroncelli wrote:
> Add -v -q switches to mkfs.btrfs, to control the verbosity of mkfs.btrfs.
> 
> Signed-off-by: Goffredo Baroncelli <kreijack@inwind.it>

Although this patch provides the interface of two new switches,
it doesn't work at all only by this patch. I consider providing
switch and its implementation at the same time is better.

So, I suggest you to ....

 a) merge "adding -v switch" part of this patch into 3/7, and
 b) merge "adding -q switch" part of this patch into 6/7 or
    Apply this part after 6/7 (without code for -q switch).

Thanks,
Satoru

> ---
>   mkfs.c | 16 ++++++++++++++--
>   1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/mkfs.c b/mkfs.c
> index e10e62d..26f8041 100644
> --- a/mkfs.c
> +++ b/mkfs.c
> @@ -288,8 +288,10 @@ static void print_usage(void)
>   	fprintf(stderr, "\t -r --rootdir the source directory\n");
>   	fprintf(stderr, "\t -K --nodiscard do not perform whole device TRIM\n");
>   	fprintf(stderr, "\t -O --features comma separated list of filesystem features\n");
> +	fprintf(stderr, "\t -q --quiet enable quiet mode\n");
>   	fprintf(stderr, "\t -U --uuid specify the filesystem UUID\n");
>   	fprintf(stderr, "\t -V --version print the mkfs.btrfs version and exit\n");
> +	fprintf(stderr, "\t -v --verbose enable verbose mode\n");
>   	fprintf(stderr, "%s\n", BTRFS_BUILD_VERSION);
>   	exit(1);
>   }
> @@ -351,6 +353,8 @@ static struct option long_options[] = {
>   	{ "version", 0, NULL, 'V' },
>   	{ "rootdir", 1, NULL, 'r' },
>   	{ "nodiscard", 0, NULL, 'K' },
> +	{ "verbose", 0, NULL, 'v' },
> +	{ "quiet", 0, NULL, 'q' },
>   	{ "features", 1, NULL, 'O' },
>   	{ "uuid", required_argument, NULL, 'U' },
>   	{ NULL, 0, NULL, 0}
> @@ -998,7 +1002,7 @@ out:
>    * This ignores symlinks with unreadable targets and subdirs that can't
>    * be read.  It's a best-effort to give a rough estimate of the size of
>    * a subdir.  It doesn't guarantee that prepopulating btrfs from this
> - * tree won't still run out of space.
> + * tree won't still run out of space.
>    *
>    * The rounding up to 4096 is questionable.  Previous code used du -B 4096.
>    */
> @@ -1266,6 +1270,8 @@ int main(int ac, char **av)
>   	int discard = 1;
>   	int ssd = 0;
>   	int force_overwrite = 0;
> +	int verbose = 0;
> +	int quiet = 0;
>   
>   	char *source_dir = NULL;
>   	int source_dir_set = 0;
> @@ -1355,6 +1361,12 @@ int main(int ac, char **av)
>   			case 'K':
>   				discard = 0;
>   				break;
> +			case 'v':
> +				verbose = 1;
> +				break;
> +			case 'q':
> +				quiet = 1;
> +				break;
>   			default:
>   				print_usage();
>   		}
> @@ -1387,7 +1399,7 @@ int main(int ac, char **av)
>   			exit(1);
>   		}
>   	}
> -	
> +
>   	while (dev_cnt-- > 0) {
>   		file = av[optind++];
>   		if (is_block_device(file))
> 


  reply	other threads:[~2014-12-16  4:58 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-15 20:02 [RFC][BTRFS-PROGS] Improve output of mkfs.btrfs command Goffredo Baroncelli
2014-12-15 20:02 ` [PATCH 1/7] Add -v -q switches to mkfs.btrfs Goffredo Baroncelli
2014-12-16  4:56   ` Satoru Takeuchi [this message]
2014-12-15 20:02 ` [PATCH 2/7] Move group_profile_str() in utils.c Goffredo Baroncelli
2014-12-15 20:02 ` [PATCH 3/7] Add verbose option to btrfs_add_to_fsid() Goffredo Baroncelli
2014-12-15 20:02 ` [PATCH 4/7] Add strdup in btrfs_add_to_fsid() to track the device path Goffredo Baroncelli
2014-12-15 20:02 ` [PATCH 5/7] Return the fsid from make_btrfs() Goffredo Baroncelli
2014-12-15 20:02 ` [PATCH 6/7] Print the summary Goffredo Baroncelli
2014-12-16  1:58   ` Duncan
2014-12-16  3:47     ` Robert White
2014-12-16  9:05       ` Hugo Mills
2014-12-16 21:40         ` Duncan
2014-12-18  5:44         ` Robert White
2014-12-18  8:41           ` Terminology (was Re: [PATCH 6/7] Print the summary) Hugo Mills
2014-12-22 18:38             ` David Sterba
2014-12-17 18:59     ` [PATCH 6/7] Print the summary Goffredo Baroncelli
2014-12-16  3:27   ` Satoru Takeuchi
2014-12-15 20:03 ` [PATCH 7/7] Add -v and -o switches Goffredo Baroncelli
2014-12-16  3:23 ` [RFC][BTRFS-PROGS] Improve output of mkfs.btrfs command Satoru Takeuchi
2014-12-17 19:49   ` Goffredo Baroncelli
2014-12-17 14:29 ` David Sterba
2014-12-17 15:08 ` Holger Hoffstätte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548FBB73.7030003@jp.fujitsu.com \
    --to=takeuchi_satoru@jp.fujitsu.com \
    --cc=kreijack@gmail.com \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.