Move des/stats.h to rxkad directory
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 15 Apr 2010 16:35:37 +0000 (17:35 +0100)
committerDerrick Brashear <shadow@dementia.org>
Thu, 23 Sep 2010 09:33:59 +0000 (02:33 -0700)
The structures defined in des/stats.h are rxkad specific, and so
should be handled by an rxkad header file, rather than by something
in the eventually-to-be-removed DES directory.

The structure shouldn't be initialised in libutil. Move initialisation
to rxkad_common, where it is already initialised in the pthread case.

Change-Id: I3de49cfe1752eaa5f273796516e2ff6c289d9533
Reviewed-on: http://gerrit.openafs.org/2576
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>

13 files changed:
src/des/Makefile.in
src/des/NTMakefile
src/rxkad/Makefile.in
src/rxkad/NTMakefile
src/rxkad/bg-fcrypt.c
src/rxkad/crypt_conn.c
src/rxkad/fcrypt.c
src/rxkad/rxkad_client.c
src/rxkad/rxkad_common.c
src/rxkad/rxkad_server.c
src/rxkad/stats.h [moved from src/des/stats.h with 98% similarity]
src/util/Makefile.in
src/util/rxkstats.c [deleted file]

index 5e46538..aa62815 100644 (file)
@@ -49,7 +49,6 @@ OBJS = \
 all: \
        ${TOP_LIBDIR}/libdes.a \
        ${TOP_INCDIR}/des.h \
-       ${TOP_INCDIR}/des/stats.h \
        ${TOP_INCDIR}/des_prototypes.h \
        ${TOP_INCDIR}/des_conf.h \
        ${TOP_INCDIR}/mit-cpyright.h \
@@ -65,7 +64,6 @@ buildtools: \
        make_odd \
        ${TOP_INCDIR}/des.h \
        ${TOP_INCDIR}/mit-cpyright.h \
-       ${TOP_INCDIR}/des/stats.h
 
 generated: \
        p.c \
@@ -82,9 +80,6 @@ ${TOP_LIBDIR}/libdes.a: libdes.a
 ${TOP_INCDIR}/des.h: des.h
        ${INSTALL_DATA} $? $@
 
-${TOP_INCDIR}/des/stats.h: stats.h
-       ${INSTALL_DATA} $? $@
-
 ${TOP_INCDIR}/des_prototypes.h: des_prototypes.h
        ${INSTALL_DATA} $? $@
 
index 35fe386..db073e3 100644 (file)
@@ -36,14 +36,10 @@ INCFILES =\
        $(INCFILEDIR)\mit-cpyright.h \
        $(INCFILEDIR)\des_odd.h \
        $(INCFILEDIR)\crypt.h \
-        $(INCFILEDIR)\des\stats.h
 
 $(INCFILEDIR)\des_odd.h: odd.h
        $(COPY) odd.h $@
 
-$(INCFILEDIR)\des\stats.h: stats.h
-        $(COPY) stats.h $@
-
 # Library component lists.
 
 LIBOBJS = \
index d458fdf..625b179 100644 (file)
@@ -41,7 +41,8 @@ generated: \
 depinstall: \
        ${TOP_INCDIR}/rx/rxkad.h \
        ${TOP_INCDIR}/rx/rxkad_prototypes.h \
-       ${TOP_INCDIR}/rx/fcrypt.h
+       ${TOP_INCDIR}/rx/fcrypt.h \
+       ${TOP_INCDIR}/rx/rxkad_stats.h
 
 ${TOP_LIBDIR}/librxkad.a: librxkad.a
        ${INSTALL_DATA} $? $@
@@ -55,6 +56,9 @@ ${TOP_INCDIR}/rx/rxkad.h: rxkad.h
 ${TOP_INCDIR}/rx/rxkad_prototypes.h: rxkad_prototypes.h
        ${INSTALL_DATA} $? $@
 
+${TOP_INCDIR}/rx/rxkad_stats.h: stats.h
+       ${INSTALL_DATA} $? $@
+
 #
 # Build targets
 #
index 00e71f1..faba33a 100644 (file)
@@ -48,6 +48,7 @@ $(LIBFILE): $(LIBOBJS)
 $(INCFILES):$$(@F)
         $(COPY)  $** $(INCFILEDIR)\.
         $(COPY)  fcrypt.h $(INCFILEDIR)\.
+        $(COPY)  stats.h $(INCFILEDIR)\rxkad_stats.h
 
 rxkad.h rxkad_errs.c : rxkad_errs.et rxkad.p.h
        $(DEL) rxkad_errs.c 
index 37fce4b..3318cb1 100644 (file)
@@ -70,7 +70,7 @@
 #include "rxkad.h"
 #include "fcrypt.h"
 #include "private_data.h"
