[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [bluetooth-dev] debug info



> -----Original Message-----
> From: Walter [mailto:Walter.van.Berkel@xxxxxxx.nl]
> Sent: 12 October 2000 11:52
> To: bluetooth-dev@xxxxxxx.com
> Subject: [bluetooth-dev] debug info
> 
> Hello, 
> I've got another question. 
> Could anybody explain how the debug info works? 
> 
> I don't understand what I got to do with this: 
> #define D_ERR(fmt, args...) printk(BT_SYS_STR" ERROR :" fmt, ## args)
> 
> The compiler doesn't understand it and I don't also
> 
> How can I use D_ERR, D_SYS, PRINTPKT etc.. 
> 
> Thnx again, 
> 
> W. 

D_ERR() & co are supposed to work just like printf() and printk().
That is, you have a format string, and possibly a number of arguments
according to that format string. The syntax above works with gcc at
least. You could try to replace the definition with:

	#define D_ERR(fmt...) printk(BT_SYS_STR" ERROR :" fmt)

as the other syntax has been deprecated in the latest versions of gcc.
If it still does not work you could try:

	#define D_ERR(...) printk(BT_SYS_STR" ERROR :" __VA_ARGS__)

which is the correct (but not as descriptive) way according to the
ISO C standard of 1999.

What compiler (and thus which pre-processor) are you using?

//Peter Kjellerstedt
Axis Communications AB