kill off afs/debug.h

as reported by Marc Dionne, debug.h was still redefinining assert()

yeah, let's be done with that.

Change-Id: Icf2cf3db0f4972ebd4ee8cc0547e436b612e8bbc
Reviewed-on: http://gerrit.openafs.org/3194
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Derrick Brashear 2010-10-29 13:47:17 -04:00
parent 5e47d03ed3
commit af0951f373
7 changed files with 7 additions and 152 deletions

View File

@ -1506,7 +1506,6 @@
<File Id="filecm_vnodeops_H" Name="CM_VNO~1.h" LongName="cm_vnodeops.h" DiskId="1" src="$(var.IncDir)afs\cm_vnodeops.h" />
<File Id="filecm_volume_H" Name="CM_VOL~1.h" LongName="cm_volume.h" DiskId="1" src="$(var.IncDir)afs\cm_volume.h" />
<File Id="filecom_err_H" Name="com_err.h" LongName="com_err.h" DiskId="1" src="$(var.IncDir)afs\com_err.h" />
<File Id="filedebug_H" Name="debug.h" LongName="debug.h" DiskId="1" src="$(var.IncDir)afs\debug.h" />
<File Id="filedir_H" Name="dir.h" LongName="dir.h" DiskId="1" src="$(var.IncDir)afs\dir.h" />
<File Id="filedirpath_H" Name="dirpath.h" LongName="dirpath.h" DiskId="1" src="$(var.IncDir)afs\dirpath.h" />
<File Id="fileerrmap_nt_H" Name="ERRMAP~1.h" LongName="errmap_nt.h" DiskId="1" src="$(var.IncDir)afs\errmap_nt.h" />

View File

