Remove AFS_PARISC_LINUX24_ENV references
[openafs.git] / src / venus / kdump.c
index 33e6372..3b76dc4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * 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
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID
-    ("$Header$");
+#include <roken.h>
 
-#include <stdio.h>
-#include <errno.h>
-#include <stdlib.h>            /* for malloc() */
+#include <afs/cmd.h>
 
+#if !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
 /* Here be hacks. */
 #ifdef AFS_LINUX24_ENV
 #define __KERNEL__
@@ -108,10 +106,6 @@ struct ncp_sb_info {
 #define _KERNEL 1
 #endif
 
-#ifndef        AFS_OSF_ENV
-#include <sys/param.h>
-#endif
-
 #ifndef AFS_LINUX20_ENV
 #include <nlist.h>
 #endif
@@ -121,61 +115,10 @@ struct ncp_sb_info {
 #endif
 
 #include <afs/stds.h>
-#include <sys/types.h>
-
-#if defined(AFS_OSF_ENV)
-#define        KERNEL
-#define        UNIX_LOCKS
-#define        _KERNEL 1
-#ifdef _KERN_LOCK_H_
-#include FFFFF
-#endif
-#include <sys/time.h>
-#include <kern/lock.h>
-#include <sys/vnode.h>
-#include <arch/alpha/pmap.h>
-
-/*
- * beginning with DUX 4.0A, the system header files define the macros
- *
- * KSEG_TO_PHYS()
- * IS_KSEG_VA()
- * IS_SEG1_VA()
- *
- * to be calls to the kernel functions
- *
- * kseg_to_phys()
- * is_kseg_va()
- * is_seg1_va()
- * 
- * when _KERNEL is defined, and expressions otherwise.  Since need
- * to define _KERNEL, we redefine these kernel functions as macros
- * for the expressions that we would have gotten if _KERNEL had not
- * been defined.  Yes, this duplicates code from the header files, but
- * there's no simple way around it.
- */
-
-#define kseg_to_phys(addr) ((vm_offset_t)(addr) - UNITY_BASE)
-#define is_kseg_va(x)   (((unsigned long)(x) & SEG1_BASE) == UNITY_BASE)
-#define is_seg1_va(x)   (((unsigned long)(x) & SEG1_BASE) == SEG1_BASE)
-
-#undef KERNEL
-#undef  _KERNEL
-#endif
 
 #ifdef AFS_SUN5_ENV /*XXXXX*/
 #include <sys/t_lock.h>
 struct vnode foo;
-#ifdef AFS_SUN54_ENV
-#else
-#ifdef AFS_SUN52_ENV
-typedef struct stat_mutex stat_mutex_t;
-#define        kmutex_t                stat_mutex_t
-#else
-typedef struct adaptive_mutex2 adaptive_mutex2_t;
-#define        kmutex_t        adaptive_mutex2_t
-#endif
-#endif
 #endif
 
 #ifdef AFS_SGI53_ENV
@@ -199,10 +142,6 @@ typedef struct adaptive_mutex2 adaptive_mutex2_t;
 #include <sys/user.h>
 #endif
 
-#ifndef AFS_LINUX20_ENV
-#include <sys/socket.h>
-#endif
-
 #ifndef AFS_LINUX26_ENV
 #include <sys/file.h>
 #endif
@@ -225,9 +164,7 @@ typedef struct adaptive_mutex2 adaptive_mutex2_t;
 # include <netinet/in.h>       /* struct in_addr */
 #endif
 
-#include <arpa/inet.h>         /* inet_ntoa() */
-
-#if defined(AFS_SGI_ENV) || defined(AFS_OSF_ENV)
+#if defined(AFS_SGI_ENV)
 #ifdef       AFS_SGI_ENV
 #include <sys/vnode.h>
 #endif /* AFS_SGI_ENV */
@@ -282,12 +219,6 @@ typedef struct adaptive_mutex2 adaptive_mutex2_t;
 struct timezone {
     int a, b;
 };
-#if 0                          /*ndef AFS_ALPHA_LINUX20_ENV */
-typedef struct timeval {
-    int tv_sec;
-    int tv_usec;
-} timeval_t;                   /* Needed here since KERNEL defined. */
-#endif /*AFS_ALPHA_LINUX20_ENV */
 #if defined(WORDS_BIGENDIAN)
 #define _LINUX_BYTEORDER_BIG_ENDIAN_H
 #else
@@ -351,7 +282,6 @@ typedef enum _spustate {    /* FROM /etc/conf/h/_types.h */
 #endif
 #endif
 #endif
-#include <signal.h>
 #endif
 
 /* AFS includes */
@@ -380,15 +310,6 @@ typedef kmutex_t afs_kmutex_t;
 typedef kcondvar_t afs_kcondvar_t;
 #endif /* AFS_SUN5_ENV */
 
-#ifdef AFS_DUX40_ENV
-#define RX_ENABLE_LOCKS
-typedef struct {
-    unsigned long lock;
-    void *owner;
-} afs_kmutex_t;
-typedef int afs_kcondvar_t;
-#endif /* AFS_DUX40_ENV */
-
 #ifdef AFS_HPUX110_ENV
 #define RX_ENABLE_LOCKS
 typedef struct {
@@ -434,7 +355,7 @@ typedef void *afs_kcondvar_t;
 typedef struct {
     int tv_sec;
     int tv_usec;
-} osi_timeval_t;               /* Needed here since KERNEL defined. */
+} osi_timeval32_t;             /* Needed here since KERNEL defined. */
 
 /*#include "afs/volerrors.h"*/
 #ifdef AFS_LINUX20_ENV
@@ -474,15 +395,6 @@ extern off64_t lseek64();
 
 #undef KERNEL
 
-#if defined(AFS_OSF_ENV) && !defined(v_count)
-#define v_count         v_usecount
-#endif
-
-#ifdef AFS_OSF_ENV
-#define        KERNELBASE      0x80000000
-#define        coreadj(x)      ((int)x - KERNELBASE)
-#endif
-
 #if defined(AFS_SGI_ENV)
 #define UNIX "/unix"
 #else
@@ -556,9 +468,6 @@ void print_cmstats();
 
 
 
-#ifndef AFS_KDUMP_LIB
-extern struct cmd_syndesc *cmd_CreateSyntax();
-#endif
 int opencore();
 
 #if    defined(AFS_HPUX_ENV) && defined(__LP64__)
@@ -608,9 +517,6 @@ int Dgcpags = 0;
 #include <sys/elf.h>
 #include <libelf.h>
 #include <sys/elf_M32.h>
-#ifndef        AFS_SUN54_ENV
-typedef ulong_t k_fltset_t;    /* XXXXXXXXXXX */
-#endif /* !AFS_SUN54_ENV */
 #include <sys/proc.h>
 #include <sys/file.h>
 #define        _NLIST_H                /* XXXXXXXXXXXXX */
@@ -644,9 +550,6 @@ PrintIPAddr(int addr)
 
 #ifdef AFS_LINUX20_ENV
 /* Find symbols in a live kernel. */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
 
 #ifdef AFS_LINUX26_ENV
 #define KSYMS "/proc/kallsyms"
@@ -701,7 +604,7 @@ read_ksyms(void)
     }
 
     availksyms = KSYM_ALLOC_BASE;
-    ksyms = (symlist_t *) malloc(availksyms * sizeof(symlist_t));
+    ksyms = malloc(availksyms * sizeof(symlist_t));
     if (!ksyms) {
        printf("Can't malloc %d elements for symbol list.\n", availksyms);
        exit(1);
@@ -711,8 +614,7 @@ read_ksyms(void)
     while (fgets(line, MAXLINE, fp)) {
        if (nksyms >= availksyms) {
            availksyms += KSYM_ALLOC_STEP;
-           ksyms =
-               (symlist_t *) realloc(ksyms, availksyms * sizeof(symlist_t));
+           ksyms = realloc(ksyms, availksyms * sizeof(symlist_t));
            if (!ksyms) {
                printf("Failed to realloc %d symbols.\n", availksyms);
                exit(1);
@@ -826,15 +728,15 @@ symsrch(s)
 
 #endif /*defined(AFS_SUN5_ENV) */
 
+#endif /*!defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV) */
 
 #ifndef AFS_KDUMP_LIB
-static
-cmdproc(as, arock)
-     register struct cmd_syndesc *as;
-     afs_int32 arock;
+static int
+cmdproc(struct cmd_syndesc *as, void *arock)
 {
-    register afs_int32 code = 0;
+    afs_int32 code = 0;
 
+#if !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
     if (as->parms[0].items) {  /* -kobj */
        obj = as->parms[0].items->data;
     }
@@ -934,6 +836,7 @@ cmdproc(as, arock)
     if (as->parms[31].items) { /* -dhash */
        DdvnextTbl = 1, DdcnextTbl = 1, Dall = 0;
     }
+#endif
 
     code = kdump();
     return code;
@@ -941,12 +844,11 @@ cmdproc(as, arock)
 
 #include "AFS_component_version_number.c"
 
-main(argc, argv)
-     int argc;
-     char **argv;
+int
+main(int argc, char **argv)
 {
-    register struct cmd_syndesc *ts;
-    register afs_int32 code;
+    struct cmd_syndesc *ts;
+    afs_int32 code;
 
 #ifdef AFS_AIX32_ENV
     struct sigaction nsa;
@@ -957,7 +859,7 @@ main(argc, argv)
     sigaction(SIGSEGV, &nsa, NULL);
 #endif
 
-    ts = cmd_CreateSyntax(NULL, cmdproc, 0,
+    ts = cmd_CreateSyntax(NULL, cmdproc, NULL, 0,
                          "Read internal cache manager structs");
     cmd_AddParm(ts, "-kobj", CMD_SINGLE, CMD_OPTIONAL,
                "kernel object (default /vmunix)");
@@ -1020,11 +922,10 @@ main(argc, argv)
 
 #ifdef AFS_AIX_ENV
 #ifndef AFS_KDUMP_LIB
-Knlist(sp, cnt, size)
-     struct afs_nlist *sp;
-     int cnt, size;
+int
+Knlist(struct afs_nlist *sp, int cnt, int size)
 {
-    register int code;
+    int code;
 
     if (UserLevel)
        code = nlist(obj, sp);
@@ -1079,15 +980,6 @@ findsym(char *sname, off_t * offset)
                    errno, strerror(errno));
            exit(1);
        }
-#if    defined(AFS_OSF_ENV)
-       if (mem) {
-           long X;
-
-           X = coreadj(request[0].n_value);
-           request[0].n_value = X;
-       }
-#endif /* defined(AFS_OSF_ENV) */
-
        *offset = request[0].n_value;
        if (!request[0].n_value) {
            printf("(WARNING) Couldn't find %s in %s. Proceeding..\n", sname,
@@ -1102,12 +994,13 @@ findsym(char *sname, off_t * offset)
 
 #define CBHTSIZE 128
 
-kdump()
+int
+kdump(void)
 {
-    int cell, cnt, cnt1;
 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
     printf("Kdump not supported\n");
 #else
+    int cell, cnt, cnt1;
 #ifndef AFS_KDUMP_LIB
 
     kmem = opencore(core);
@@ -1252,8 +1145,7 @@ int Sum_vcachemvids = 0, Sum_vcachelinkData = 0, Sum_vcacheacc =
 int Sum_cellaliases = 0, Sum_cellname_names = 0;
 
 int
-print_cells(pnt)
-     int pnt;
+print_cells(int pnt)
 {
     off_t symoff;
     struct cell *cells, cle, *clentry = &cle, *clep;
@@ -1344,8 +1236,7 @@ print_cellnames(int pnt)
 }
 
 int
-print_users(pnt)
-     int pnt;
+print_users(int pnt)
 {
     off_t symoff;
     struct unixuser *afs_users[NUSERS], ue, *uentry = &ue, *uep;
@@ -1371,8 +1262,7 @@ afs_int32 NserversFound = 0;
 #define SF_ALLOCATION_STEP 500
 
 int
-add_found_server(sep)
-     struct server *sep;
+add_found_server(struct server *sep)
 {
     static afs_int32 NserversAllocated = 0;
     static afs_int32 failed = 0;
@@ -1383,14 +1273,12 @@ add_found_server(sep)
     if (NserversFound >= NserversAllocated) {
        NserversAllocated += SF_ALLOCATION_STEP;
        if (!serversFound) {
-           serversFound =
-               (struct server **)malloc(NserversAllocated *
-                                        sizeof(struct server *));
+           serversFound = malloc(NserversAllocated *
+                                 sizeof(struct server *));
        } else {
-           serversFound =
-               (struct server **)realloc((char *)serversFound,
-                                         NserversAllocated *
-                                         sizeof(struct server *));
+           serversFound = realloc(serversFound,
+                                  NserversAllocated *
+                                  sizeof(struct server *));
        }
        if (!serversFound) {
            printf("Can't allocate %lu bytes for list of found servers.\n",
@@ -1405,8 +1293,7 @@ add_found_server(sep)
 }
 
 int
-find_server(sep)
-     struct server *sep;
+find_server(struct server *sep)
 {
     int i;
 
@@ -1418,8 +1305,7 @@ find_server(sep)
 }
 
 int
-print_servers(pnt)
-     int pnt;
+print_servers(int pnt)
 {
     off_t symoff;
     struct server *afs_servers[NSERVERS], se, *sentry = &se, *sep;
@@ -1430,7 +1316,7 @@ print_servers(pnt)
     int chainCount[NSERVERS];
 
     if (pnt) {
-       memset((char *)chainCount, 0, sizeof(chainCount));
+       memset(chainCount, 0, sizeof(chainCount));
        printf("\n\nPrinting 'afs_servers' structures...\n");
     }
     findsym("afs_servers", &symoff);
@@ -1468,7 +1354,7 @@ print_servers(pnt)
 
     /* Verify against afs_totalServers. */
     if (pnt) {
-       memset((char *)chainCount, 0, sizeof(chainCount));
+       memset(chainCount, 0, sizeof(chainCount));
        if (findsym("afs_totalServers", &symoff)) {
            kread(kmem, symoff, (char *)&afs_totalServers, sizeof(afs_int32));
            if (afs_totalServers != nServers) {
@@ -1543,8 +1429,7 @@ print_servers(pnt)
 
 
 void
-print_Conns(pnt)
-     int pnt;
+print_Conns(int pnt)
 {
     off_t symoff;
     struct server *afs_servers[NSERVERS], se, *sentry = &se, *sep;
@@ -1566,8 +1451,7 @@ print_Conns(pnt)
 
 
 int
-print_volumes(pnt)
-     int pnt;
+print_volumes(int pnt)
 {
     off_t symoff;
     struct volume *afs_volumes[NVOLS], ve, *ventry = &ve, *vep;
@@ -1589,8 +1473,7 @@ print_volumes(pnt)
 }
 
 void
-print_cbHash(pnt)
-     int pnt;
+print_cbHash(int pnt)
 {
     off_t symoff;
     struct afs_q cbHashT[CBHTSIZE];
@@ -1610,8 +1493,7 @@ print_cbHash(pnt)
 }
 
 int
-print_vcaches(pnt)
-     int pnt;
+print_vcaches(int pnt)
 {
     off_t symoff;
     struct vcache *afs_vhashTable[VCSIZE], Ve, *Ventry = &Ve, *Vep;
@@ -1641,8 +1523,7 @@ print_vcaches(pnt)
 }
 
 int
-print_dcaches(pnt)
-     int pnt;
+print_dcaches(int pnt)
 {
     off_t symoff;
     long table, *ptr;
@@ -1657,7 +1538,7 @@ print_dcaches(pnt)
     kread(kmem, symoff, (char *)&count, sizeof count);
     findsym("afs_indexTable", &symoff);
     kread(kmem, symoff, (char *)&table, sizeof(long));
-    ptr = (long *)malloc(count * sizeof(long));
+    ptr = malloc(count * sizeof(long));
     kread(kmem, table, (char *)ptr, count * sizeof(long));
     for (i = 0, j = 0; i < count; i++) {
        if (dp = (struct dcache *)ptr[i]) {
@@ -1681,8 +1562,7 @@ print_dcaches(pnt)
 
 
 void
-print_DindexTimes(pnt)
-     int pnt;
+print_DindexTimes(int pnt)
 {
     off_t symoff;
     long table;
@@ -1697,7 +1577,7 @@ print_DindexTimes(pnt)
     kread(kmem, symoff, (char *)&count, sizeof count);
     findsym("afs_indexTimes", &symoff);
     kread(kmem, symoff, (char *)&table, sizeof(long));
-    ptr = (afs_hyper_t *) malloc(count * sizeof(afs_hyper_t));
+    ptr = malloc(count * sizeof(afs_hyper_t));
     kread(kmem, table, (char *)ptr, count * sizeof(afs_hyper_t));
     for (i = 0, j = 0; i < count; i++) {
        if (pnt)
@@ -1718,8 +1598,7 @@ print_DindexTimes(pnt)
 
 
 void
-print_DdvnextTbl(pnt)
-     int pnt;
+print_DdvnextTbl(int pnt)
 {
     off_t symoff;
     long table;
@@ -1734,7 +1613,7 @@ print_DdvnextTbl(pnt)
     kread(kmem, symoff, (char *)&count, sizeof count);
     findsym("afs_dvnextTbl", &symoff);
     kread(kmem, symoff, (char *)&table, sizeof(long));
-    ptr = (afs_int32 *) malloc(count * sizeof(afs_int32));
+    ptr = malloc(count * sizeof(afs_int32));
     kread(kmem, table, (char *)ptr, count * sizeof(afs_int32));
     for (i = 0, j = 0; i < count; i++) {
        if (pnt)
@@ -1748,8 +1627,7 @@ print_DdvnextTbl(pnt)
 
 
 void
-print_DdcnextTbl(pnt)
-     int pnt;
+print_DdcnextTbl(int pnt)
 {
     off_t symoff;
     long table;
@@ -1764,7 +1642,7 @@ print_DdcnextTbl(pnt)
     kread(kmem, symoff, (char *)&count, sizeof count);
     findsym("afs_dcnextTbl", &symoff);
     kread(kmem, symoff, (char *)&table, sizeof(long));
-    ptr = (afs_int32 *) malloc(count * sizeof(afs_int32));
+    ptr = malloc(count * sizeof(afs_int32));
     kread(kmem, table, (char *)ptr, count * sizeof(afs_int32));
     for (i = 0, j = 0; i < count; i++) {
        if (pnt)
@@ -1778,8 +1656,7 @@ print_DdcnextTbl(pnt)
 
 
 void
-print_DindexFlags(pnt)
-     int pnt;
+print_DindexFlags(int pnt)
 {
     off_t symoff;
     afs_int32 count;
@@ -1795,7 +1672,7 @@ print_DindexFlags(pnt)
     kread(kmem, symoff, (char *)&count, sizeof count);
     findsym("afs_indexFlags", &symoff);
     kread(kmem, symoff, (char *)&table, sizeof(long));
-    flags = (unsigned char *)malloc(count * sizeof(char));
+    flags = malloc(count * sizeof(char));
     kread(kmem, table, flags, count * sizeof(char));
     for (i = 0, j = 0; i < count; i++) {
        if (pnt)
@@ -1809,8 +1686,7 @@ print_DindexFlags(pnt)
 
 
 void
-print_buffers(pnt)
-     int pnt;
+print_buffers(int pnt)
 {
     off_t symoff;
     long table;
@@ -1825,7 +1701,7 @@ print_buffers(pnt)
     kread(kmem, symoff, (char *)&table, sizeof(long));
     findsym("nbuffers", &symoff);
     kread(kmem, symoff, (char *)&count, sizeof(int));
-    buffers = (unsigned char *)malloc(count * sizeof(struct buffer));
+    buffers = malloc(count * sizeof(struct buffer));
     kread(kmem, table, buffers, count * sizeof(struct buffer));
     bp = (struct buffer *)buffers;
     for (i = 0, j = 0; i < count; i++, bp++) {
@@ -1850,8 +1726,7 @@ print_buffers(pnt)
 
 
 int
-print_nfss(pnt)
-     int pnt;
+print_nfss(int pnt)
 {
     off_t symoff;
     struct afs_exporter *exp_entry, ex, *exp = &ex, *exp1;
@@ -1957,8 +1832,7 @@ print_alloced_memlist(void)
 #endif
 
 void
-print_allocs(pnt)
-     int pnt;
+print_allocs(int pnt)
 {
     off_t symoff;
     long count, i, j, k, l, m, n, T = 0, tvs;
@@ -2010,10 +1884,10 @@ print_allocs(pnt)
     T += j;
     printf("%20s:\t%8d bytes\t[%d servers/%d bytes each]\n", "Server package",
           j, i, sizeof(struct server));
-    j = (Nconns * sizeof(struct conn));
+    j = (Nconns * sizeof(struct afs_conn));
     T += j;
     printf("%20s:\t%8d bytes\t[%d conns/%d bytes each]\n",
-          "Connection package", j, Nconns, sizeof(struct conn));
+          "Connection package", j, Nconns, sizeof(struct afs_conn));
 
     i = (AFS_NCBRS * sizeof(struct afs_cbr)) * (j =
                                                afs_cmperfstats.
@@ -2122,13 +1996,11 @@ print_allocs(pnt)
     T += i;
     printf("%20s:\t%8d bytes\t[%d entries/%d bytes each]\n", "Buffer package",
           i, j, sizeof(struct buffer));
-#if    !AFS_USEBUFFERS
 #define        AFS_BUFFER_PAGESIZE 2048
     i = j * AFS_BUFFER_PAGESIZE;
     T += i;
     printf("%20s:\t%8d bytes\t[%d entries/%d bytes each]\n",
           "Xtra Buffer pkg area", i, j, AFS_BUFFER_PAGESIZE);
-#endif
 
     Sum_exps = 0;
     Sum_nfssysnames = 0;
@@ -2238,11 +2110,11 @@ print_allocs(pnt)
 int
 readmem(kmem, buf, vad, len)
      int kmem, len;
-#ifdef AFS_SUN57_ENV
+#ifdef AFS_SUN5_ENV
      uintptr_t vad;
 #else
      int vad;
-#endif         /** AFS_SUN57_ENV **/
+#endif         /** AFS_SUN5_ENV **/
      char *buf;
 {
     int newlen;
@@ -2253,79 +2125,6 @@ readmem(kmem, buf, vad, len)
 }
 #endif
 
-#ifdef AFS_OSF_ENV
-static
-read_addr(int fd, unsigned long addr, unsigned long *val)
-{
-    if (lseek(fd, addr, SEEK_SET) == -1)
-       return (0);
-    if (read(fd, val, sizeof(long)) != sizeof(long))
-       return (0);
-    return (1);
-}
-
-static pt_entry_t *ptes = NULL;
-static
-addr_to_offset(unsigned long addr, unsigned long *ret, int fd)
-{
-    off_t symoff;
-    pt_entry_t pte, *val;
-    char *str, *ptr;
-
-    if (IS_SEG1_VA(addr)) {
-       if (ptes == NULL) {
-           int i, loc;
-           unsigned long loc1, loc2[2];
-           findsym("kernel_pmap", &symoff);
-           loc1 = coreadj(symoff);
-           /*printf("ptes=%lx -> %lx\n", symoff, loc1); */
-           if (lseek(fd, loc1, L_SET /*0 */ ) != loc1) {
-               perror("lseek");
-               exit(1);
-           }
-           if ((i = read(fd, (char *)&loc1, sizeof(long))) != sizeof(long)) {
-               printf("Read of kerne_map failed\n");
-               return;         /*exit(1); */
-           }
-           loc = loc1;
-           /*printf("loc1 %lx -> %lx\n",  loc1, loc); */
-           if (lseek(fd, loc, L_SET /*0 */ ) != loc) {
-               perror("lseek");
-               exit(1);
-           }
-           if ((i =
-                read(fd, (char *)loc2,
-                     2 * sizeof(long))) != 2 * sizeof(long)) {
-               printf("Read of kerne_map failed\n");
-               return;         /*exit(1); */
-           }
-           ptes = (pt_entry_t *) loc2[1];
-           /*printf("ptes=%lx\n", ptes); */
-
-       }
-       if (!addr_to_offset
-           ((unsigned long)(ptes + LEVEL1_PT_OFFSET(addr)),
-            (unsigned long *)&val, fd))
-           return (0);
-       if (!read_addr(fd, (unsigned long)val, (unsigned long *)&pte))
-           return (0);
-       val = ((pt_entry_t *) PTETOPHYS(&pte)) + LEVEL2_PT_OFFSET(addr);
-       if (!read_addr(fd, (unsigned long)val, (unsigned long *)&pte))
-           return (0);
-       val = ((pt_entry_t *) PTETOPHYS(&pte)) + LEVEL3_PT_OFFSET(addr);
-       if (!read_addr(fd, (unsigned long)val, (unsigned long *)&pte))
-           return (0);
-       *ret = PTETOPHYS(&pte) + (addr & ((1 << PGSHIFT) - 1));
-       return (1);
-    } else if (IS_KSEG_VA(addr)) {
-       *ret = KSEG_TO_PHYS(addr);
-       return (1);
-    } else {
-       return (0);
-    }
-}
-#endif
-
 #ifndef AFS_KDUMP_LIB
 void
 kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
@@ -2334,19 +2133,6 @@ kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
 
     memset(buf, 0, len);
 
-#ifdef AFS_OSF_ENV
-    if (mem) {
-       unsigned long ret;
-       i = addr_to_offset(loc, &ret, kmem);
-       if (i == 1)
-           loc = ret;
-       else {
-           unsigned long loc1;
-           loc1 = coreadj(loc);
-           loc = loc1;
-       }
-    }
-#else
 #if    defined(sparc) && !defined(__linux__)
 #ifndef AFS_SUN5_ENV
     if (mem) {
@@ -2357,7 +2143,6 @@ kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
     }
 #endif
 #endif
-#endif
 #if    ! defined(AFS_SUN5_ENV)
 #if defined(AFS_SGI61_ENV) && !defined(AFS_32BIT_KERNEL_ENV)
     if (lseek64(kmem, loc, L_SET /*0 */ ) != loc)
@@ -2368,8 +2153,8 @@ kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
        perror("lseek");
        exit(1);
     }
-    if (loc == 0) 
-       printf("WARNING: Read failed: loc=0\n"); 
+    if (loc == 0)
+       printf("WARNING: Read failed: loc=0\n");
     else
        if ((i = read(kmem, buf, len)) != len) {
            printf("WARNING: Read failed: ");
@@ -2394,7 +2179,8 @@ kread(int kmem, off_t loc, void *buf, KDUMP_SIZE_T len)
   * the macro RDSYMBOLS
   */
 
-rdsymbols()
+void
+rdsymbols(void)
 {
 
     FILE *fp;
@@ -2457,8 +2243,7 @@ rdsymbols()
 
 
 int
-opencore(core)
-     char *core;
+opencore(char *core)
 {
 #ifdef AFS_KDUMP_LIB
     return 0;
@@ -2494,9 +2279,8 @@ opencore(core)
 
 
 void
-print_exporter(kmem, exporter, ptr, pnt)
-     int kmem, pnt;
-     struct afs_exporter *exporter, *ptr;
+print_exporter(int kmem, struct afs_exporter *exporter,
+              struct afs_exporter *ptr, int pnt)
 {
     if (pnt) {
        printf("\tstates=%x, type=%x, *data=%lx\n", exporter->exp_states,
@@ -2510,9 +2294,8 @@ print_exporter(kmem, exporter, ptr, pnt)
 
 
 void
-print_nfsclient(kmem, ep, ptr, pnt)
-     int kmem, pnt;
-     struct nfsclientpag *ep, *ptr;
+print_nfsclient(int kmem, struct nfsclientpag *ep,
+               struct nfsclientpag *ptr, int pnt)
 {
     char sysname[100];
        int count;
@@ -2532,25 +2315,16 @@ print_nfsclient(kmem, ep, ptr, pnt)
 
 
 #if    defined(AFS_SUN5_ENV)
-pmutex(sp, mp)
-     char *sp;
-     kmutex_t *mp;
+void
+pmutex(char *sp, kmutex_t *mp)
 {
-#ifdef AFS_SUN54_ENV
-
-#else
-    struct stat_mutex *smp = (struct stat_mutex *)mp;
-
-    printf("%s mutex: %x %x\n", sp, smp->m_stats_lock, smp->m_type);
-#endif
 }
 
 #endif
 
 void
-print_unixuser(kmem, uep, ptr, pnt)
-     int kmem, pnt;
-     struct unixuser *uep, *ptr;
+print_unixuser(int kmem, struct unixuser *uep,
+              struct unixuser *ptr, int pnt)
 {
     Sum_userstp += uep->stLen;
     if (pnt) {
@@ -2570,9 +2344,7 @@ print_unixuser(kmem, uep, ptr, pnt)
 }
 
 void
-print_cell(kmem, clep, ptr, pnt)
-     int kmem, pnt;
-     struct cell *clep, *ptr;
+print_cell(int kmem, struct cell *clep, struct cell *ptr, int pnt)
 {
     int i;
     char cellName[100];
@@ -2592,7 +2364,7 @@ print_cell(kmem, clep, ptr, pnt)
            printf("\tlinked cellp %lx\n", clep->lcellp);
 #endif
        printf("\tCell's servers: ");
-       for (i = 0; i < MAXCELLHOSTS; i++) {
+       for (i = 0; i < AFS_MAXCELLHOSTS; i++) {
            if (pretty && (clep->cellHosts[i] == 0))
                break;
            printf("[%lx] ", clep->cellHosts[i]);
@@ -2603,9 +2375,8 @@ print_cell(kmem, clep, ptr, pnt)
 
 
 void
-print_server(kmem, sep, ptr, conns, pnt)
-     int kmem, conns, pnt;
-     struct server *sep, *ptr;
+print_server(int kmem, struct server *sep, struct server *ptr, int conns,
+            int pnt)
 {
     struct srvAddr sa, *sap = &sa, *sap1;
     int j, mh = 0, cnt;
@@ -2671,15 +2442,13 @@ print_server(kmem, sep, ptr, conns, pnt)
 
 
 void
-print_conns(kmem, srv, conns, Con, pnt)
-     int kmem, Con, pnt;
-     struct srvAddr *srv;
-     struct conn *conns;
+print_conns(int kmem, struct srvAddr *srv, struct afs_conn *conns, int Con,
+           int pnt)
 {
-    struct conn *cep, ce, *centry = &ce;
+    struct afs_conn *cep, ce, *centry = &ce;
     int i = 1;
 
-    cep = (struct conn *)conns;
+    cep = (struct afs_conn *)conns;
     if (pnt && Con != 2) {
        if (cep)
            printf("\tRPC connections for server %lx:\n", srv);
@@ -2696,9 +2465,7 @@ print_conns(kmem, srv, conns, Con, pnt)
 
 
 void
-print_conn(kmem, conns, ptr, pnt)
-     int kmem, pnt;
-     struct conn *conns, *ptr;
+print_conn(int kmem, struct afs_conn *conns, struct afs_conn *ptr, int pnt)
 {
     if (!pnt)
        return;
@@ -2710,9 +2477,7 @@ print_conn(kmem, conns, ptr, pnt)
 
 
 void
-print_volume(kmem, vep, ptr, pnt)
-     int kmem, pnt;
-     struct volume *vep, *ptr;
+print_volume(int kmem, struct volume *vep, struct volume *ptr, int pnt)
 {
     int i;
     afs_int32 *loc;
@@ -2732,22 +2497,22 @@ print_volume(kmem, vep, ptr, pnt)
           vep->backVol);
 #ifdef AFS33
     printf
-       ("\trwVol=%d, AcTime=%d, copyDate=%d, expTime=%d, vtix=%d, refC=%d, states=%x\n",
-        vep->rwVol, vep->accessTime, vep->copyDate, vep->expireTime,
+       ("\trwVol=%d, setupTime=%d, copyDate=%d, expTime=%d, vtix=%d, refC=%d, states=%x\n",
+        vep->rwVol, vep->setupTime, vep->copyDate, vep->expireTime,
         vep->vtix, vep->refCount, vep->states);
 #else
     printf
-       ("\trwVol=%d, AcTime=%d, copyDate=%d, vtix=%d, refC=%d, states=%x\n",
-        vep->rwVol, vep->accessTime, vep->copyDate, vep->vtix, vep->refCount,
+       ("\trwVol=%d, setupTime=%d, copyDate=%d, vtix=%d, refC=%d, states=%x\n",
+        vep->rwVol, vep->setupTime, vep->copyDate, vep->vtix, vep->refCount,
         vep->states);
 #endif
     printf("\tVolume's statuses: ");
-    for (i = 0; i < MAXHOSTS && vep->serverHost[i]; i++)
+    for (i = 0; i < AFS_MAXHOSTS && vep->serverHost[i]; i++)
        printf("[%d] ", vep->status[i]);
     printf("\n");
 
     printf("\tVolume's servers: ");
-    for (i = 0; i < MAXHOSTS && vep->serverHost[i]; i++)
+    for (i = 0; i < AFS_MAXHOSTS && vep->serverHost[i]; i++)
        printf("[%lx] ", vep->serverHost[i]);
     printf("\n");
 
@@ -2767,9 +2532,7 @@ print_volume(kmem, vep, ptr, pnt)
 
 
 void
-print_venusfid(string, vid)
-     char *string;
-     struct VenusFid *vid;
+print_venusfid(char *string, struct VenusFid *vid)
 {
     printf("%s(c=%x, v=%d, n=%d, u=%d)", string, vid->Cell, vid->Fid.Volume,
           vid->Fid.Vnode, vid->Fid.Unique);
@@ -2777,9 +2540,7 @@ print_venusfid(string, vid)
 
 
 void
-print_vnode(kmem, vep, ptr, pnt)
-     int kmem, pnt;
-     struct vnode *vep, *ptr;
+print_vnode(int kmem, struct vnode *vep, struct vnode *ptr, int pnt)
 {
 #ifdef AFS_AIX_ENV
     struct gnode gnode;
@@ -2841,13 +2602,8 @@ print_vnode(kmem, vep, ptr, pnt)
           vep->i_dev, vep->i_rdev, vep->i_sb);
 #endif /* AFS_LINUX26_ENV */
 #ifdef AFS_LINUX24_ENV
-#ifdef AFS_PARISC_LINUX24_ENV
-    printf("\ti_sem: count=%d, wait=0x%x\n", vep->i_sem.count,
-          vep->i_sem.wait);
-#else
     printf("\ti_sem: count=%d, sleepers=%d, wait=0x%x\n", vep->i_sem.count,
           vep->i_sem.sleepers, vep->i_sem.wait);
-#endif
 #else
     printf("\ti_sem: count=%d, waking=%d, wait=0x%x\n", vep->i_sem.count,
           vep->i_sem.waking, vep->i_sem.wait);
@@ -2865,9 +2621,7 @@ print_vnode(kmem, vep, ptr, pnt)
 }
 
 void
-print_vcache(kmem, vep, ptr, pnt)
-     int kmem, pnt;
-     struct vcache *vep, *ptr;
+print_vcache(int kmem, struct vcache *vep, struct vcache *ptr, int pnt)
 {
     long *loc, j = 0;
     char *cloc;
@@ -3004,9 +2758,7 @@ print_vcache(kmem, vep, ptr, pnt)
 
 
 void
-print_dcache(kmem, dcp, dp, pnt)
-     int kmem, pnt;
-     struct dcache *dcp, *dp;
+print_dcache(int kmem, struct dcache *dcp, struct dcache *dp, int pnt)
 {
     if (!pnt)
        return;
@@ -3024,7 +2776,7 @@ print_dcache(kmem, dcp, dp, pnt)
 #endif
 #ifdef AFS_SGI62_ENV
     printf
-       ("\tf.chunk=%d, f.inode=%lld, f.chunkBytes=%d, f.states=%x",
+       ("\tf.chunk=%d, f.inode=%" AFS_INT64_FMT ", f.chunkBytes=%d, f.states=%x",
         dcp->f.chunk, dcp->f.inode, dcp->f.chunkBytes, dcp->f.states);
 #else
     printf
@@ -3036,8 +2788,7 @@ print_dcache(kmem, dcp, dp, pnt)
 }
 
 void
-print_bkg(kmem)
-     int kmem;
+print_bkg(int kmem)
 {
     off_t symoff;
     struct brequest afs_brs[NBRS], ue, *uentry = &ue, *uep;
@@ -3070,8 +2821,7 @@ print_bkg(kmem)
 }
 
 void
-print_vlru(kmem)
-     int kmem;
+print_vlru(int kmem)
 {
     off_t symoff;
     struct vcache Ve, *Ventry = &Ve, *Vep, *tvc;
@@ -3083,17 +2833,6 @@ print_vlru(kmem)
     printf("\n\nPrinting vcache VLRU info (oldest first)...\n\n");
     findsym("afs_cacheStats", &symoff);
     kread(kmem, symoff, (char *)&maxvcount, sizeof maxvcount);
-#ifdef AFS_OSF_ENV
-    findsym("afs_maxvcount", &symoff);
-    kread(kmem, symoff, (char *)&maxvcount, sizeof maxvcount);
-    findsym("afs_vcount", &symoff);
-    kread(kmem, symoff, (char *)&vcount, sizeof vcount);
-    findsym("max_vnodes", &symoff);
-    kread(kmem, symoff, (char *)&nvnode, sizeof nvnode);
-    printf("max number of vcache entries = %d\n", maxvcount);
-    printf("number of vcaches in use = %d\n", vcount);
-    printf("total number of system vnode entries = %d\n", nvnode);
-#endif
     findsym("VLRU", &symoff);
     kread(kmem, symoff, (char *)&VLRU, sizeof VLRU);
     vlru_addr = (u_long) symoff;
@@ -3109,8 +2848,7 @@ print_vlru(kmem)
 }
 
 void
-print_dlru(kmem)
-     int kmem;
+print_dlru(int kmem)
 {
     off_t symoff;
     struct dcache Ve, *Ventry = &Ve, *Vep, *tdc;
@@ -3148,8 +2886,7 @@ print_dlru(kmem)
 }
 
 int
-print_gcpags(pnt)
-     int pnt;
+print_gcpags(int pnt)
 {
     off_t symoff;
     afs_int32 afs_gcpags;
@@ -3193,8 +2930,7 @@ struct callo {
 #endif
 
 void
-print_callout(kmem)
-     int kmem;
+print_callout(int kmem)
 {
     off_t symoff;
 #ifndef        AFS_AIX_ENV
@@ -3203,7 +2939,7 @@ print_callout(kmem)
     struct callo Co, *Coe = &Co, *Cop;
     struct tos To, *Toe = &To, *tos;
     struct trb Trb, *Trbe = &Trb, *trb;
-    register int i = 0;
+    int i = 0;
 
 
     printf("\n\nPrinting callout table info...\n\n");
@@ -3224,8 +2960,7 @@ print_callout(kmem)
 }
 
 void
-print_dnlc(kmem)
-     int kmem;
+print_dnlc(int kmem)
 {
     struct nc *nameHash[256];
 
@@ -3233,8 +2968,7 @@ print_dnlc(kmem)
 
 
 void
-print_global_locks(kmem)
-     int kmem;
+print_global_locks(int kmem)
 {
     off_t symoff;
     afs_int32 count;
@@ -3272,8 +3006,7 @@ print_global_locks(kmem)
 
 
 void
-print_global_afs_resource(kmem)
-     int kmem;
+print_global_afs_resource(int kmem)
 {
     off_t symoff;
     char sysname[100];
@@ -3310,8 +3043,7 @@ print_global_afs_resource(kmem)
 
 
 void
-print_global_afs_cache(kmem)
-     int kmem;
+print_global_afs_cache(int kmem)
 {
     off_t symoff;
     char sysname[100];
@@ -3327,11 +3059,9 @@ print_global_afs_cache(kmem)
     findsym("afs_mariner", &symoff);
     kread(kmem, symoff, (char *)&count, sizeof count);
     printf("\tafs_mariner = 0x%x\n", count);
-#ifndef        AFS_OSF_ENV
     findsym("freeVCList", &symoff);
     kread(kmem, symoff, (char *)&count, sizeof count);
     printf("\tafs_freeVCList = 0x%x XXX\n", count);
-#endif
     findsym("afs_freeDCList", &symoff);
     kread(kmem, symoff, (char *)&count, sizeof count);
     printf("\tfreeDCList = 0x%x\n", count);
@@ -3350,10 +3080,10 @@ print_global_afs_cache(kmem)
 #ifdef AFS_SGI62_ENV
     findsym("cacheInode", &symoff);
     kread(kmem, symoff, (char *)&inode, sizeof inode);
-    printf("\tcacheInode = 0x%llx (%lld)\n", inode, inode);
+    printf("\tcacheInode = 0x%llx (%" AFS_INT64_FMT ")\n", inode, inode);
     findsym("volumeInode", &symoff);
     kread(kmem, symoff, (char *)&inode, sizeof inode);
-    printf("\tvolumeInode = 0x%llx (%lld)\n", inode, inode);
+    printf("\tvolumeInode = 0x%llx (%" AFS_INT64_FMT ")\n", inode, inode);
 #else
     findsym("cacheInode", &symoff);
     kread(kmem, symoff, (char *)&count, sizeof count);
@@ -3407,13 +3137,12 @@ print_global_afs_cache(kmem)
 
 
 void
-print_rxstats(kmem)
-     int kmem;
+print_rxstats(int kmem)
 {
     off_t symoff;
     char sysname[100];
     afs_int32 count, i;
-    struct rx_stats rx_stats;
+    struct rx_statistics rx_stats;
 
     printf("\n\nPrinting some general RX stats...\n\n");
     findsym("rx_stats", &symoff);
@@ -3471,14 +3200,13 @@ print_rxstats(kmem)
 
 
 void
-print_rx(kmem)
-     int kmem;
+print_rx(int kmem)
 {
     off_t symoff;
     char sysname[100], c;
     afs_int32 count, i, ar[100];
     short sm;
-    struct rx_stats rx_stats;
+    struct rx_statistics rx_stats;
 
     printf("\n\nPrinting some RX globals...\n\n");
     findsym("rx_extraQuota", &symoff);
@@ -3597,8 +3325,7 @@ print_rx(kmem)
 
 
 void
-print_services(kmem)
-     afs_int32 kmem;
+print_services(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_service *rx_services[RX_MAX_SERVICES], se, *sentry = &se, *sep;
@@ -3633,8 +3360,7 @@ print_services(kmem)
 
 #ifdef KDUMP_RX_LOCK
 void
-print_peertable_lock(kmem)
-     afs_int32 kmem;
+print_peertable_lock(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_peer_rx_lock *rx_peerTable[256], se, *sentry = &se, *sep;
@@ -3673,8 +3399,7 @@ print_peertable_lock(kmem)
 
 #endif /* KDUMP_RX_LOCK */
 void
-print_peertable(kmem)
-     afs_int32 kmem;
+print_peertable(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_peer *rx_peerTable[256], se, *sentry = &se, *sep;
@@ -3712,8 +3437,7 @@ print_peertable(kmem)
 
 #ifdef KDUMP_RX_LOCK
 void
-print_conntable_lock(kmem)
-     afs_int32 kmem;
+print_conntable_lock(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_connection_rx_lock *rx_connTable[256], se, *sentry = &se;
@@ -3768,8 +3492,7 @@ print_conntable_lock(kmem)
 #endif /* KDUMP_RX_LOCK */
 
 void
-print_conntable(kmem)
-     afs_int32 kmem;
+print_conntable(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_connection *rx_connTable[256], se, *sentry = &se, *sep;
@@ -3822,8 +3545,7 @@ print_conntable(kmem)
 
 #ifdef KDUMP_RX_LOCK
 void
-print_calltable_lock(kmem)
-     afs_int32 kmem;
+print_calltable_lock(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_connection_rx_lock *rx_connTable[256], se;
@@ -3905,8 +3627,7 @@ print_calltable_lock(kmem)
 #endif /* KDUMP_RX_LOCK */
 
 void
-print_calltable(kmem)
-     afs_int32 kmem;
+print_calltable(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_connection *rx_connTable[256], se, *sentry = &se, *sep;
@@ -3982,8 +3703,7 @@ print_calltable(kmem)
 }
 
 void
-print_eventtable(kmem)
-     afs_int32 kmem;
+print_eventtable(afs_int32 kmem)
 {
     off_t symoff;
     struct rx_queue epq;
@@ -4009,9 +3729,7 @@ print_eventtable(kmem)
  * provided.
  */
 void
-print_upDownStats(a_upDownP)
-     struct afs_stats_SrvUpDownInfo *a_upDownP;        /*Ptr to server up/down info */
-
+print_upDownStats(struct afs_stats_SrvUpDownInfo *a_upDownP)
 {                              /*print_upDownStats */
 
     /*
@@ -4055,8 +3773,7 @@ print_upDownStats(a_upDownP)
 
 
 void
-print_cmperfstats(perfP)
-     struct afs_stats_CMPerf *perfP;
+print_cmperfstats(struct afs_stats_CMPerf *perfP)
 {
     struct afs_stats_SrvUpDownInfo *upDownP;   /*Ptr to server up/down info */
 
@@ -4124,8 +3841,7 @@ print_cmperfstats(perfP)
 
 
 void
-print_cmstats(cmp)
-     struct afs_CMStats *cmp;
+print_cmstats(struct afs_CMStats *cmp)
 {
     printf("\t%10d afs_init\n", cmp->callInfo.C_afs_init);
     printf("\t%10d gop_rdwr\n", cmp->callInfo.C_gop_rdwr);
@@ -4457,7 +4173,6 @@ print_cmstats(cmp)
     printf("\t%10d afs_ConnByHost\n", cmp->callInfo.C_afs_ConnByHost);
     printf("\t%10d afs_ConnByMHosts\n", cmp->callInfo.C_afs_ConnByMHosts);
     printf("\t%10d afs_Analyze\n", cmp->callInfo.C_afs_Analyze);
-    printf("\t%10d afs_CheckLocks\n", cmp->callInfo.C_afs_CheckLocks);
     printf("\t%10d CheckVLServer\n", cmp->callInfo.C_CheckVLServer);
     printf("\t%10d afs_CheckCacheResets\n",
           cmp->callInfo.C_afs_CheckCacheResets);
@@ -4571,162 +4286,3 @@ print_cmstats(cmp)
 }
 
 #endif
-#if 0
-#define OffsetOf(s,mem)        ((long)(&(((s *)0)->mem)))
-#define SizeOf(s,mem)  ((long)sizeof(((s *)0)->mem))
-#define values(s,mem)  OffsetOf(s,mem), SizeOf(s,mem)
-
-print_struct_vcache_offsets()
-{
-    printf("struct vcache.v              offset = %ld, size = %ld\n",
-          values(struct vcache, v));
-    printf("struct vcache.vlruq          offset = %ld, size = %ld\n",
-          values(struct vcache, vlruq));
-    printf("struct vcache.nextfree       offset = %ld, size = %ld\n",
-          values(struct vcache, nextfree));
-    printf("struct vcache.hnext          offset = %ld, size = %ld\n",
-          values(struct vcache, hnext));
-    printf("struct vcache.fid            offset = %ld, size = %ld\n",
-          values(struct vcache, fid));
-    printf("struct vcache.m              offset = %ld, size = %ld\n",
-          values(struct vcache, m));
-    printf("struct vcache.lock           offset = %ld, size = %ld\n",
-          values(struct vcache, lock));
-    printf("struct vcache.parentVnode    offset = %ld, size = %ld\n",
-          values(struct vcache, parentVnode));
-    printf("struct vcache.parentUnique   offset = %ld, size = %ld\n",
-          values(struct vcache, parentUnique));
-    printf("struct vcache.mvid           offset = %ld, size = %ld\n",
-          values(struct vcache, mvid));
-    printf("struct vcache.linkData       offset = %ld, size = %ld\n",
-          values(struct vcache, linkData));
-    printf("struct vcache.flushDV        offset = %ld, size = %ld\n",
-          values(struct vcache, flushDV));
-    printf("struct vcache.mapDV          offset = %ld, size = %ld\n",
-          values(struct vcache, mapDV));
-    printf("struct vcache.truncPos       offset = %ld, size = %ld\n",
-          values(struct vcache, truncPos));
-    printf("struct vcache.callback       offset = %ld, size = %ld\n",
-          values(struct vcache, callback));
-    printf("struct vcache.cbExpires      offset = %ld, size = %ld\n",
-          values(struct vcache, cbExpires));
-    printf("struct vcache.callsort       offset = %ld, size = %ld\n",
-          values(struct vcache, callsort));
-    printf("struct vcache.Access         offset = %ld, size = %ld\n",
-          values(struct vcache, Access));
-    printf("struct vcache.anyAccess      offset = %ld, size = %ld\n",
-          values(struct vcache, anyAccess));
-    printf("struct vcache.last_looker    offset = %ld, size = %ld\n",
-          values(struct vcache, last_looker));
-    printf("struct vcache.activeV        offset = %ld, size = %ld\n",
-          values(struct vcache, activeV));
-    printf("struct vcache.slocks         offset = %ld, size = %ld\n",
-          values(struct vcache, slocks));
-    printf("struct vcache.opens          offset = %ld, size = %ld\n",
-          values(struct vcache, opens));
-    printf("struct vcache.execsOrWriters offset = %ld, size = %ld\n",
-          values(struct vcache, execsOrWriters));
-    printf("struct vcache.flockCount     offset = %ld, size = %ld\n",
-          values(struct vcache, flockCount));
-    printf("struct vcache.mvstat         offset = %ld, size = %ld\n",
-          values(struct vcache, mvstat));
-    printf("struct vcache.states         offset = %ld, size = %ld\n",
-          values(struct vcache, states));
-    printf("struct vcache.quick          offset = %ld, size = %ld\n",
-          values(struct vcache, quick));
-    printf("struct vcache.symhintstamp   offset = %ld, size = %ld\n",
-          values(struct vcache, symhintstamp));
-    printf("struct vcache.h1             offset = %ld, size = %ld\n",
-          values(struct vcache, h1));
-    printf("struct vcache.lastr          offset = %ld, size = %ld\n",
-          values(struct vcache, lastr));
-    printf("struct vcache.vc_rwlockid    offset = %ld, size = %ld\n",
-          values(struct vcache, vc_rwlockid));
-    printf("struct vcache.vc_locktrips   offset = %ld, size = %ld\n",
-          values(struct vcache, vc_locktrips));
-    printf("struct vcache.vc_rwlock      offset = %ld, size = %ld\n",
-          values(struct vcache, vc_rwlock));
-    printf("struct vcache.mapcnt         offset = %ld, size = %ld\n",
-          values(struct vcache, mapcnt));
-    printf("struct vcache.cred           offset = %ld, size = %ld\n",
-          values(struct vcache, cred));
-    printf("struct vcache.vc_bhv_desc    offset = %ld, size = %ld\n",
-          values(struct vcache, vc_bhv_desc));
-    printf("struct vcache.vc_error       offset = %ld, size = %ld\n",
-          values(struct vcache, vc_error));
-    printf("struct vcache.xlatordv       offset = %ld, size = %ld\n",
-          values(struct vcache, xlatordv));
-    printf("struct vcache.uncred         offset = %ld, size = %ld\n",
-          values(struct vcache, uncred));
-    printf("struct vcache.asynchrony     offset = %ld, size = %ld\n",
-          values(struct vcache, asynchrony));
-}
-
-print_struct_vnode_offsets()
-{
-    printf("struct vnode.v_list           offset = %ld, size = %ld\n",
-          values(struct vnode, v_list));
-    printf("struct vnode.v_flag           offset = %ld, size = %ld\n",
-          values(struct vnode, v_flag));
-    printf("struct vnode.v_count          offset = %ld, size = %ld\n",
-          values(struct vnode, v_count));
-    printf("struct vnode.v_listid         offset = %ld, size = %ld\n",
-          values(struct vnode, v_listid));
-    printf("struct vnode.v_intpcount      offset = %ld, size = %ld\n",
-          values(struct vnode, v_intpcount));
-    printf("struct vnode.v_type           offset = %ld, size = %ld\n",
-          values(struct vnode, v_type));
-    printf("struct vnode.v_rdev           offset = %ld, size = %ld\n",
-          values(struct vnode, v_rdev));
-    printf("struct vnode.v_vfsmountedhere offset = %ld, size = %ld\n",
-          values(struct vnode, v_vfsmountedhere));
-    printf("struct vnode.v_vfsp           offset = %ld, size = %ld\n",
-          values(struct vnode, v_vfsp));
-    printf("struct vnode.v_stream         offset = %ld, size = %ld\n",
-          values(struct vnode, v_stream));
-    printf("struct vnode.v_filocks        offset = %ld, size = %ld\n",
-          values(struct vnode, v_filocks));
-    printf("struct vnode.v_filocksem      offset = %ld, size = %ld\n",
-          values(struct vnode, v_filocksem));
-    printf("struct vnode.v_number         offset = %ld, size = %ld\n",
-          values(struct vnode, v_number));
-    printf("struct vnode.v_bh             offset = %ld, size = %ld\n",
-          values(struct vnode, v_bh));
-    printf("struct vnode.v_namecap        offset = %ld, size = %ld\n",
-          values(struct vnode, v_namecap));
-    printf("struct vnode.v_hashp          offset = %ld, size = %ld\n",
-          values(struct vnode, v_hashp));
-    printf("struct vnode.v_hashn          offset = %ld, size = %ld\n",
-          values(struct vnode, v_hashn));
-    printf("struct vnode.v_mreg           offset = %ld, size = %ld\n",
-          values(struct vnode, v_mreg));
-    printf("struct vnode.v_mregb          offset = %ld, size = %ld\n",
-          values(struct vnode, v_mregb));
-    printf("struct vnode.v_pgcnt          offset = %ld, size = %ld\n",
-          values(struct vnode, v_pgcnt));
-    printf("struct vnode.v_dpages         offset = %ld, size = %ld\n",
-          values(struct vnode, v_dpages));
-    printf("struct vnode.v_dpages_gen     offset = %ld, size = %ld\n",
-          values(struct vnode, v_dpages_gen));
-    printf("struct vnode.v_dbuf           offset = %ld, size = %ld\n",
-          values(struct vnode, v_dbuf));
-    printf("struct vnode.v_buf            offset = %ld, size = %ld\n",
-          values(struct vnode, v_buf));
-    printf("struct vnode.v_bufgen         offset = %ld, size = %ld\n",
-          values(struct vnode, v_bufgen));
-    printf("struct vnode.v_traceix        offset = %ld, size = %ld\n",
-          values(struct vnode, v_traceix));
-    printf("struct vnode.v_buf_lock       offset = %ld, size = %ld\n",
-          values(struct vnode, v_buf_lock));
-    printf("struct vnode.v_pc             offset = %ld, size = %ld\n",
-          values(struct vnode, v_pc));
-#ifdef VNODE_TRACING
-    printf("struct vnode.v_trace          offset = %ld, size = %ld\n",
-          values(struct vnode, v_trace));
-#endif
-#ifdef CKPT
-    printf("struct vnode.v_ckpt           offset = %ld, size = %ld\n",
-          values(struct vnode, v_ckpt));
-#endif
-}
-#endif