]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Clean up assertion
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 10 Jul 2011 12:46:11 +0000 (13:46 +0100)
committerDerrick Brashear <shadow@dementix.org>
Mon, 26 Sep 2011 04:10:11 +0000 (21:10 -0700)
The AFS code has multiple different assertion implementations in
userspace. This patchset is the start of bringing some sanity to them.

In rx, we have osi_Assert, a user/kernel assertion macro. This is only
available to libraries which have RX dependencies

In util, we redefine the standard 'assert()' macro to provide a
cross-platform assertion solution.

Because util has an RX dependency, neither of these provide an
assertion solution for libraries which should be independent of rx.
So, pull the assertion code out of util, and put it into opr, as a new
opr_Assert() macro. Implement the userspace osi_Assert in terms of this
macro, leaving the kernel variant untouched.

Update callers to the new macro and header file names.

Change-Id: I780b30ec1ea1207daa17127df4d5fbf9a94481b6
Reviewed-on: http://gerrit.openafs.org/5394
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
87 files changed:
src/WINNT/afsd/fs.c
src/WINNT/afsd/fs_acl.c
src/WINNT/afsd/fs_utils.c
src/afs/UKERNEL/sysincludes.h
src/afsd/afsd.c
src/bu_utils/Makefile.in
src/butc/Makefile.in
src/butc/tcmain.c
src/butc/tcprocs.c
src/butc/tcudbprocs.c
src/dviced/Makefile.in
src/dvolser/Makefile.in
src/gtx/Makefile.in
src/kauth/admin_tools.c
src/libadmin/client/NTMakefile
src/libafsrpc/Makefile.in
src/libuafs/Makefile.common.in
src/lwp/lock.c
src/lwp/lock.h
src/opr/Makefile.in
src/opr/NTMakefile
src/opr/assert.c
src/opr/opr.h
src/opr/opr_assert.h [new file with mode: 0644]
src/shlibafsrpc/Makefile.in
src/shlibafsrpc/libafsrpc.map
src/tbudb/Makefile.in
src/tptserver/Makefile.in
src/tsalvaged/Makefile.in
src/tsalvaged/salvsync-debug.c
src/tubik/Makefile.in
src/tviced/Makefile.in
src/tviced/serialize_state.c
src/tviced/state_analyzer.c
src/tvlserver/Makefile.in
src/tvolser/Makefile.in
src/ubik/remote.c
src/ubik/ubik.p.h
src/ubik/ubikclient.c
src/usd/usd_file.c
src/util/Makefile.in
src/util/NTMakefile
src/util/afs_assert.h [deleted file]
src/util/afsutil_prototypes.h
src/util/assert.c [deleted file]
src/util/dirpath.c
src/util/ktime.c
src/util/netutils.c
src/util/pthread_glock.h
src/util/pthread_nosigs.h
src/util/serverLog.c
src/util/softsig.c
src/venus/fs.c
src/viced/afsfileprocs.c
src/viced/callback.c
src/viced/host.c
src/viced/host.h
src/viced/physio.c
src/viced/viced.c
src/viced/viced.h
src/vol/clone.c
src/vol/daemon_com.c
src/vol/fssync-client.c
src/vol/fssync-debug.c
src/vol/ihandle.c
src/vol/namei_ops.c
src/vol/ntops.c
src/vol/nuke.c
src/vol/partition.c
src/vol/purge.c
src/vol/salvaged.c
src/vol/salvager.c
src/vol/salvsync-server.c
src/vol/vg_cache.c
src/vol/vg_scan.c
src/vol/vnode.c
src/vol/vol-salvage.c
src/vol/volume.c
src/vol/volume_inline.h
src/vol/vutil.c
src/volser/dumpstuff.c
src/volser/physio.c
src/volser/vol_split.c
src/volser/volmain.c
src/volser/volprocs.c
src/volser/volser.p.h
src/volser/voltrans.c

index 3a993435d6e357935565cbb518821175d9fc632f..8ea0ac737fa0f374296d5ed1e4e7eabef1fd2fed 100644 (file)
@@ -11,6 +11,7 @@
 #include <afs/param.h>
 #include <roken.h>
 
+#include <afs/opr.h>
 #include <afs/stds.h>
 #include <afs/com_err.h>
 #include <afs/cmd.h>
@@ -25,7 +26,7 @@
 #include <time.h>
 #include <winsock2.h>
 #include <errno.h>
-#include <afs/afs_assert.h>
+#include <afs/opr_assert.h>
 #include <rx/rx_globals.h>
 
 #include <osi.h>
index e29705be0f3183b7997c8ef64a436cbc80f822e8..8012891cd8b1e5757d51b0259213bf2dfe5eeb83 100644 (file)
@@ -11,6 +11,7 @@
 #include <afs/param.h>
 #include <roken.h>
 
+#include <afs/opr.h>
 #include <afs/stds.h>
 #include <afs/afs_consts.h>
 
@@ -25,7 +26,7 @@
 #include <malloc.h>
 #include <string.h>
 #include <strsafe.h>
-#include <afs/afs_assert.h>
+#include <afs/opr_assert.h>
 #include <afs/ptserver.h>
 #include <afs/ptuser.h>
 
index 1e44de9ecc69fe2609b4b68b130550742bf966f5..8ef360aaa8bd4a50d4f1f9d64e2a5f4f1c0c2b47 100644 (file)
@@ -11,6 +11,7 @@
 #include <afs/param.h>
 #include <roken.h>
 
+#include <afs/opr.h>
 #include <afs/stds.h>
 #include <afs/afs_consts.h>
 
@@ -30,6 +31,7 @@
 #include <afsd.h>
 #include <smb.h>
 #include <afs/cmd.h>
+#include <afs/opr_assert.h>
 #include <fs_utils.h>
 #include <WINNT\afsreg.h>
 
index 6375c028411c34f8909915a0115f1d2fbb9973a0..d2ed9f8f9634562cc682572519803003a413ff24 100644 (file)
 #include  <stdlib.h>
 #include  <string.h>
 #include  <limits.h>
-#ifdef AFS_PTHREAD_ENV
 #include  <assert.h>
-#else
-#include <afs/afs_assert.h>
-#endif
 #include  <stdarg.h>
 
 #if !defined(AFS_USR_DARWIN_ENV) && !defined(AFS_USR_FBSD_ENV) && !defined(AFS_USR_DFBSD_ENV) /* must be included after KERNEL undef'd */
index e2c1e74143f02dd6d927af2ff6f6a0c09d9862a2..0b89142a71cf0dc2ceef9bba64f0f7e75c606f6d 100644 (file)
 #define VFS 1
 
 #include <afs/stds.h>
+#include <afs/opr.h>
+#include <afs/opr_assert.h>
 
 #include <afs/cmd.h>
 
 #include "afsd.h"
 
-#include <afs/afs_assert.h>
 #include <afs/afsutil.h>
 #include <stdlib.h>
 #include <stdio.h>
index e1e0b9c88f25a2a8f3bbbf10f08f7cd77142038b..c4d9d7df08e9abdb1f728f51e09e955f68e5b72a 100644 (file)
@@ -15,7 +15,8 @@ all: fms
 FMSLIBS=${TOP_LIBDIR}/libcmd.a \
         ${TOP_LIBDIR}/libusd.a \
        ${XLIBS} \