-#include <des/stats.h>
+#include "stats.h"
 
 /*
  * Unrolling of the inner loops helps the most on pentium chips
index 4f78e0d..e535655 100644 (file)
@@ -44,7 +44,7 @@
 #endif
 #endif /* KERNEL */
 
-#include <des/stats.h>
+#include <rx/rxkad_stats.h>
 #include "private_data.h"
 #define XPRT_RXKAD_CRYPT
 
index baa785f..e6afb20 100644 (file)
@@ -55,7 +55,7 @@
 #include "sboxes.h"
 #include "fcrypt.h"
 #include <rxkad.h>
-#include <des/stats.h>
+#include <rx/rxkad_stats.h>
 
 #ifdef TCRYPT
 int ROUNDS = 16;
index 6643cda..a17787b 100644 (file)
@@ -59,7 +59,7 @@
 #endif /* AFS_PTHREAD_ENV */
 #endif /* KERNEL */
 
-#include <des/stats.h>
+#include "stats.h"
 #include "private_data.h"
 #define XPRT_RXKAD_CLIENT
 
index d1259f6..de57f42 100644 (file)
@@ -63,7 +63,7 @@
 #include <afs/afsutil.h>
 #endif /* KERNEL */
 
-#include <des/stats.h>
+#include "stats.h"
 #include "private_data.h"
 #define XPRT_RXKAD_COMMON
 
@@ -81,11 +81,7 @@ struct rxkad_global_stats rxkad_global_stats = { 0 };
 pthread_mutex_t rxkad_global_stats_lock;
 pthread_key_t rxkad_stats_key;
 #else /* AFS_PTHREAD_ENV */
-#if defined(KERNEL) && !defined(UKERNEL)
 struct rxkad_stats rxkad_stats = { { 0 } };
-#else
-/* Move delaration of this to des/key_sched.c */
-#endif
 #endif /* AFS_PTHREAD_ENV */
 
 #ifdef AFS_PTHREAD_ENV
index 7ba99fb..a0ca534 100644 (file)
 #include <rx/xdr.h>
 #include <des.h>
 #include <afs/afsutil.h>
-#include <des/stats.h>
 #ifdef HAVE_STDINT_H
 # include <stdint.h>
 #endif
+#include "stats.h"
 #include "private_data.h"
 #define XPRT_RXKAD_SERVER
 
similarity index 98%
rename from src/des/stats.h
rename to src/rxkad/stats.h
index bbb188a..9e878c1 100644 (file)
@@ -10,8 +10,8 @@
 /* Some Cheap statistics which should be shared with the rxkad definitions, but
  * aren't.  The layout should match the layout in rxkad/rxkad.p.h. */
 
-#ifndef OPENAFS_DES_STATS_H
-#define OPENAFS_DES_STATS_H
+#ifndef AFS_SRC_RXKAD_STATS_H
+#define AFS_SRC_RXKAD_STATS_H
 
 
 /* this is an optimization for pthreads environments.  Instead of having global
@@ -154,4 +154,4 @@ RXKAD_STATS_DECLSPEC struct rxkad_stats rxkad_stats;
 #endif
 
 
-#endif /* OPENAFS_DES_STATS_H */
+#endif /* AFS_SRC_DES_STATS_H */
index 0226e8f..dfcc7d7 100644 (file)
@@ -19,7 +19,7 @@ objects = assert.o base64.o casestrcpy.o config_file.o ktime.o volparse.o \
         hputil.o kreltime.o isathing.o get_krbrlm.o uuid.o serverLog.o \
         dirpath.o fileutil.o netutils.o flipbase64.o fstab.o \
         afs_atomlist.o afs_lhash.o snprintf.o strlcat.o strlcpy.o strnlen.o \
-        pthread_glock.o daemon.o rxkstats.o ${REGEX_OBJ}
+        pthread_glock.o daemon.o ${REGEX_OBJ}
 
 includes = \
        ${TOP_INCDIR}/afs/dirpath.h \
@@ -219,9 +219,6 @@ strnlen.o: ${srcdir}/strnlen.c ${includes}
 daemon.o: ${srcdir}/daemon.c ${includes}
        ${CCOBJ} ${CFLAGS} -c ${srcdir}/daemon.c
 
-rxkstats.o: ${srcdir}/rxkstats.c ${includes}
-       ${CCOBJ} ${CFLAGS} -c ${srcdir}/rxkstats.c
-
 #
 # Install targets
 #
diff --git a/src/util/rxkstats.c b/src/util/rxkstats.c
deleted file mode 100644 (file)
index 82e93f0..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <afsconfig.h>
-#include <afs/param.h>
-
-#include <des.h>
-#include <des/stats.h>
-
-#ifndef AFS_PTHREAD_ENV
-struct rxkad_stats rxkad_stats = { { 0 } };
-#else
-rxkad_stats_t rxkad_stats = { { 0 } };
-#endif