@ -46,8 +46,8 @@ LIBS=${TOP_LIBDIR}/libbudb.a \
${TOP_LIBDIR}/liblwp.a \
${TOP_LIBDIR}/libcmd.a \
${TOP_LIBDIR}/libcom_err.a \
${TOP_LIBDIR}/util.a \
${TOP_LIBDIR}/libusd.a \
${TOP_LIBDIR}/util.a \
${TOP_LIBDIR}/libprocmgmt.a
TESTOBJS=test.o
@ -85,8 +85,8 @@ tcstatus.o: tcstatus.c ${INCLS}
read_tape: read_tape.c
$(CC) $(AFS_CPPFLAGS) $(AFS_CFLAGS) $(AFS_LDFLAGS) \
-o read_tape ${srcdir}/read_tape.c \
${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/util.a \
${TOP_LIBDIR}/libusd.a
${TOP_LIBDIR}/libcmd.a ${TOP_LIBDIR}/libusd.a \
${TOP_LIBDIR}/util.a
# Errors
CFLAGS_tcudbprocs.o=@CFLAGS_NOERROR@

View File

@ -23,8 +23,7 @@ all: config mkvers \
${TOP_INCDIR}/afs/afs_args.h \
${TOP_INCDIR}/afs/icl.h \
${TOP_INCDIR}/afs/venus.h \
${TOP_INCDIR}/afs/vioc.h \
${TOP_INCDIR}/afs/debug.h
${TOP_INCDIR}/afs/vioc.h
buildtools: \
config \
@ -90,9 +89,6 @@ ${DEST}/include/afs/venus.h ${DESTDIR}${includedir}/afs/venus.h ${TOP_INCDIR}/af
${DEST}/include/afs/vioc.h ${DESTDIR}${includedir}/afs/vioc.h ${TOP_INCDIR}/afs/vioc.h: ${srcdir}/vioc.h
$(INST)
${DEST}/include/afs/debug.h ${DESTDIR}${includedir}/afs/debug.h ${TOP_INCDIR}/afs/debug.h: ${srcdir}/debug.h
$(INST)
# these are needed to compile the kernel. Config is necessary to
# convert the MakefileProto in libafs and the kernel links provide the
# kernel include environment. param.h is, well, param.h. The afs_sysnames.h
@ -104,8 +100,7 @@ install: ${DESTDIR}${includedir}/afs/param.h \
${DESTDIR}${includedir}/afs/afs_args.h \
${DESTDIR}${includedir}/afs/icl.h \
${DESTDIR}${includedir}/afs/venus.h \
${DESTDIR}${includedir}/afs/vioc.h \
${DESTDIR}${includedir}/afs/debug.h
${DESTDIR}${includedir}/afs/vioc.h
clean:
$(RM) -f *.o config mkvers core xprt AFS_component_version_number.c param.h.new Makefile.version.in
@ -116,6 +111,5 @@ dest: ${DEST}/include/afs/param.h \
${DEST}/include/afs/afs_args.h \
${DEST}/include/afs/icl.h \
${DEST}/include/afs/venus.h \
${DEST}/include/afs/vioc.h \
${DEST}/include/afs/debug.h
${DEST}/include/afs/vioc.h

View File

@ -17,7 +17,6 @@ INCFILEAFSDIR = $(INCFILEDIR)\afs
INCFILES =\
$(INCFILEDIR)\afsconfig.h \
$(INCFILEAFSDIR)\debug.h \
$(INCFILEAFSDIR)\stds.h \
$(INCFILEAFSDIR)\param.h \
$(INCFILEAFSDIR)\afs_sysnames.h \

View File

@ -1,135 +0,0 @@
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
/*
* All Rights Reserved
*/
#if !defined(OPENAFS_DEBUG_H)
#define OPENAFS_DEBUG_H
/*
* Define debugging levels, from 1 being lowest priority and 7 being
* highest priority. DEBUG_LEVEL_0 and DEBUG_FORCE_PRINT mean to
* print the message regardless of the current setting.
*/
#define DEBUG_LEVEL_0 0
#define DEBUG_LEVEL_1 01
#define DEBUG_LEVEL_2 03
#define DEBUG_LEVEL_3 07
#define DEBUG_LEVEL_4 017
#define DEBUG_LEVEL_5 037
#define DEBUG_LEVEL_6 077
#define DEBUG_LEVEL_7 0177
#define DEBUG_FORCE_PRINT DEBUG_LEVEL_0
#if defined(AFS_DEBUG)
/*
* Assert macro
*
* In kernel, panic.
* In user space call abort();
*/
#if defined(KERNEL)
#define assert(x) \
if(!(x)) { printf("assertion failed: line %d, file %s\n",\
__LINE__,__FILE__); osi_Panic("assert"); }
/*
* Debug modules
*/
#define CM_DEBUG 0 /* Cache Manager */
#define EX_DEBUG 1 /* Protocol Exporter */
#define HS_DEBUG 2 /* Host Module */
#define VL_DEBUG 3 /* Volume Module */
#define AG_DEBUG 4 /* Aggregate Module */
#define VR_DEBUG 5 /* Volume Registry Module */
#define RX_DEBUG 6 /* RPC/Rx Module */
#define XVFS_DEBUG 7 /* Xvnode Module */
#define NFSTR_DEBUG 8 /* NFS/AFS Translator Module */
#define XCRED_DEBUG 9 /* Extended Credential Module */
#define FP_DEBUG 10 /* Free Pool Module */
#define ACL_DEBUG 11 /* ACL Module */
#define FSHS_DEBUG 12 /* File server host module */
#define MAXMODS_DEBUG 20
#ifdef AFSDEBUG_DECLARE
/*
* Should get here only once per kernel instance!
*/
char afsdebug[MAXMODS_DEBUG] =
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
/*
* AFSLOG
*
* Compare the given debugging level against the setting of the particular
* index into the afsdebug char array. If there are bits in common, or else
* if if the level is DEBUG_FORCE_PRINT, then produce debugging output with
* the rest of the arguments provided.
*
* NOTE: This should become a macro!
*/
AFSLOG(index, level, a, b, c, d, e, f, g, h, i, j, k, l, m, n)
char index, level, *a, *b, *c, *d, *e, *f, *g, *h, *i, *j, *k, *l, *m,
*n;
{
if ((afsdebug[index] & level) || !level)
osi_dp(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
}
#else
extern char afsdebug[20];
#endif /* AFSDEBUG_DECLARE */
#else /* KERNEL */
#define assert(x) \
if(!(x)) { fprintf(stderr, "assertion failed: line %d, file %s\n",\
__LINE__,__FILE__); fflush(stderr); abort(); }
#endif /* KERNEL */
#else /* AFS_DEBUG */
#define assert(x)
#endif /* AFS_DEBUG */
/*
* Debugging macro package. The actual variables should be declared in
* debug.c
*/
#if defined(AFS_DEBUG)
#if defined(lint)
#define afs_dprintf(flag, str) printf str
#define dlprintf(flag, level, str) printf str
#define dmprintf(flag, bit, str) printf str
#else /* lint */
#define afs_dprintf(flag, str) \
(void)((flag) ? \
( osi_dp str, osi_dp("\t%s, %d\n", __FILE__, __LINE__)):0)
#define dlprintf(flag, level, str) afs_dprintf(((flag) >= (level)), str)
#define dmprintf(flag, bit, str) afs_dprintf(((flag)&(1<<((bit)-1))), str)
#endif /* lint */
#else /* AFS_DEBUG */
#define afs_dprintf(flag, str)
#define dlprintf(flag, level,str)
#define dmprintf(flag, bit, str)
#endif /* AFS_DEBUG */
#endif /* OPENAFS_DEBUG_H */

View File

@ -17,7 +17,6 @@
#include <afs/stds.h>
#include <afs/debug.h>
#include <ctype.h>
#include <string.h>

View File

@ -10,7 +10,6 @@
#include <afsconfig.h>
#include <afs/param.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
@ -37,8 +36,8 @@
#ifdef HAVE_STDINT_H
# include <stdint.h>
#endif
#include <afs/afs_assert.h>
#include <afs/debug.h>
#include "usd.h"
#ifdef O_LARGEFILE