From af0951f373224ce17b341bc5d227fdd5ea621762 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Fri, 29 Oct 2010 13:47:17 -0400 Subject: [PATCH] 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 Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear --- src/WINNT/install/wix/files.wxi | 1 - src/butc/Makefile.in | 6 +- src/config/Makefile.in | 12 +-- src/config/NTMakefile | 1 - src/config/debug.h | 135 -------------------------------- src/kauth/admin_tools.c | 1 - src/usd/usd_file.c | 3 +- 7 files changed, 7 insertions(+), 152 deletions(-) delete mode 100644 src/config/debug.h diff --git a/src/WINNT/install/wix/files.wxi b/src/WINNT/install/wix/files.wxi index a612b29aac..9cc1291e84 100644 --- a/src/WINNT/install/wix/files.wxi +++ b/src/WINNT/install/wix/files.wxi @@ -1506,7 +1506,6 @@ - diff --git a/src/butc/Makefile.in b/src/butc/Makefile.in index b418de5faf..8de87612f7 100644 --- a/src/butc/Makefile.in +++ b/src/butc/Makefile.in @@ -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@ diff --git a/src/config/Makefile.in b/src/config/Makefile.in index 4c8d79b7d7..d855da55ce 100644 --- a/src/config/Makefile.in +++ b/src/config/Makefile.in @@ -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 diff --git a/src/config/NTMakefile b/src/config/NTMakefile index 755d420592..e0408dca7b 100644 --- a/src/config/NTMakefile +++ b/src/config/NTMakefile @@ -17,7 +17,6 @@ INCFILEAFSDIR = $(INCFILEDIR)\afs INCFILES =\ $(INCFILEDIR)\afsconfig.h \ - $(INCFILEAFSDIR)\debug.h \ $(INCFILEAFSDIR)\stds.h \ $(INCFILEAFSDIR)\param.h \ $(INCFILEAFSDIR)\afs_sysnames.h \ diff --git a/src/config/debug.h b/src/config/debug.h deleted file mode 100644 index 5304f922c8..0000000000 --- a/src/config/debug.h +++ /dev/null @@ -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 */ diff --git a/src/kauth/admin_tools.c b/src/kauth/admin_tools.c index d63e53bbc6..9f676fa81a 100644 --- a/src/kauth/admin_tools.c +++ b/src/kauth/admin_tools.c @@ -17,7 +17,6 @@ #include -#include #include #include diff --git a/src/usd/usd_file.c b/src/usd/usd_file.c index a4092a40e4..96c646e595 100644 --- a/src/usd/usd_file.c +++ b/src/usd/usd_file.c @@ -10,7 +10,6 @@ #include #include - #include #include #include @@ -37,8 +36,8 @@ #ifdef HAVE_STDINT_H # include #endif +#include -#include #include "usd.h" #ifdef O_LARGEFILE