Date: Wed, 3 Oct 2007 21:42:54 GMT From: Fredrik Lindberg <fli@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 127157 for review Message-ID: <200710032142.l93LgsUO098358@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127157 Change 127157 by fli@fli_nexus on 2007/10/03 21:42:45 - Add "header protection" defines. - Whitespace fix. - New printout control macros. - Add TRACE_* macros (function enter/leave). - Cast magic value to uint32_t (silence compiler). Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/debug.h#5 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/debug.h#5 (text+ko) ==== @@ -27,11 +27,14 @@ #include <assert.h> #include <stdint.h> +#ifndef _DEBUG_H_ +#define _DEBUG_H_ + /* * Bit-field values that controls debugging output */ #define DEBUG_NONE 0x0000 -#define DEBUG_WQUEUE 0x0001 +#define DEBUG_WQUEUE 0x0001 #define DEBUG_EVENT 0x0002 #define DEBUG_STACK 0x0004 #define DEBUG_BUF 0x0008 @@ -41,17 +44,18 @@ #define DEBUG_CACHE 0x0080 #define DEBUG_DBR 0x0100 #define DEBUG_CFG 0x0200 -#define DEBUG_CFGPARSE 0x0400 +#define DEBUG_CFGPARSE 0x0400 #define DEBUG_VAR 0x0800 #define DEBUG_MISC 0x1000 #define DEBUG_OA 0x2000 #define DEBUG_CS 0x4000 #define DEBUG_QUERY 0x8000 +#define DEBUG_TRACE 0x10000 /* * Structure initialization protection */ -#define MDNS_MAGIC_COOKIE 0xcafebabe +#define MDNS_MAGIC_COOKIE (uint32_t)0xcafebabe #ifdef DEBUG #define MAGIC(f) uint32_t f #define MDNS_INIT_SET(_md, f) (_md)->f = MDNS_MAGIC_COOKIE; @@ -79,3 +83,9 @@ # define HEXDUMP(buf, len) #endif +#define TRACE_ENTER dprintf(DEBUG_TRACE, "ENTER") +#define TRACE_LEAVE dprintf(DEBUG_TRACE, "LEAVE") +#define TRACE_LEAVE_SUCCESS dprintf(DEBUG_TRACE, "LEAVE SUCCESS") +#define TRACE_LEAVE_FAIL dprintf(DEBUG_TRACE, "LEAVE FAILURE") + +#endif /* _DEBUG_H_ */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710032142.l93LgsUO098358>