From: Xiao Ni <xni@redhat.com>
To: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Cc: jes@trained-monkey.org, linux-raid@vger.kernel.org
Subject: Re: [PATCH 4/4] mdadm: Print version to stdout
Date: Sat, 7 Oct 2023 20:58:18 +0800 [thread overview]
Message-ID: <CALTww28fTVM1tUwZQrDKoqYPrweCtNW9cqAVgpUXf4zktnqMfw@mail.gmail.com> (raw)
In-Reply-To: <20230928115323.00001e3f@linux.intel.com>
On Thu, Sep 28, 2023 at 5:53 PM Mariusz Tkaczyk
<mariusz.tkaczyk@linux.intel.com> wrote:
>
> On Wed, 27 Sep 2023 10:52:19 +0800
> Xiao Ni <xni@redhat.com> wrote:
>
> > The version information is not error information. Print it
> > to stdout.
> >
> > Signed-off-by: Xiao Ni <xni@redhat.com>
> > ---
> > mdadm.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mdadm.c b/mdadm.c
> > index 076b45e030b3..0b8854baf1aa 100644
> > --- a/mdadm.c
> > +++ b/mdadm.c
> > @@ -128,7 +128,7 @@ int main(int argc, char *argv[])
> > continue;
> >
> > case 'V':
> > - fputs(Version, stderr);
> > + fputs(Version, stdout);
> > exit(0);
> >
> > case 'v': c.verbose++;
>
> I agree with this change but...
> This one is risky for users. I can realize that some users may check that
> from stderr because it is how we implemented it many years ago.
>
> I remember that I removed calls to mdam --help from dracut in the past:
> https://github.com/mtkaczyk/dracut/commit/d3d37003dcecdf01f6ae0f4764d74cd035aade73#diff-f2466410e3aff8aeba95038d29b1652581c97d8d7d9feb4011d7b8bc103de1b0L64
>
> And I can see that it does redirection "2>&1". I think that in general this kind
> of problem is handled this way, so overall I ready to take the risk of changing
> it to stdout by default.
>
> Reviewed-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
>
> Thanks,
> Mariusz
>
Hi Mariusz
Sorry for being late to respond. I just came back from holiday. Thanks
for the suggestion. It's right that it's risky to do so. I'll drop it
in the next version.
Regards
Xiao
prev parent reply other threads:[~2023-10-07 12:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-27 2:52 [PATCH 0/4] mdadm: Fix some errors for regression tests and building Xiao Ni
2023-09-27 2:52 ` [PATCH 1/4 v2] mdadm/tests: Fix regular expression failure Xiao Ni
2023-09-28 9:24 ` Mariusz Tkaczyk
2023-10-07 13:35 ` Xiao Ni
2023-10-26 21:39 ` Jes Sorensen
2023-09-27 2:52 ` [PATCH 2/4 v2] mdadm/tests: Don't run mknod before losetup Xiao Ni
2023-09-28 9:27 ` Mariusz Tkaczyk
2023-10-26 21:44 ` Jes Sorensen
2023-09-27 2:52 ` [PATCH 3/4] mdadm: Avoid array bounds check of gcc Xiao Ni
2023-09-27 4:29 ` Paul Menzel
2023-09-27 5:06 ` Xiao Ni
2023-09-28 9:41 ` Mariusz Tkaczyk
2023-10-07 13:26 ` Xiao Ni
2023-10-09 7:59 ` Mariusz Tkaczyk
2023-09-27 2:52 ` [PATCH 4/4] mdadm: Print version to stdout Xiao Ni
2023-09-28 9:53 ` Mariusz Tkaczyk
2023-10-07 12:58 ` Xiao Ni [this message]
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=CALTww28fTVM1tUwZQrDKoqYPrweCtNW9cqAVgpUXf4zktnqMfw@mail.gmail.com \
--to=xni@redhat.com \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
--cc=mariusz.tkaczyk@linux.intel.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;
as well as URLs for NNTP newsgroup(s).