From: NeilBrown <neilb@suse.com>
To: Jes.Sorensen@gmail.com
Cc: linux-raid@vger.kernel.org, Zhilong Liu <zlliu@suse.com>
Subject: Re: [PATCH] mdadm: Send version text to stdout rather than stderr
Date: Wed, 07 Jun 2017 11:44:03 +1000 [thread overview]
Message-ID: <877f0od124.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <1496735987-10653-1-git-send-email-zlliu@suse.com>
[-- Attachment #1: Type: text/plain, Size: 1126 bytes --]
On Tue, Jun 06 2017, Zhilong Liu wrote:
> This helps with piping to a paper.
It might help you, but it is an API change and could cause problems for
others.
Some programs, such as "mount -V", send version info to stdout.
Others, like "gcc -v", send it to stderr.
There is no uniform standard, it is best to leave the behavior
unchanged.
If you need to capture the output use
mdadm -V |& ...
or
mdadm -V 2>&1
or similar.
NeilBrtown
>
> Signed-off-by: Zhilong Liu <zlliu@suse.com>
> ---
> mdadm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mdadm.c b/mdadm.c
> index 70b16f2..0f736d7 100644
> --- a/mdadm.c
> +++ b/mdadm.c
> @@ -139,7 +139,7 @@ int main(int argc, char *argv[])
> continue;
>
> case 'V':
> - fputs(Version, stderr);
> + fputs(Version, stdout);
> exit(0);
>
> case 'v': c.verbose++;
> --
> 2.6.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2017-06-07 1:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-06 7:59 [PATCH] mdadm: Send version text to stdout rather than stderr Zhilong Liu
2017-06-07 1:44 ` NeilBrown [this message]
2017-06-07 2:11 ` Zhilong Liu
2017-06-07 15:21 ` Jes Sorensen
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=877f0od124.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=Jes.Sorensen@gmail.com \
--cc=linux-raid@vger.kernel.org \
--cc=zlliu@suse.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox