[U-Boot] [RFC] Suppressing Diagnostic Output for 'fw_setenv'

Markus Klotzbücher mk at denx.de
Sat Aug 30 07:51:47 CEST 2008


Dear Grant,

On Fri, Aug 29, 2008 at 08:32:39PM -0700, Grant Erickson wrote:

> The u-boot companion command line tool 'fw_setenv' emits verbose output
> during a set operation of the form:
> 
>     Unlocking flash...
>     Done
>     Erasing old environment...
>     Done
>     Writing environment to /dev/mtd4...
>     Done
>     Locking ...
>     Done

I'm all with you.

> While this is nice for debugging and troubleshooting, it is a bit verbose in
> a production environment. I propose two alternatives for suppressing this
> output:
> 
> 1) Compile-time: Change 'printf' to 'debug' in which case the above
>    diagnostics will only be output when the tool is built with 'DEBUG'
>    asserted.
> 
> 2) Run-time: Change the implementation such that the invocation usage of
>    'fw_setenv' is:
> 
>     Usage: fw_setenv [ -q ] name [ value ... ]
> 
> I'd favor (2); however, I welcome strong opinions one way or another before
> I submit a patch.

I'd prefer (2) too, but I'd make it quiet by default:

Usage: fw_setenv [ -v ] name [ value ... ]

Best regards
Markus

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de")


More information about the U-Boot mailing list