[patch 1/5] kexec debug output improvments

Vivek Goyal vgoyal at in.ibm.com
Tue May 8 12:02:22 EDT 2007


On Tue, May 08, 2007 at 07:36:45AM -0700, Geoff Levand wrote:
> Vivek Goyal wrote:
> > On Mon, May 07, 2007 at 05:02:47PM -0700, Geoff Levand wrote:
> >> +#define dprintf(args...) dfprintf(stdout, args)
> >>  #ifdef DEBUG
> >> -#define dfprintf(args...)	do {fprintf(args);} while(0)
> >> +#define dfprintf(_f, _args...) do {fprintf(_f, _args);} while(0)
> > 
> > Should't dprintf() also be inside #ifdef DEBUG?
> 
> Then you need two identical defs for dprintf.
> 

Nope. 

#ifdef DEBUG
#define dprintf()  fprintf()
#else
#define dprintf()  do{}while(0)
#endif

This is a debug print and should be enabled only if DEBUG is defined.

Thanks
Vivek




More information about the kexec mailing list