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

Grant Erickson gerickson at nuovations.com
Sat Aug 30 05:32:39 CEST 2008


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

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.

Regards,

Grant




More information about the U-Boot mailing list