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 3a99343..8ea0ac7 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 e29705b..8012891 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 1e44de9..8ef360a 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 6375c02..d2ed9f8 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 e2c1e74..0b89142 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 e1e0b9c..c4d9d7d 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 e6c006e..8555428 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 de2e020..d58bf30 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 596ed55..f5299f9 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 3fe76f5..3f51bab 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 07ef9ad..d2edc38 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 2c08eb9..0ebd207 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 9020c70..b0433d0 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 f65c9ae..794d85a 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <roken.h>
 #include <afs/opr.h>
+#include <afs/opr_assert.h>
 
 #include <ctype.h>
 
index 5fa1efa..2391de3 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 1082f42..39c5ee6 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 72e2aef..e264e9d 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 d34bfb4..5f31d33 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 7bda375..aa10448 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 566cdbe..e434602 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 a10ee52..7957992 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 268ed93..7c8998f 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 20a4e82..b53211c 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 0d5327d..e55b679 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 4167054..3454983 100755 (executable)
        opr_stolower;
        opr_ucstring;
        opr_lcstring;
-       AssertionFailed;
+       opr_AssertionFailed;
        rx_GetLocalPeers;
        rx_GetMaxReceiveWindow;
        rx_GetMaxSendWindow;
index 0878675..ba24342 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 8fe341f..96c1fda 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 b4346df..e4df38f 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 58a1796..7e82a4b 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 91ed150..ba7b202 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 337f07b..f35b2f9 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 83a0cee..6b2d881 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 219ea27..0db628f 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 9975d39..b05436b 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 5bdfee6..2c9098e 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 205097a..f3c0b96 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 109c766..c1ac772 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 40fc4e8..3e59c4a 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 cc00dc3..f11267a 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 9c1b17c..37210ef 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 9285da8..b828a0c 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 25f92cb..ff0f30c 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 dd894b0..9c8efbc 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 f15ee28..9cb6f72 100644 (file)
@@ -15,6 +15,7 @@
 
 #include <ctype.h>
 
+#include <afs/opr.h>
 #include "afsutil.h"
 #include "ktime.h"
 
index c12aeb4..013cc82 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 c6414c9..1fe464b 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 1d63896..bc78041 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 7c5eae1..f32a506 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 e0e6480..79eb6dd 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 31d20d4..7e27751 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 7e422c0..fa949f4 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 7cdb18e..d9b9b18 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 fab7fcb..3d864a3 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 58b2b93..ac4eb4d 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 1131c30..eb236ec 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 8bca993..4c4f34c 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 09e2bf3..3db6078 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 b9aff77..5217a2c 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 07094a5..be35ca7 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 0d884bc..048cf59 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 3634f2f..ac3d122 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 f2e928d..789ec39 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 62191d9..811beae 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 5be28ef..f012ca0 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 9d882e7..b0b4262 100644 (file)
@@ -14,7 +14,6 @@
 
 #include <rx/xdr.h>
 #include <afs/afsint.h>
-#include <afs/afs_assert.h>
 
 #include <afs/afsutil.h>
 
index 0cbc462..235ee6c 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 fb5ac87..b23401e 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 684527e..31d5bc8 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 b647b14..61fb3a0 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 c9dea4a..b0458c8 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 fac9441..109b8e5 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 7fc212e..44b7278 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 531c48a..424f0a7 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 ccc9437..c770ce1 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 afd2bf4..bca4bd3 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 3f1f0af..4890582 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 1e0edc6..74eaaed 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 16f5e79..55fab57 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 0045100..ccb474c 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 e8377cb..5ee2bfb 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 7222853..a8fab24 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 5630f43..e7f68eb 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 75ffce4..ab68f73 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 599d4c9..2e91f8c 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>