-       ${TOP_LIBDIR}/util.a
+       ${TOP_LIBDIR}/util.a \
+       $(TOP_LIBDIR)/libopr.a
 
 fms: fms.o
        $(AFS_LDRULE) fms.o ${FMSLIBS} $(LIB_roken)
index e6c006e33f8646d93e760c4604e5ad3bb93ddad7..855542844de777b8abe7cd3f1dd7fceb0c227e9c 100644 (file)
@@ -83,7 +83,8 @@ 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}/libusd.a \
-               ${TOP_LIBDIR}/util.a $(LIB_roken)
+               ${TOP_LIBDIR}/util.a $(TOP_LIBDIR)/libopr.a \
+               $(LIB_roken)
 
 # Errors
 CFLAGS_tcudbprocs.o=@CFLAGS_NOERROR@
index de2e0202173486893e230a61fb88265d0fed450a..d58bf302fcad20a065463db1ab4d56be39907a5c 100644 (file)
@@ -31,7 +31,6 @@
 #include <rx/xdr.h>
 
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
 #include <afs/vlserver.h>
index 596ed55990008abc74469befd1995df67e94daf7..f5299f9e3518044c8732ff02860438f0ab4e5750 100644 (file)
 #include <afs/procmgmt.h>
 #include <roken.h>
 
-#include <rx/xdr.h>
+#include <afs/opr.h>
 #include <rx/rx.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
 #include <lwp.h>
index 3fe76f5508ffbd95a3e66c916f11719e85942a92..3f51bab3626d1e1573db4efe43b9fc00fc78c992 100644 (file)
 # pragma GCC diagnostic warning "-Wimplicit-function-declaration"
 #endif
 
-#include <rx/xdr.h>
+#include <afs/opr.h>
 #include <rx/rx.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
 #include <lwp.h>
index 07ef9ada4b5dc0b742ae9eefd4b4db012e60f9bc..d2edc388b29c30c658ed0df4c21ad5f58e34e3ec 100644 (file)
@@ -35,7 +35,7 @@ LWPOBJS=lock.o threadname.o
 
 LIBACLOBJS=aclprocs.o netprocs.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
 
 DIROBJS=buffer.o dir.o salvage.o
 
@@ -86,9 +86,6 @@ fsstats.o: ${VICED}/fsstats.c
 serialize_state.o: ${TVICED}/serialize_state.c
        $(AFS_CCRULE) $(TVICED)/serialize_state.c
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
-
 uuid.o: ${UTIL}/uuid.c
        $(AFS_CCRULE) $(UTIL)/uuid.c
 
index 2c08eb9c96ec355d6cbc802715eda2d6b7e14f18..0ebd2075936a75e30a741d1ac64940fca649520e 100644 (file)
@@ -30,7 +30,7 @@ LWPOBJS=lock.o threadname.o
 
 LIBACLOBJS=aclprocs.o netprocs.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o
 
 DIROBJS=buffer.o dir.o salvage.o
 
@@ -47,6 +47,7 @@ LIBS= ${TOP_LIBDIR}/libcmd.a          \
        ${TOP_LIBDIR}/libafsauthent.a   \
        ${TOP_LIBDIR}/libafsrpc.a       \
        ${TOP_LIBDIR}/libafsutil.a      \
+       ${TOP_LIBDIR}/libopr.a          \
        ${TOP_LIBDIR}/libusd.a
 
 all: davolserver 
@@ -94,9 +95,6 @@ vsutils.o: ${VOLSER}/vsutils.c
 lockprocs.o: ${VOLSER}/lockprocs.c
        $(AFS_CCRULE) $(VOLSER)/lockprocs.c
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
-
 uuid.o: ${UTIL}/uuid.c
        $(AFS_CCRULE) $(UTIL)/uuid.c
 
index 9020c7074a793a7d7e16056d96a4b1b84558dd9f..b0433d05e83747ea21ba6ced6919b573fb09e8b1 100644 (file)
@@ -37,6 +37,7 @@ LIBS=\
        ${TOP_LIBDIR}/libauth.a \
        ${TOP_LIBDIR}/librxkad.a \
        ${TOP_LIBDIR}/libafscom_err.a \
+       ${TOP_LIBDIR}/libopr.a \
        ${TOP_LIBDIR}/util.a
 
 EXTRA_LIBS=${LIB_curses} ${XLIBS}
index f65c9aedf54d06428c30aff16056b80333a777dc..794d85a014d0c28059dc9e3cfae88dd45c10b929 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <roken.h>
 #include <afs/opr.h>
+#include <afs/opr_assert.h>
 
 #include <ctype.h>
 
index 5fa1efa95d6713d9c055662f16758acc9dd39563..2391de361bed768136ffaab6c7a1b18222a3e499 100644 (file)
@@ -28,6 +28,7 @@ DLLLIBS =\
        $(DESTDIR)\lib\afsrpc.lib \
        $(DESTDIR)\lib\afspthread.lib \
         $(DESTDIR)\lib\afs\afsutil.lib \
+       $(DESTDIR)\lib\opr.lib \
         $(DESTDIR)\lib\afsroken.lib
 
 $(DLLFILE): $(DLLOBJS) $(DLLLIBS)
index 1082f429cbff8652ea305d3561d0db476bfa2199..39c5ee6d67f25590d233251ebc40397f39e7fddd 100644 (file)
@@ -259,12 +259,11 @@ et_name.o: ${COMERR}/et_name.c
 com_err.o: ${COMERR}/com_err.c
        $(AFS_CCRULE) $(COMERR)/com_err.c
 
-
 casestrcpy.o: ${OPR}/casestrcpy.c
        $(AFS_CCRULE) $(OPR)/casestrcpy.c
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
+assert.o: ${OPR}/assert.c
+       $(AFS_CCRULE) $(OPR)/assert.c
 
 base64.o: ${UTIL}/base64.c
        $(AFS_CCRULE) $(UTIL)/base64.c
index 72e2aef77fc6e18d83c80ffe7a84cd5e4d9b3e97..e264e9d800c578139e820f4217d5081d59faa74c 100644 (file)
@@ -988,7 +988,7 @@ $(UOBJ)/afsd_uafs.o: $(TOP_SRC_AFS)/UKERNEL/afsd_uafs.c
        $(CRULE1)
 $(UOBJ)/afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
        $(CRULE1) -o afs_uuid.o
-$(UOBJ)/assert.o: $(TOP_SRCDIR)/util/assert.c
+$(UOBJ)/assert.o: $(TOP_SRCDIR)/opr/assert.c
        $(CRULE1)
 $(UOBJ)/xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
        $(CRULE1)
@@ -1285,7 +1285,7 @@ $(PICOBJ)/afsd_uafs.o: $(TOP_SRC_AFS)/UKERNEL/afsd_uafs.c
        $(CRULEPIC)
 $(PICOBJ)/afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
        $(CRULEPIC) -o afs_uuid.o
-$(PICOBJ)/assert.o: $(TOP_SRCDIR)/util/assert.c
+$(PICOBJ)/assert.o: $(TOP_SRCDIR)/opr/assert.c
        $(CRULEPIC)
 $(PICOBJ)/xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
        $(CRULEPIC)
@@ -1580,7 +1580,7 @@ $(WEBOBJ)/afsd_uafs.o: $(TOP_SRC_AFS)/UKERNEL/afsd_uafs.c
        $(CRULE2)
 $(WEBOBJ)/afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
        $(CRULE2) -o afs_uuid.o
-$(WEBOBJ)/assert.o: $(TOP_SRCDIR)/util/assert.c
+$(WEBOBJ)/assert.o: $(TOP_SRCDIR)/opr/assert.c
        $(CRULE1)
 $(WEBOBJ)/xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
        $(CRULE2)
@@ -1885,7 +1885,7 @@ $(JUAFS)/afsd_uafs.o: $(TOP_SRC_AFS)/UKERNEL/afsd_uafs.c
        $(CRULE1)
 $(JUAFS)/afs_uuid.o: $(TOP_SRCDIR)/util/uuid.c
        $(CRULE1) -o afs_uuid.o
-$(JUAFS)/assert.o: $(TOP_SRCDIR)/util/assert.c
+$(JUAFS)/assert.o: $(TOP_SRCDIR)/opr/assert.c
        $(CRULE1)
 $(JUAFS)/xdr_afsuuid.o: $(TOP_SRCDIR)/rx/xdr_afsuuid.c
        $(CRULE1)
index d34bfb438a978d5f0ccf9e965ffe648806f967a5..5f31d333ff775c88bfaf76a5a44cc3ecc75a1809 100644 (file)
 #include <roken.h>
 
 #ifdef AFS_PTHREAD_ENV
-#include <afs/afs_assert.h>
-/* can't include this in lwp, rx hasn't built yet */
-
 #include <rx/rx.h>
-#else
-#include <assert.h>
 #endif
 
+#include <assert.h>
+
 #include "lwp.h"
 #include "lock.h"
 
index 7bda375889fa1fe0bd5e2159192dfb53a3a498a1..aa104488f00afd1676a8c361ff670cd5d7b99690 100644 (file)
@@ -44,7 +44,6 @@
 
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
-#include <afs/afs_assert.h>
 /* can't include in non-lwp case; rx builds later */
 #include <rx/rx.h>
 #define LOCK_LOCK(A) MUTEX_ENTER(&(A)->mutex);
index 566cdbe829caa931cc577bf0df7419455ca4f4d6..e4346022631cd16d6c6ac9f138ef9f6c1d82bd16 100644 (file)
@@ -5,6 +5,7 @@ include @TOP_OBJDIR@/src/config/Makefile.pthread
 objects = assert.o casestrcpy.o
 
 all: $(TOP_INCDIR)/afs/opr.h \
+     $(TOP_INCDIR)/afs/opr_assert.h \
      $(TOP_LIBDIR)/libopr.a
 
 libopr.a: $(objects)
@@ -18,6 +19,9 @@ $(TOP_LIBDIR)/libopr.a: libopr.a
 $(TOP_INCDIR)/afs/opr.h: opr.h
        $(INSTALL_DATA) opr.h $@
 
+$(TOP_INCDIR)/afs/opr_assert.h: opr_assert.h
+       $(INSTALL_DATA) opr_assert.h $@
+
 install: libopr.a
        $(INSTALL_DATA) libopr.a $(DESTDIR)$(libdir)/libopr.a
 
index a10ee520d30a176597934914dd2890ec82970b25..7957992de15a57344978acc95d281a7a2dfdcb97 100644 (file)
@@ -11,7 +11,8 @@ RELDIR=opr
 INCFILEDIR = $(DESTDIR)\include\afs
 
 INCFILES = \
-       $(INCFILEDIR)\opr.h
+       $(INCFILEDIR)\opr.h \
+       $(INCFILEDIR)\opr_assert.h
 
 LIBFILE = $(DESTDIR)\lib\opr.lib
 
index 268ed938d69acf9184741bc15844c09638569c55..7c8998f158df5ec18b02472c0ff4036441161a7f 100644 (file)
@@ -12,4 +12,31 @@ opr_NTAbort(void)
 }
 #endif
 
+#define TIMESTAMP_BUFFER_SIZE 26  /* including the null */
+void
+opr_AssertionFailed(char *file, int line)
+{
+    char tdate[TIMESTAMP_BUFFER_SIZE];
+    time_t when;
+    struct tm tm;
+
+    when = time(NULL);
+    strftime(tdate, sizeof(tdate), "%a %b %d %H:%M:%S %Y",
+            localtime_r(&when, &tm));
+    fprintf(stderr, "%s Assertion failed! file %s, line %d.\n", tdate, file,
+           line);
+    fflush(stderr);
+    opr_abort();
+}
+
+void
+opr_AssertFailU(const char *expr, const char *file, int line)
+{
+    fprintf(stderr, "Fatal Rx error: assertion failed: %s, "
+                   "file: %s, line: %d\n",
+           expr, file, line);
+    fflush(stderr);
+    fflush(stdout);
+    opr_abort();
+}
 
index 20a4e82f41ed112d794120579f5dc0f17a1b8180..b53211c2a807c2a974d4266f9083b4e25032adbf 100644 (file)
@@ -9,7 +9,13 @@ extern void opr_NTAbort(void);
 # define opr_abort() abort()
 #endif
 
+extern void opr_AssertionFailed(char *, int);
+extern void opr_AssertFailU(const char *, const char *, int);
 
+#define opr_Assert(ex) \
+    do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
+
+/* casestrcpy.c */
 #define lcstring opr_lcstring
 #define ucstring opr_ucstring
 #define stolower opr_stolower
diff --git a/src/opr/opr_assert.h b/src/opr/opr_assert.h
new file mode 100644 (file)
index 0000000..32666e8
--- /dev/null
@@ -0,0 +1,6 @@
+/* Include this header if you want the standard 'assert()' macro to have the
+ * same behaviour as the new opr_Assert macro
+ */
+#include <afs/opr.h>
+
+#define assert(ex) opr_Assert(ex)
index 0d5327d28680ae400012998b534a401bd1f2488c..e55b679d6faf2c05c17af7215c63613ff46dede7 100644 (file)
@@ -274,8 +274,8 @@ com_err.o: ${COMERR}/com_err.c
 casestrcpy.o: ${OPR}/casestrcpy.c
        $(AFS_CCRULE) $(OPR)/casestrcpy.c
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
+assert.o: ${OPR}/assert.c
+       $(AFS_CCRULE) $(OPR)/assert.c
 
 base64.o: ${UTIL}/base64.c
        $(AFS_CCRULE) $(UTIL)/base64.c
index 41670549a17a13c60e9f2491004e0088bda5ab25..34549830d464654a18d376937b12340b88ae4af3 100755 (executable)
        opr_stolower;
        opr_ucstring;
        opr_lcstring;
-       AssertionFailed;
+       opr_AssertionFailed;
        rx_GetLocalPeers;
        rx_GetMaxReceiveWindow;
        rx_GetMaxSendWindow;
index 0878675c897a383b73b9363c3e02df5d209eb63c..ba24342ef787ded2b3743edec8d7382893ac9e3a 100644 (file)
@@ -18,7 +18,7 @@ BUDB=$(srcdir)/../budb
 
 RXOBJS= rx_pthread.o rxkad_errs.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
      volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o
 
 
@@ -44,6 +44,7 @@ LIBS=${RXOBJS} ${UTILOBJS} \
        ${TOP_LIBDIR}/libafsauthent.a \
        ${TOP_LIBDIR}/libafsrpc.a \
        ${TOP_LIBDIR}/libcmd.a \
+       $(TOP_LIBDIR)/libopr.a \
        ${TOP_LIBDIR}/libafsutil.a
 
 COMMON_OBJS = database.o db_alloc.o db_dump.o db_hash.o struct_ops.o ol_verify.o
@@ -74,9 +75,6 @@ rxkad_errs.o: ../rxkad/rxkad_errs.c
 # pthreaded version of this library, as we are doing with ubik itself, but...
 #
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
-
 uuid.o: ${UTIL}/uuid.c
        $(AFS_CCRULE) $(UTIL)/uuid.c
 
index 8fe341f9414225f055cfc6595167cbdb2477b3a0..96c1fda4d6bc6126b6fb4bd822fe7e8334be3954 100644 (file)
@@ -18,7 +18,7 @@ PTSERVER=$(srcdir)/../ptserver
 
 RXOBJS= rx_pthread.o rxkad_errs.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
      volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
      pthread_threadname.o
 
@@ -37,6 +37,7 @@ LIBS=${RXOBJS} ${UTILOBJS}\
        ${TOP_LIBDIR}/libafsauthent.a \
        ${TOP_LIBDIR}/libafsrpc.a \
        ${TOP_LIBDIR}/libcmd.a \
+       ${TOP_LIBDIR}/libopr.a \
        ${TOP_LIBDIR}/libafsutil.a 
 
 PTOBJS=ptuser.o pterror.o ptint.cs.o ptint.xdr.o
index b4346df0dec5b9a4930890587d5612e774f42f5c..e4df38ff0cd46d139a0774765a12cace40f3e833 100644 (file)
@@ -34,7 +34,7 @@ DIROBJS=buffer.o dir.o salvage.o
 
 LWPOBJS=lock.o threadname.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o fstab.o
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o fstab.o
 
 VLIBOBJS=volume.o vnode.o vutil.o partition.o fssync-client.o \
         clone.o nuke.o devname.o listinodes.o ihandle.o \
@@ -114,9 +114,6 @@ physio.o: ${VOL}/physio.c
 fssync-debug.o: ${VOL}/fssync-debug.c
        $(AFS_CCRULE) $(VOL)/fssync-debug.c
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
-
 uuid.o: ${UTIL}/uuid.c
        $(AFS_CCRULE) $(UTIL)/uuid.c
 
index 58a1796a6149721a76f251a8e4bf66df3dd4a073..7e82a4bb2a21d763275055e82e5b14a4e5188347 100644 (file)
@@ -26,7 +26,7 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
+#include <afs/opr_assert.h>
 #include <afs/dir.h>
 
 #ifndef AFS_NT40_ENV
index 91ed1506ed58bba3c5a0cdc511bf8d51dfc3ede0..ba7b202d3fee31cc58c8ff7b66e122f3d07e8e2e 100644 (file)
@@ -26,13 +26,15 @@ INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
 
 RXOBJS = rx_pthread.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
        volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
        pthread_threadname.o
 
 LIBS=${RXOBJS} ${UTILOBJS} ${TOP_LIBDIR}/libafsauthent.a ${TOP_LIBDIR}/libafsrpc.a \
      ${TOP_LIBDIR}/libafscom_err.a ${TOP_LIBDIR}/libcmd.a \
-     ${TOP_LIBDIR}/libsys.a ${XLIBS} ${MT_LIBS}
+     ${TOP_LIBDIR}/libsys.a \
+     $(TOP_LIBDIR)/libopr.a \
+     ${XLIBS} ${MT_LIBS}
 
 all: depinstall ${TOP_LIBDIR}/libubik_pthread.a udebug utst_server utst_client
 
@@ -55,9 +57,6 @@ rx_pthread.o: ${RX}/rx_pthread.c
 # pthreaded version of this library, as we are doing with ubik itself, but...
 #
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
-
 uuid.o: ${UTIL}/uuid.c
        $(AFS_CCRULE) $(UTIL)/uuid.c
 
index 337f07baefd279aa2752cf22e7e83db3b7d6eba9..f35b2f9874eeae6b99374b8c991a48c47b743277 100644 (file)
@@ -33,7 +33,7 @@ LWPOBJS=lock.o threadname.o
 
 LIBACLOBJS=aclprocs.o netprocs.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o pthread_threadname.o
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o pthread_threadname.o
 
 DIROBJS=buffer.o dir.o salvage.o
 
@@ -51,6 +51,7 @@ objects= ${VICEDOBJS} ${VLSERVEROBJS} ${LWPOBJS} ${LIBACLOBJS} \
 LIBS=${TOP_LIBDIR}/libafsauthent.a \
      ${TOP_LIBDIR}/libafsrpc.a \
      $(TOP_LIBDIR)/libcmd.a \
+     $(TOP_LIBDIR)/libopr.a \
      ${TOP_LIBDIR}/util.a
 
 all: fileserver
index 83a0cee574ecc18b9d844806ae8a71654937a6d4..6b2d881493c1f2634d02495f4ad7cefe796b7046 100644 (file)
@@ -18,7 +18,6 @@
 #include <roken.h>
 
 #include <afs/stds.h>
-#include <afs/afs_assert.h>
 
 #include <rx/xdr.h>
 #include <lwp.h>
index 219ea27ed101c8ff35c48f908dec97cf12d2e206..0db628fe2bf06f7c42fd4ec548528ed60e14fa6c 100644 (file)
@@ -23,7 +23,7 @@
 #include <sys/mman.h>
 
 #include <rx/xdr.h>
-#include <afs/afs_assert.h>
+#include <afs/opr_assert.h>
 #include <lwp.h>
 #include <lock.h>
 #include <afs/afsint.h>
index 9975d39d84d0cbe742c81fdd4e9ccddaf8821858..b05436b6eaee3672e0b5b0efc4ed2b2b305d26c8 100644 (file)
@@ -18,7 +18,7 @@ VLSERVER=$(srcdir)/../vlserver
 
 RXOBJS= rx_pthread.o rxkad_errs.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o \
      volparse.o flipbase64.o softsig.o hostparse.o pthread_glock.o \
      pthread_threadname.o get_krbrlm.o
 
@@ -35,7 +35,8 @@ LIBS= ${TOP_LIBDIR}/libubik_pthread.a \
        ${TOP_LIBDIR}/libafsauthent.a \
        ${TOP_LIBDIR}/libcmd.a \
        ${TOP_LIBDIR}/libafsrpc.a \
-       ${TOP_LIBDIR}/libafsutil.a 
+       ${TOP_LIBDIR}/libafsutil.a \
+       ${TOP_LIBDIR}/libopr.a
 
 OBJS=vldbint.xdr.o vldbint.cs.o vl_errors.o ${RXOBJS} ${UTILOBJS} 
 
@@ -58,9 +59,6 @@ rxkad_errs.o: ../rxkad/rxkad_errs.c
 # pthreaded version of this library, as we are doing with ubik itself, but...
 #
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
-
 uuid.o: ${UTIL}/uuid.c
        $(AFS_CCRULE) $(UTIL)/uuid.c
 
index 5bdfee6d64ec5ada8c75e7a89610d8ff25b3614a..2c9098ecd10a8364e20f6458ddb5075851b314a7 100644 (file)
@@ -33,7 +33,7 @@ LWPOBJS=lock.o threadname.o
 
 LIBACLOBJS=aclprocs.o netprocs.o
 
-UTILOBJS=assert.o uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o pthread_threadname.o
+UTILOBJS=uuid.o serverLog.o fileutil.o netutils.o dirpath.o volparse.o flipbase64.o softsig.o pthread_threadname.o
 
 DIROBJS=buffer.o dir.o salvage.o
 
@@ -53,7 +53,8 @@ LIBS= ${TOP_LIBDIR}/libcmd.a          \
        ${TOP_LIBDIR}/libafsauthent.a   \
        ${TOP_LIBDIR}/libafsutil.a      \
        ${TOP_LIBDIR}/libusd.a          \
-       ${TOP_LIBDIR}/libafsrpc.a
+       ${TOP_LIBDIR}/libafsrpc.a       \
+       $(TOP_LIBDIR)/libopr.a
 
 all: volserver vos
 
@@ -100,9 +101,6 @@ vsutils.o: ${VOLSER}/vsutils.c
 lockprocs.o: ${VOLSER}/lockprocs.c
        $(AFS_CCRULE) $(VOLSER)/lockprocs.c
 
-assert.o: ${UTIL}/assert.c
-       $(AFS_CCRULE) $(UTIL)/assert.c
-
 uuid.o: ${UTIL}/uuid.c
        $(AFS_CCRULE) $(UTIL)/uuid.c
 
index 205097af9bcea6f58d92d7d64712e7c9971dacc9..f3c0b9610ae7bf0b9977ddd8f5d2b618b9f55856 100644 (file)
 #include <afs/param.h>
 
 #include <roken.h>
-
+#include <afs/opr.h>
 #include <lock.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <errno.h>
+#include <assert.h>
 #include <afs/afsutil.h>
 
 #define UBIK_INTERNALS
index 109c766a432fe7cd71b0aad8fa55a7f6a28c6487..c1ac7721b13fcdc0b99946162a34a1c7ed75a4d2 100644 (file)
@@ -49,7 +49,6 @@
 #define        CFLastFailed        1   /*!< last call failed to this guy (to detect down hosts) */
 /*\}*/
 
-#include <afs/afs_assert.h>
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
 #else
index 40fc4e87a8f0a687c9a79234d0fd79c157d22f41..3e59c4ae54f241f0a3be4dcb67e15700941099fd 100644 (file)
@@ -83,7 +83,6 @@ ubik_ParseClientList(int argc, char **argv, afs_uint32 * aothers)
     return 0;
 }
 
-#include <afs/afs_assert.h>
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
 
index cc00dc31dbdadaec59ece79b8b16987130bf200a..f11267aac01016d1ccf089bb16274fc8541d7fea 100644 (file)
@@ -11,6 +11,7 @@
 #include <afs/param.h>
 
 #include <roken.h>
+#include <afs/opr.h>
 
 #if defined(AFS_AIX_ENV)
 #include <sys/tape.h>
@@ -27,8 +28,6 @@
 #endif
 #endif /* AFS_AIX_ENV */
 
-#include <afs/afs_assert.h>
-
 #include "usd.h"
 
 #ifdef O_LARGEFILE
@@ -350,7 +349,7 @@ usd_FileOpen(const char *path, int flags, int mode, usd_handle_t * usdP)
 #endif /* O_LARGEFILE */
 
        /* make sure both lock bits aren't set */
-       assert(~flags & (USD_OPEN_RLOCK | USD_OPEN_WLOCK));
+       opr_Assert(~flags & (USD_OPEN_RLOCK | USD_OPEN_WLOCK));
 
        fl.l_type = ((flags & USD_OPEN_RLOCK) ? F_RDLCK : F_WRLCK);
        fl.l_whence = SEEK_SET;
index 9c1b17c677df601dd4c1de5d2ba94ca725ef7ece..37210efd2a95090ff0a8236be2e664512882b6d0 100644 (file)
@@ -12,7 +12,7 @@ include @TOP_OBJDIR@/src/config/Makefile.lwp
 HELPER_SPLINT=@HELPER_SPLINT@
 
 
-objects =assert.o base64.o config_file.o ktime.o volparse.o \
+objects =base64.o config_file.o ktime.o volparse.o \
         hostparse.o exec.o \
         hputil.o kreltime.o get_krbrlm.o uuid.o serverLog.o \
         dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \
@@ -20,7 +20,6 @@ objects =assert.o base64.o config_file.o ktime.o volparse.o \
         pthread_threadname.o ${REGEX_OBJ}
 
 objects_pic = \
-       assert_pic.o \
        base64_pic.o \
        config_file_pic.o \
        ktime_pic.o \
@@ -47,7 +46,6 @@ objects_pic = \
 includes = \
        ${TOP_INCDIR}/afs/dirpath.h \
        ${TOP_INCDIR}/afs/pthread_nosigs.h \
-       ${TOP_INCDIR}/afs/afs_assert.h \
        ${TOP_INCDIR}/afs/errors.h \
        ${TOP_INCDIR}/afs/vice.h \
        ${TOP_INCDIR}/afs/ktime.h \
@@ -83,9 +81,6 @@ ${TOP_INCDIR}/afs/dirpath.h: dirpath.h
 ${TOP_INCDIR}/afs/pthread_nosigs.h: ${srcdir}/pthread_nosigs.h
        ${INSTALL_DATA} $? $@
 
-${TOP_INCDIR}/afs/afs_assert.h: ${srcdir}/afs_assert.h
-       ${INSTALL_DATA} $? $@
-
 ${TOP_INCDIR}/afs/errors.h: ${srcdir}/errors.h
        ${INSTALL_DATA} $? $@
 
@@ -196,9 +191,6 @@ sys: sys.o
        $(AFS_LDRULE) sys.o
 
 # PIC objects build rules
-assert_pic.o: ${srcdir}/assert.c ${includes}
-       $(SHD_CCRULE) ${srcdir}/assert.c
-
 base64_pic.o: ${srcdir}/base64.c ${includes}
        $(SHD_CCRULE) ${srcdir}/base64.c
 
@@ -277,7 +269,6 @@ install: dirpath.h util.a util_pic.a sys
        ${INSTALL} -d ${DESTDIR}${bindir}
        ${INSTALL_DATA} dirpath.h ${DESTDIR}${includedir}/afs/dirpath.h
        ${INSTALL_DATA} ${srcdir}/pthread_nosigs.h ${DESTDIR}${includedir}/afs/pthread_nosigs.h
-       ${INSTALL_DATA} ${srcdir}/afs_assert.h ${DESTDIR}${includedir}/afs/afs_assert.h
        ${INSTALL_DATA} ${srcdir}/errors.h ${DESTDIR}${includedir}/afs/errors.h
        ${INSTALL_DATA} ${srcdir}/vice.h ${DESTDIR}${includedir}/afs/vice.h
        ${INSTALL_DATA} ${srcdir}/ktime.h ${DESTDIR}${includedir}/afs/ktime.h
@@ -305,7 +296,6 @@ dest: dirpath.h util.a util_pic.a sys
        ${INSTALL} -d ${DEST}/bin
        ${INSTALL_DATA} dirpath.h ${DEST}/include/afs/dirpath.h
        ${INSTALL_DATA} ${srcdir}/pthread_nosigs.h ${DEST}/include/afs/pthread_nosigs.h
-       ${INSTALL_DATA} ${srcdir}/afs_assert.h ${DEST}/include/afs/afs_assert.h
        ${INSTALL_DATA} ${srcdir}/errors.h ${DEST}/include/afs/errors.h
        ${INSTALL_DATA} ${srcdir}/vice.h ${DEST}/include/afs/vice.h
        ${INSTALL_DATA} ${srcdir}/ktime.h ${DEST}/include/afs/ktime.h
index 9285da87ba45415c0c3081f7e0cb9a15bcadca06..b828a0ca277b969fc6f4fbd4490aa0be9eaf3590 100644 (file)
@@ -17,7 +17,6 @@ INCFILES =\
        $(DESTDIR)\include\dirent.h \
        $(DESTDIR)\include\opr\queue.h \
        $(INCFILEDIR)\afsutil.h \
-       $(INCFILEDIR)\afs_assert.h \
        $(INCFILEDIR)\errors.h \
        $(INCFILEDIR)\vice.h \
         $(INCFILEDIR)\netutils.h \
@@ -43,7 +42,6 @@ LIBFILE = $(DESTDIR)\lib\afs\afsutil.lib
 MT_LIBFILE = $(DESTDIR)\lib\afs\mtafsutil.lib
 
 LIBOBJS = \
-       $(OUT)\assert.obj \
        $(OUT)\base32.obj \
        $(OUT)\get_krbrlm.obj \
        $(OUT)\hostparse.obj \
@@ -63,7 +61,6 @@ LIBOBJS = \
        $(OUT)\secutil_nt.obj
 
 MT_LIBOBJS = \
-       $(OUT)\assert.obj \
        $(OUT)\base32.obj \
        $(OUT)\get_krbrlm.obj \
        $(OUT)\hostparse.obj \
diff --git a/src/util/afs_assert.h b/src/util/afs_assert.h
deleted file mode 100644 (file)
index 51f01c6..0000000
+++ /dev/null
@@ -1,15 +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
- */
-
-/*     @(#)assert.h 1.1 83/08/01 SMI; from UCB 4.1 83/05/03    */
-/* Modified to dump core, rather than exit.  May/85 RNS */
-
-void AssertionFailed(char *file, int line) AFS_NORETURN;
-
-#define assert(ex) do{if (!(ex)) AssertionFailed(__FILE__, __LINE__);}while(0)
index 25f92cb78a009237073a971b85897c6f6ad8272b..ff0f30c1266c330072b3909d748dacfcaebe0301 100644 (file)
 
 /* afs_lhash.c */
 
-
-/* assert.c */
-extern void AssertionFailed(char *file, int line);
-
-
 /* base32.c */
 extern char *int_to_base32(b32_string_t s, int a);
 extern int base32_to_int(char *s);
diff --git a/src/util/assert.c b/src/util/assert.c
deleted file mode 100644 (file)
index 0b51f11..0000000
+++ /dev/null
@@ -1,35 +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
- */
-
-/* ReallyAbort:  called from assert. May/85 */
-#include <afsconfig.h>
-#include <afs/param.h>
-
-#include <roken.h>
-#include <afs/opr.h>
-
-#include "afsutil.h"
-
-#define TIMESTAMP_BUFFER_SIZE 26  /* including the null */
-
-void
-AssertionFailed(char *file, int line)
-{
-    char tdate[TIMESTAMP_BUFFER_SIZE];
-    time_t when;
-    struct tm tm;
-
-    when = time(NULL);
-    strftime(tdate, sizeof(tdate), "%a %b %d %H:%M:%S %Y",
-            localtime_r(&when, &tm));
-    fprintf(stderr, "%s Assertion failed! file %s, line %d.\n", tdate, file,
-           line);
-    fflush(stderr);
-    opr_abort();
-}
index dd894b015f23ca38e4c88f5d26f32a7f6c9cd6fa..9c8efbcbc89be7ddc215ee6f11603b32f3ccb873 100644 (file)
 #include <ctype.h>
 #include <limits.h>
 
-#include "afs_assert.h"
 #include "afsutil.h"
 #include "fileutil.h"
 
+#include <afs/opr.h>
+
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
 static pthread_once_t dirInit_once = PTHREAD_ONCE_INIT;
index f15ee289d7acb57191ea80caa03ca187a0c60b9b..9cb6f72421949f4e5649bd6e02010cc7a357157a 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <ctype.h>
 
+#include <afs/opr.h>
 #include "afsutil.h"
 #include "ktime.h"
 
index c12aeb4133b231f53599ea6d0ded689145efada8..013cc82a438eb56aa5933138383b550e6cf66660 100644 (file)
@@ -21,7 +21,6 @@
 #include <rx/rx.h>
 #include <afs/dirpath.h>
 
-#include "afs_assert.h"
 #include "afsutil.h"
 
 #define AFS_IPINVALID        0xffffffff        /* invalid IP address */
index c6414c96cc3ebb48c54cfe2af8c890692c2e6e4c..1fe464b1061170a52ec674ac5fd3af36a161ec61 100644 (file)
@@ -12,7 +12,7 @@
 
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
-#include <afs/afs_assert.h>
+#include <afs/opr.h>
 
 typedef struct {
     pthread_mutex_t mut;
@@ -35,10 +35,10 @@ extern int pthread_recursive_mutex_lock(pthread_recursive_mutex_p);
 extern int pthread_recursive_mutex_unlock(pthread_recursive_mutex_p);
 
 #define LOCK_GLOBAL_MUTEX \
-    osi_Assert(pthread_recursive_mutex_lock(&grmutex)==0)
+    opr_Assert(pthread_recursive_mutex_lock(&grmutex)==0)
 
 #define UNLOCK_GLOBAL_MUTEX \
-    osi_Assert(pthread_recursive_mutex_unlock(&grmutex)==0)
+    opr_Assert(pthread_recursive_mutex_unlock(&grmutex)==0)
 
 #else
 
index 1d638967ef7f6a06c2d02f82f6c0b949ab880802..bc780418f42ae394d281daa5333d165c62bc1d33 100644 (file)
@@ -68,13 +68,13 @@ do { \
          _SETABRT \
          _SETFPE \
         b = (AFS_SET_SIGMASK(SIG_BLOCK, &i_tset, &i_oset) == 0); \
-         assert(b); \
+         opr_Assert(b); \
 } while (0)
 
 #define AFS_SIGSET_RESTORE() \
 do { \
         int b = (AFS_SET_SIGMASK(SIG_SETMASK, &i_oset, NULL) == 0); \
-         assert(b); \
+         opr_Assert(b); \
 } while (0)
 #endif /* AFS_NT40_ENV */
 
index 7c5eae167afc7ec18d95c30e1cd3ee527f6c67b3..f32a5069fc7557d6b18102b3196ea042d9be6357 100644 (file)
@@ -29,7 +29,6 @@
 #include <lwp.h>
 
 #if defined(AFS_PTHREAD_ENV)
-#include <afs/afs_assert.h>
 /* can't include rx when we are libutil; it's too early */
 #include <rx/rx.h>
 #include <pthread.h>
index e0e6480b4bf844574a7d6c7b8b86706f936fd536..79eb6dd50e7a490b6a5826802ee31c7c4fd14543 100644 (file)
@@ -14,8 +14,8 @@
 #include <afs/procmgmt.h> /* Must be before roken.h */
 
 #include <roken.h>
+#include <afs/opr.h>
 
-#include <assert.h>
 #include <pthread.h>
 
 #include "pthread_nosigs.h"
@@ -117,7 +117,7 @@ softsig_init(void)
     AFS_SIGSET_DECL;
     AFS_SIGSET_CLEAR();
     rc = pthread_create(&softsig_tid, NULL, &softsig_thread, NULL);
-    assert(0 == rc);
+    opr_Assert(0 == rc);
     AFS_SIGSET_RESTORE();
     signal (SIGUSR1, softsig_usr1);
 }
