From owner-p4-projects@FreeBSD.ORG Wed Oct 3 21:42:55 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4895716A46E; Wed, 3 Oct 2007 21:42:55 +0000 (UTC) Delivered-To: perforce@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C35CD16A420 for ; Wed, 3 Oct 2007 21:42:54 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 9C4C913C45D for ; Wed, 3 Oct 2007 21:42:54 +0000 (UTC) (envelope-from fli@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l93LgsEc098361 for ; Wed, 3 Oct 2007 21:42:54 GMT (envelope-from fli@FreeBSD.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l93LgsUO098358 for perforce@freebsd.org; Wed, 3 Oct 2007 21:42:54 GMT (envelope-from fli@FreeBSD.org) Date: Wed, 3 Oct 2007 21:42:54 GMT Message-Id: <200710032142.l93LgsUO098358@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to fli@FreeBSD.org using -f From: Fredrik Lindberg To: Perforce Change Reviews Cc: Subject: PERFORCE change 127157 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2007 21:42:55 -0000 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 #include +#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_ */