mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>,
	Sascha Hauer <sha@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/4] commands: mount: replace printf by pr_info
Date: Tue, 25 May 2021 14:28:22 +0200	[thread overview]
Message-ID: <ea89c1cc-0f04-99d6-f36f-edcb77537f5a@pengutronix.de> (raw)
In-Reply-To: <20210525084255.vhy5vtxrgvmfowt7@pengutronix.de>



On 25.05.21 10:42, Marco Felsch wrote:
> On 21-05-25 07:15, Sascha Hauer wrote:
>> On Fri, May 21, 2021 at 06:34:32PM +0200, Marco Felsch wrote:
>>> This allows us to control the output behaviour e.g. booting silently
>>> to improve boot time.
>>>
>>> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
>>> ---
>>>  commands/mount.c | 2 +-
>>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/commands/mount.c b/commands/mount.c
>>> index ff1d8bc5e5..bb2d1d60f4 100644
>>> --- a/commands/mount.c
>>> +++ b/commands/mount.c
>>> @@ -74,7 +74,7 @@ static int do_mount(int argc, char *argv[])
>>>  		if (IS_ERR(path))
>>>  			return PTR_ERR(path);
>>>  
>>> -		printf("mounted /dev/%s on %s\n", devstr, path);
>>> +		pr_info("mounted /dev/%s on %s\n", devstr, path);
>>
>> Applied all except this one. This is the output from the mount command
>> and as such it should be printed with printf.
> 
> Okay, just out of curiosity. Why should we avoid pr_*() for commands?

One thing that comes to mind: pr_ goes into log (and then into pstore),
printf doesn't.
 
>> I have no good idea to quiesce such output as we don't have any output
>> redirection. Maybe we need an additional control knob for printf output.
> 
> This would be cool :)

I've patches lying around for $(cmd) which would capture the output,
but not print it directly if you don't echo it out. Would that help
you?

Cheers,
Ahmad

> 
> Regards,
>   Marco
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2021-05-25 12:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-21 16:34 [PATCH 0/4] Change printf behaviour Marco Felsch
2021-05-21 16:34 ` [PATCH 1/4] commands: mount: replace printf by pr_info Marco Felsch
2021-05-25  5:15   ` Sascha Hauer
2021-05-25  8:42     ` Marco Felsch
2021-05-25 12:28       ` Ahmad Fatoum [this message]
2021-05-21 16:34 ` [PATCH 2/4] common: boot: replace printf by pr_info/warn variants Marco Felsch
2021-05-21 16:34 ` [PATCH 3/4] common: bootm: replace printf by pr_err/info Marco Felsch
2021-05-21 16:34 ` [PATCH 4/4] common: oftree: replace printf by pr_info Marco Felsch
2021-05-21 16:52 ` [PATCH 0/4] Change printf behaviour Marco Felsch

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=ea89c1cc-0f04-99d6-f36f-edcb77537f5a@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    --cc=sha@pengutronix.de \
    --subject='Re: [PATCH 1/4] commands: mount: replace printf by pr_info' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox