Re: [PATCH 1/4] commands: mount: replace printf by pr_info

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

 




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@xxxxxxxxxxxxxx>
>>> ---
>>>  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@xxxxxxxxxxxxxxxxxxx
> 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@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



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

  Powered by Linux