From: Felix Blanke <felixblanke@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Add -v option to btrfsctl to control verbosity: Be quiet unless requested.
Date: Sat, 22 Jan 2011 13:11:24 +0100 [thread overview]
Message-ID: <20110122121124.GA2564@scooter> (raw)
In-Reply-To: <4D3AC69A.2080302@gmx.de>
Hi,
btrfsctl is deprecated, why you're adding new options to it? :)
Regards,
Felix
On 22. January 2011 - 12:59, Maximilian Mehnert wrote:
> Date: Sat, 22 Jan 2011 12:59:22 +0100
> From: Maximilian Mehnert <maximilian.mehnert@gmx.de>
> To: linux-btrfs <linux-btrfs@vger.kernel.org>
> Subject: [PATCH] Add -v option to btrfsctl to control verbosity: Be quiet
> unless requested.
>
> ---
> btrfsctl.c | 10 ++++++++--
> 1 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/btrfsctl.c b/btrfsctl.c
> index 92bdf39..156ed62 100644
> --- a/btrfsctl.c
> +++ b/btrfsctl.c
> @@ -106,6 +106,7 @@ int main(int ac, char **av)
> char *pos;
> char *fullpath;
> u64 objectid = 0;
> + int verbose = 0;
> if (ac == 2 && strcmp(av[1], "-a") == 0) {
> fprintf(stderr, "Scanning for Btrfs filesystems\n");
> @@ -217,6 +218,9 @@ int main(int ac, char **av)
> }
> }
> }
> + else if (strcmp(av[i], "-v") == 0) {
> + verbose = 1;
> + }
> }
> if (command == 0) {
> fprintf(stderr, "no valid commands given\n");
> @@ -254,11 +258,13 @@ int main(int ac, char **av)
> exit(1);
> }
> if (ret == 0) {
> - printf("operation complete\n");
> + if (verbose) printf("operation complete\n");
> } else {
> printf("ioctl failed with error %d\n", ret);
> }
> - printf("%s\n", BTRFS_BUILD_VERSION);
> + if (verbose) {
> + printf("%s\n", BTRFS_BUILD_VERSION);
> + }
> if (ret)
> exit(1);
> -- 1.7.2.3
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
---end quoted text---
next prev parent reply other threads:[~2011-01-22 12:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-22 11:59 [PATCH] Add -v option to btrfsctl to control verbosity: Be quiet unless requested Maximilian Mehnert
2011-01-22 12:11 ` Felix Blanke [this message]
2011-01-22 12:26 ` Maximilian Mehnert
2011-01-22 12:46 ` Felix Blanke
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=20110122121124.GA2564@scooter \
--to=felixblanke@gmail.com \
--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.