On Wed, 27 Sep 2023 10:52:19 +0800 Xiao Ni <xni@xxxxxxxxxx> wrote: > The version information is not error information. Print it > to stdout. > > Signed-off-by: Xiao Ni <xni@xxxxxxxxxx> > --- > 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@xxxxxxxxxxxxxxx> Thanks, Mariusz