index 31d20d4a624b97162679e9df43254f39740a38ab..7e277511935d8d4ca65d3ffd035477c1649cbc9f 100644 (file)
@@ -12,8 +12,8 @@
 #include <afs/stds.h>
 
 #include <roken.h>
-
 #include <ctype.h>
+#include <assert.h>
 
 #include <afs/afs_consts.h>
 #include <afs/afs_args.h>
index 7e422c0e81b511c3bbd3198e603d2af4aaaeac25..fa949f416bc498b04489cd05fb0a4517c6d09fe4 100644 (file)
@@ -69,7 +69,6 @@
 
 #include <rx/xdr.h>
 #include <afs/nfs.h>
-#include <afs/afs_assert.h>
 #include <lwp.h>
 #include <lock.h>
 #include <afs/afsint.h>
index 7cdb18ef0f8eb5a322b8c3fd45557e75c677f23c..d9b9b186671473c2d82da9c647519c7018f4dfb8 100644 (file)
@@ -91,8 +91,6 @@
 #include <sys/file.h>
 #endif
 
-#include <afs/afs_assert.h>
-
 #include <afs/nfs.h>           /* yuck.  This is an abomination. */
 #include <lwp.h>
 #include <rx/rx.h>
index fab7fcb95b21b4be05e628c4777e26aadef71ae8..3d864a3031c681b20bac601ad8e36d07ce51a373 100644 (file)
@@ -21,7 +21,6 @@
 #endif
 
 #include <rx/xdr.h>
-#include <afs/afs_assert.h>
 #include <lwp.h>
 #include <lock.h>
 #include <afs/afsint.h>
index 58b2b9342588ac583c863b03e519ec16e7eaf658..ac4eb4dc0380b58973001b59bdd124c19b5d6547 100644 (file)
@@ -23,7 +23,6 @@
  * precedence is host_listlock_mutex, host->mutex, host_glock_mutex.
  */
 #include <rx/rx_globals.h>
-#include <afs/afs_assert.h>
 #include <pthread.h>
 extern pthread_mutex_t host_glock_mutex;
 #define H_LOCK MUTEX_ENTER(&host_glock_mutex);
index 1131c30debbeba9b5fa22315a7f4bce83a84bdd8..eb236ec799aa4f622c754539ebd641c989dc17e1 100644 (file)
@@ -23,7 +23,6 @@
 #endif
 
 #include <afs/nfs.h>
-#include <afs/afs_assert.h>
 #include <lwp.h>
 #include <lock.h>
 #include <afs/afsint.h>
index 8bca99354c845086ef3bca4dada233354d4d4b79..4c4f34c4c4fcf84dd929b05e9309a061bf94b6dc 100644 (file)
@@ -42,7 +42,6 @@
 
 #include <rx/xdr.h>
 #include <afs/nfs.h>
-#include <afs/afs_assert.h>
 #include <lwp.h>
 #include <lock.h>
 #include <afs/cmd.h>
index 09e2bf395a86ec6315fa7eb701e9e40b5e057106..3db60784afbc9b87b4b2cda390b4c69542c663ed 100644 (file)
@@ -195,7 +195,6 @@ extern int saneacls;
                                         * HostCheck, Signal, min 2 for RXSTATS */
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
-#include <afs/afs_assert.h>
 extern pthread_mutex_t fileproc_glock_mutex;
 #define FS_LOCK MUTEX_ENTER(&fileproc_glock_mutex);
 #define FS_UNLOCK MUTEX_EXIT(&fileproc_glock_mutex);
index b9aff7797d6e58b366d902129950d4cee47e0190..5217a2cd3edb8860bd3d19e148871dcd53c1abe2 100644 (file)
@@ -25,7 +25,6 @@
 #include <winbase.h>
 #endif
 
-#include <afs/afs_assert.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include <afs/afssyscalls.h>
index 07094a52a339145787f82ebf82789b465f22ccd6..be35ca792540936b3ad4982cc00792420ad90aa3 100644 (file)
@@ -24,7 +24,6 @@
 #include <roken.h>
 #include <afs/opr.h>
 
-#include <afs/afs_assert.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include <afs/errors.h>
index 0d884bc59a4e8e2c556d3b4bbc8ada1aba7b8ab3..048cf5945d2f1daf8fb4f7b0ffe2cb6f3d3f7901 100644 (file)
@@ -37,7 +37,6 @@
 
 #include <roken.h>
 
-#include <afs/afs_assert.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include <afs/errors.h>
index 3634f2f2b6f236d9f97471b3b81d988ef389647b..ac3d122db014d0b3f8c578dd1dcd4d73e5777ee6 100644 (file)
@@ -26,7 +26,6 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 
 #ifndef AFS_NT40_ENV
 #include <afs/osi_inode.h>
index f2e928dec8a6052746a0aa0eca8de63a680a7b4c..789ec39406ee0102e257873d8d5d892f328f2486 100644 (file)
@@ -30,7 +30,6 @@
 #include "nfs.h"
 #include "ihandle.h"
 #include "viceinode.h"
-#include "afs/afs_assert.h"
 
 #ifdef AFS_PTHREAD_ENV
 pthread_once_t ih_glock_once = PTHREAD_ONCE_INIT;
index 62191d9ccd568279ff954b94e57a5364d6445efe..811beaee0c3414b4295588707aa06796278202f8 100644 (file)
@@ -29,7 +29,6 @@
 #include <direct.h>
 #endif
 
-#include <afs/afs_assert.h>
 #include <lock.h>
 #include <afs/afsutil.h>
 #include <lwp.h>
index 5be28ef109bd9f16f7b4d879f3188148b5c6b9c1..f012ca08d02f70779e85322556b3a65b4c1fa1df 100644 (file)
@@ -28,7 +28,6 @@
 #include "volume.h"
 #include "viceinode.h"
 #include <dirent.h>
-#include <afs/afs_assert.h>
 #include <afs/errmap_nt.h>
 
 #define BASEFILEATTRIBUTE FILE_ATTRIBUTE_NORMAL
