Re: [PATCH v2 2/3] commands: test: replace printf with pr_err

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23-07-04, Sascha Hauer wrote:
> On Tue, Jul 04, 2023 at 01:29:20PM +0200, Marco Felsch wrote:
> > Replace the printf() with pr_err() to support:
> >  - color formated prints
> >  - logbuffer storing (dmesg)
> >  - loglevels
> > 
> > Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
> > ---
> > v2:
> >  - new patch
> > 
> >  commands/test.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/commands/test.c b/commands/test.c
> > index c1b84c42ef..5478011185 100644
> > --- a/commands/test.c
> > +++ b/commands/test.c
> > @@ -77,7 +77,7 @@ static int do_test(int argc, char *argv[])
> >  	if (*argv[0] == '[') {
> >  		argc--;
> >  		if (*argv[argc] != ']') {
> > -			printf("[: missing `]'\n");
> > +			pr_err("[: missing `]'\n");
> 
> Logging functions pr_* and dev_* should be used for core and driver
> messages, commands should use printf. The line between logging functions
> and commands is not always clear in barebox, but here it is.

Okay, thanks for clarification. I will drop the patch and send a v3.

Regards,
  Marco

> 
> Sascha
> 
> -- 
> Pengutronix e.K.                           |                             |
> Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
> 31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
> Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
> 




[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux