From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus =?iso-8859-1?Q?Klotzb=FCcher?= Date: Sat, 30 Aug 2008 07:51:47 +0200 Subject: [U-Boot] [RFC] Suppressing Diagnostic Output for 'fw_setenv' In-Reply-To: References: Message-ID: <20080830055147.GA16108@lisa> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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")