index 9d882e71f673258e72f39a3ae23b3af3e0650954..b0b426265dd486422261330c82cae559f5e8aaba 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 
 #include <afs/afsutil.h>
 
index 0cbc462663474448d517792def66f76565cff6ff..235ee6c9542e556b27bb645ae62834dcd4d9eaed 100644 (file)
 #include "vnode.h"
 #include "volume.h"
 #include "partition.h"
-#include <afs/afs_assert.h>
 
 #if defined(AFS_HPUX_ENV)
 #include <sys/types.h>
index fb5ac8708015bfe9ed9a544d4f0a38edf958b203..b23401ea3f54a69de982bbfefd76508ace7459b7 100644 (file)
@@ -22,7 +22,6 @@
 #include <sys/file.h>
 #endif
 
-#include <afs/afs_assert.h>
 #include <afs/afsutil.h>
 
 #include <rx/xdr.h>
index 684527e859a1b65dd559c7e3fce36a79369e1e6c..31d5bc8920ce9b5fc10a3fd8c6c697952db7a9cb 100644 (file)
@@ -34,7 +34,6 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 
 #if !defined(AFS_SGI_ENV) && !defined(AFS_NT40_ENV)
 #if defined(AFS_VFSINCL_ENV)
index b647b14d2c5a29ee9b41696075e0a9cb47215e2d..61fb3a09c5313d958da1b4b2bfbc1f97d8d5ad45 100644 (file)
@@ -37,7 +37,6 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #if !defined(AFS_SGI_ENV) && !defined(AFS_NT40_ENV)
 #if defined(AFS_VFSINCL_ENV)
 #include <sys/vnode.h>
index c9dea4aa82f49506ff72e85ac0c70ac769a41c83..b0458c899b72de9d6dc638c22201e15b1d31b5a5 100644 (file)
@@ -35,7 +35,6 @@
 #include <winsock2.h>
 #endif
 
-#include <afs/afs_assert.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include "nfs.h"
index fac9441b3eacefce04d799830ca430c0c946453d..109b8e5a0f0e61abfc0136c94edf57a79e5da236 100644 (file)
@@ -23,8 +23,6 @@
 
 #ifdef AFS_DEMAND_ATTACH_FS
 
-#include <afs/afs_assert.h>
-
 #include <lock.h>
 #include <afs/afsutil.h>
 #include <lwp.h>
index 7fc212ecd73f408c31dc1712063e6a44553a7493..44b727829b373b739b98dc85551412fdb6babbf3 100644 (file)
@@ -24,7 +24,6 @@
 
 #ifdef AFS_DEMAND_ATTACH_FS
 
-#include <afs/afs_assert.h>
 #include <lock.h>
 #include <afs/afsutil.h>
 #include <lwp.h>
index 531c48a7dfcae80804b077eef82e20ace7a1f7b8..424f0a707ae2ce890ec46c90a9df32fbcb708b27 100644 (file)
@@ -26,8 +26,6 @@
 #include <sys/file.h>
 #endif
 
-#include <afs/afs_assert.h>
-
 #include <rx/xdr.h>
 #include "rx/rx_queue.h"
 #include <afs/afsint.h>
index ccc94376a49b3332017754a6d5d7cbfa97b5bfd3..c770ce1bc9ab2694fdac3f890770a1f500991ac1 100644 (file)
@@ -101,7 +101,6 @@ Vnodes with 0 inode pointers in RW volumes are now deleted.
 #endif
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #if !defined(AFS_SGI_ENV) && !defined(AFS_NT40_ENV)
 #if defined(AFS_VFSINCL_ENV)
 #include <sys/vnode.h>
index afd2bf4db2cbffc0130380a7251419a75375e9ed..bca4bd3ed4a44d3d939253142092ccaa6648ddee 100644 (file)
@@ -22,6 +22,7 @@
 #include <afs/param.h>
 
 #include <roken.h>
+#include <afs/opr.h>
 
 #include <ctype.h>
 #include <stddef.h>
 #include "partition.h"
 #include "volume_inline.h"
 #include "common.h"
-#include "afs/afs_assert.h"
 #include "vutils.h"
 #include <afs/dir.h>
 
index 3f1f0afd75352dc9301508a9f5fbe5c4b999848e..48905820cc88d6124b8b10e27ce42725b4fac204 100644 (file)
@@ -18,6 +18,9 @@
 #endif
 
 #ifdef AFS_PTHREAD_ENV
+
+#include <afs/opr_assert.h>
+
 /**
  * @param[in] cv cond var
  * @param[in] ts deadline, or NULL to wait forever
index 1e0edc641b4fa00c8870867434f276886aa52c70..74eaaed831683b725a76399410632d478f77c252 100644 (file)
@@ -27,8 +27,6 @@
 #include <sys/lockf.h>
 #endif
 
-#include <afs/afs_assert.h>
-
 #include <rx/xdr.h>
 #include <afs/afsint.h>
 #include "nfs.h"
index 16f5e79211fbb265a14f24c13a189f19f0922aa4..55fab5719b7ecee2da0441a06979519f1955e255 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <ctype.h>
 
-#include <afs/afs_assert.h>
 #include <rx/xdr.h>
 #include <rx/rx.h>
 #include <afs/afsint.h>
index 00451004c711485d45a6e9341073a6971982f012..ccb474c09802eed51cdab470f5cc73e71c6e8704 100644 (file)
@@ -16,7 +16,6 @@
 #include <rx/rx.h>
 #include <afs/afsint.h>
 #include <afs/nfs.h>
-#include <afs/afs_assert.h>
 #include <afs/dir.h>
 #include <afs/ihandle.h>
 
index e8377cb8a2afaa8a705e1d30e2ad05a762fc74f5..5ee2bfbabf2a1003a2cb3e79fd0242c8919ef214 100644 (file)
@@ -15,7 +15,6 @@
 #endif
 
 #if defined(AFS_NAMEI_ENV) && !defined(AFS_NT40_ENV)
-#include <afs/afs_assert.h>
 #include <afs/dir.h>
 #include <rx/xdr.h>
 #include <afs/afsint.h>
index 72228530688796cbd15a14d9320bb06daf788caf..a8fab24ce776971cccb09b34162f4e9c1d430453 100644 (file)
@@ -19,7 +19,6 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
 #include <lwp.h>
index 5630f4343dd8b946d9867f6e42e979433dc2fec5..e7f68eb83dd394b6d62d9b1850075b28ae2ba757 100644 (file)
@@ -18,7 +18,6 @@
 #include <rx/rx.h>
 #include <rx/rxkad.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
 #include <lwp.h>
index 75ffce41a10749ba105d47f09ecf12941158976b..ab68f73affad03b03e7cff01068a411683c6366f 100644 (file)
@@ -10,7 +10,6 @@
 #ifndef _VOLSER_
 #define _VOLSER_ 1
 
-#include <afs/afs_assert.h>
 #ifdef AFS_PTHREAD_ENV
 #include <pthread.h>
 #endif
index 599d4c9948ca3b2c2b5db43c0e961ef54b667232..2e91f8cf0e7586deca4bce212fc2963199ee59a6 100644 (file)
@@ -24,7 +24,6 @@
 #endif
 
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 #include <afs/prs_fs.h>
 #include <afs/nfs.h>
 #include <lwp.h>