[U-Boot] [PATCH] Make TFTP Quiet

Scott Wood scottwood at freescale.com
Tue Aug 11 01:33:59 CEST 2009


On Mon, Aug 10, 2009 at 03:55:20PM -0500, Timur Tabi wrote:
> > +#ifdef CONFIG_TFTP_QUIET
> > +#define puts_quiet(fmt)
> > +#else
> > +#define puts_quiet(fmt)                puts(fmt);
> > +#endif
> 
> This looks backwards to me.  I would do this:
> 
> #ifdef CONFIG_TFTP_QUIET
> #define puts(x) puts_quiet(x)
> #endif
> 
> That way, you don't need to change all of the puts calls to
> puts_quiet.   Plus, having the normal calls be "puts_quiet" that
> changes to puts when QUIET is *not* enabled just feels wrong.

I think the point was to establish two different functions a caller may
use -- puts() which always prints, and puts_quiet() which only prints
when the user hasn't asked for silence.

-Scott


More information about the U-Boot mailing list