xstat: Don't cast returns from malloc()
[openafs.git] / src / xstat / xstat_fs_callback.c
index 2ef32a0..05c3e4d 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 <errno.h>
-#include <stdio.h>                     /*Standard I/O stuff*/
+#include <roken.h>
 
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
+#ifdef AFS_NT40_ENV
+#include <windows.h>
+#include <rpc.h>
 #endif
 
-#include <afs/afscbint.h>              /*Callback interface defs*/
+#include <afs/afscbint.h>      /*Callback interface defs */
+#include <afs/afsutil.h>
 
 int afs_cb_inited = 0;
 struct interfaceAddr afs_cb_interface;
@@ -48,12 +43,18 @@ struct interfaceAddr afs_cb_interface;
 /*
  * Initialize the callback interface structure
  */
-static int init_afs_cb() {
+static int
+init_afs_cb(void)
+{
     int count;
 
+#ifdef AFS_NT40_ENV
+    UuidCreate((UUID *)&afs_cb_interface.uuid);
+#else
     afs_uuid_create(&afs_cb_interface.uuid);
-    count = rx_getAllAddr(&afs_cb_interface.addr_in, AFS_MAX_INTERFACE_ADDR);
-    if ( count <= 0 )
+#endif
+    count = rx_getAllAddr((afs_uint32 *)afs_cb_interface.addr_in, AFS_MAX_INTERFACE_ADDR);
+    if (count <= 0)
        afs_cb_interface.numberOfInterfaces = 0;
     else
        afs_cb_interface.numberOfInterfaces = count;
@@ -61,12 +62,9 @@ static int init_afs_cb() {
     return 0;
 }
 
-/*
- * Routines we need that don't have explicit include file definitions.
- */
-extern char *hostutil_GetNameByINet(); /*Host parsing utility*/
-
-static char mn[] = "xstat_fs_callback";        /*Module name*/
+#if XSTAT_FS_CALLBACK_VERBOSE
+static char mn[] = "xstat_fs_callback";        /*Module name */
+#endif
 
 /*------------------------------------------------------------------------
  * SRXAFSCB_CallBack
@@ -90,36 +88,33 @@ static char mn[] = "xstat_fs_callback";     /*Module name*/
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_CallBack(rxcall, Fids_Array, CallBack_Array)
-    struct rx_call *rxcall;
-    AFSCBFids *Fids_Array;
-    AFSCBs *CallBack_Array;
-
-{ /*SRXAFSCB_CallBack*/
+afs_int32
+SRXAFSCB_CallBack(struct rx_call *rxcall, AFSCBFids * Fids_Array,
+                 AFSCBs * CallBack_Array)
+{                              /*SRXAFSCB_CallBack */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_CallBack";    /*Routine name*/
-    char hostName[256];                                /*Host name buffer*/
-    char *hostNameResult;                      /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_CallBack";    /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
-    fprintf(stderr, "[%s:%s] Called\n",
-           mn, rn);
+    fprintf(stderr, "[%s:%s] Called\n", mn, rn);
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
     /*
      * Return successfully.
      */
-    return(0);
+    return (0);
 
-} /*SRXAFSCB_CallBack*/
+}                              /*SRXAFSCB_CallBack */
 
 /*------------------------------------------------------------------------
  * SRXAFSCB_InitCallBackState
@@ -142,34 +137,32 @@ afs_int32 SRXAFSCB_CallBack(rxcall, Fids_Array, CallBack_Array)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_InitCallBackState(rxcall)
-    struct rx_call *rxcall;
-
-{ /*SRXAFSCB_InitCallBackState*/
+afs_int32
+SRXAFSCB_InitCallBackState(struct rx_call * rxcall)
+{                              /*SRXAFSCB_InitCallBackState */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_InitCallBackState";   /*Routine name*/
-    char hostName[256];                                        /*Host name buffer*/
-    char *hostNameResult;                              /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_InitCallBackState";   /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
-    fprintf(stderr, "[%s:%s] Called\n",
-           mn, rn);
+    fprintf(stderr, "[%s:%s] Called\n", mn, rn);
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
     /*
      * Return successfully.
      */
-    return(0);
+    return (0);
 
-} /*SRXAFSCB_InitCallBackState*/
+}                              /*SRXAFSCB_InitCallBackState */
 
 /*------------------------------------------------------------------------
  * SRXAFSCB_Probe
@@ -195,34 +188,32 @@ afs_int32 SRXAFSCB_InitCallBackState(rxcall)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_Probe(rxcall)
-    struct rx_call *rxcall;
-
-{ /*SRXAFSCB_Probe*/
+afs_int32
+SRXAFSCB_Probe(struct rx_call * rxcall)
+{                              /*SRXAFSCB_Probe */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_Probe";               /*Routine name*/
-    char hostName[256];                                /*Host name buffer*/
-    char *hostNameResult;                      /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_Probe";       /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
-    fprintf(stderr, "[%s:%s] Called\n",
-           mn, rn);
+    fprintf(stderr, "[%s:%s] Called\n", mn, rn);
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
     /*
      * Return successfully.
      */
-    return(0);
+    return (0);
 
-} /*SRXAFSCB_Probe*/
+}                              /*SRXAFSCB_Probe */
 
 
 /*------------------------------------------------------------------------
@@ -246,55 +237,50 @@ afs_int32 SRXAFSCB_Probe(rxcall)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_GetCE64(rxcall, index, ce)
-    struct rx_call *rxcall;
-    afs_int32 index;
-    AFSDBCacheEntry64 *ce;
-
-{ /*SRXAFSCB_GetCE64*/
+afs_int32
+SRXAFSCB_GetCE64(struct rx_call * rxcall, afs_int32 index,
+                AFSDBCacheEntry64 * ce)
+{                              /*SRXAFSCB_GetCE64 */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_GetCE64";             /*Routine name*/
-    char hostName[256];                                /*Host name buffer*/
-    char *hostNameResult;                      /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_GetCE64";     /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    return(0);
-
-} /*SRXAFSCB_GetCE64*/
+    return (0);
 
-afs_int32 SRXAFSCB_GetCE(rxcall, index, ce)
-    struct rx_call *rxcall;
-    afs_int32 index;
-    AFSDBCacheEntry *ce;
+}                              /*SRXAFSCB_GetCE64 */
 
-{ /*SRXAFSCB_GetCE*/
+afs_int32
+SRXAFSCB_GetCE(struct rx_call * rxcall, afs_int32 index, AFSDBCacheEntry * ce)
+{                              /*SRXAFSCB_GetCE */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_GetCE";       /*Routine name*/
-    char hostName[256];                                /*Host name buffer*/
-    char *hostNameResult;                      /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_GetCE";       /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    return(0);
+    return (0);
 
-} /*SRXAFSCB_GetCE*/
+}                              /*SRXAFSCB_GetCE */
 
 
 /*------------------------------------------------------------------------
@@ -318,30 +304,27 @@ afs_int32 SRXAFSCB_GetCE(rxcall, index, ce)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_GetLock(rxcall, index, lock)
-    struct rx_call *rxcall;
-    afs_int32 index;
-    AFSDBLock *lock;
-
-{ /*SRXAFSCB_GetLock*/
+afs_int32
+SRXAFSCB_GetLock(struct rx_call * rxcall, afs_int32 index, AFSDBLock * lock)
+{                              /*SRXAFSCB_GetLock */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_GetLock";     /*Routine name*/
-    char hostName[256];                                /*Host name buffer*/
-    char *hostNameResult;                      /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_GetLock";     /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    return(0);
+    return (0);
 
-} /*SRXAFSCB_GetLock*/
+}                              /*SRXAFSCB_GetLock */
 
 
 /*------------------------------------------------------------------------
@@ -365,29 +348,27 @@ afs_int32 SRXAFSCB_GetLock(rxcall, index, lock)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_XStatsVersion(rxcall, versionNumberP)
-    struct rx_call *rxcall;
-    afs_int32 *versionNumberP;
-
-{ /*SRXAFSCB_XStatsVersion*/
+afs_int32
+SRXAFSCB_XStatsVersion(struct rx_call * rxcall, afs_int32 * versionNumberP)
+{                              /*SRXAFSCB_XStatsVersion */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_XStatsVersion"; /*Routine name*/
-    char hostName[256];                                 /*Host name buffer*/
-    char *hostNameResult;                       /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_XStatsVersion";       /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    return(0);
+    return (0);
 
-} /*SRXAFSCB_XStatsVersion*/
+}                              /*SRXAFSCB_XStatsVersion */
 
 
 /*------------------------------------------------------------------------
@@ -411,34 +392,29 @@ afs_int32 SRXAFSCB_XStatsVersion(rxcall, versionNumberP)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_GetXStats(rxcall, clientVersionNumber, collectionNumber,
-                            srvVersionNumberP, timeP, dataP)
-    struct rx_call *rxcall;
-    afs_int32 clientVersionNumber;
-    afs_int32 collectionNumber;
-    afs_int32 *srvVersionNumberP;
-    afs_int32 *timeP;
-    AFSCB_CollData *dataP;
-
-{ /*SRXAFSCB_GetXStats*/
+afs_int32
+SRXAFSCB_GetXStats(struct rx_call * rxcall, afs_int32 clientVersionNumber,
+                  afs_int32 collectionNumber, afs_int32 * srvVersionNumberP,
+                  afs_int32 * timeP, AFSCB_CollData * dataP)
+{                              /*SRXAFSCB_GetXStats */
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_GetXStats";   /*Routine name*/
-    char hostName[256];                                /*Host name buffer*/
-    char *hostNameResult;                      /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_GetXStats";   /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    return(0);
+    return (0);
 
-} /*SRXAFSCB_GetXStats*/
+}                              /*SRXAFSCB_GetXStats */
 
 /*------------------------------------------------------------------------
  * EXPORTED SRXAFSCB_InitCallBackState2
@@ -451,7 +427,7 @@ afs_int32 SRXAFSCB_GetXStats(rxcall, clientVersionNumber, collectionNumber,
  *      rxcall : Ptr to Rx call on which this request came in.
  *
  * Returns:
- *      RXGEN_OPCODE (always). 
+ *      RXGEN_OPCODE (always).
  *
  * Environment:
  *      Nothing interesting.
@@ -460,23 +436,23 @@ afs_int32 SRXAFSCB_GetXStats(rxcall, clientVersionNumber, collectionNumber,
  *      None
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_InitCallBackState2(rxcall, addr)
-    struct rx_call *rxcall;
-    struct interfaceAddr * addr;
+afs_int32
+SRXAFSCB_InitCallBackState2(struct rx_call * rxcall,
+                           struct interfaceAddr * addr)
 {
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_InitCallBackState2";  /*Routine name*/
-    char hostName[256];                                        /*Host name buffer*/
-    char *hostNameResult;                              /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_InitCallBackState2";  /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
     return RXGEN_OPCODE;
 }
@@ -505,38 +481,33 @@ afs_int32 SRXAFSCB_InitCallBackState2(rxcall, addr)
  *      As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_WhoAreYou(rxcall, addr)
-    struct rx_call *rxcall;
-    struct interfaceAddr *addr;
+afs_int32
+SRXAFSCB_WhoAreYou(struct rx_call * rxcall, struct interfaceAddr * addr)
 {
-    int i;
-    int code = 0;
-    int        count;
-
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_WhoAreYou";           /*Routine name*/
-    char hostName[256];                                        /*Host name buffer*/
-    char *hostNameResult;                              /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_WhoAreYou";   /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    if ( rxcall && addr )
-    {
-       if (!afs_cb_inited) init_afs_cb();
+    if (rxcall && addr) {
+       if (!afs_cb_inited)
+           init_afs_cb();
        *addr = afs_cb_interface;
     }
 
     /*
      * Return successfully.
      */
-    return(0);
+    return (0);
 }
 
 
@@ -560,30 +531,29 @@ afs_int32 SRXAFSCB_WhoAreYou(rxcall, addr)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_InitCallBackState3(rxcall, uuidp)
-    struct rx_call *rxcall;
-    afsUUID *uuidp;
+afs_int32
+SRXAFSCB_InitCallBackState3(struct rx_call * rxcall, afsUUID * uuidp)
 {
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_InitCallBackState3";  /*Routine name*/
-    char hostName[256];                                        /*Host name buffer*/
-    char *hostNameResult;                              /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_InitCallBackState3";  /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
     /*
      * Return successfully.
      */
-    return(0);
+    return (0);
 }
+
 
 /*------------------------------------------------------------------------
  * EXPORTED SRXAFSCB_ProbeUuid
@@ -608,29 +578,29 @@ afs_int32 SRXAFSCB_InitCallBackState3(rxcall, uuidp)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_ProbeUuid(rxcall, uuidp)
-    struct rx_call *rxcall;
-    afsUUID *uuidp;
+afs_int32
+SRXAFSCB_ProbeUuid(struct rx_call * rxcall, afsUUID * uuidp)
 {
     int code = 0;
 
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_ProbeUuid";           /*Routine name*/
-    char hostName[256];                                        /*Host name buffer*/
-    char *hostNameResult;                              /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_ProbeUuid";   /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    if (!afs_cb_inited) init_afs_cb();
+    if (!afs_cb_inited)
+       init_afs_cb();
     if (!afs_uuid_equal(uuidp, &afs_cb_interface.uuid))
-       code = 1; /* failure */
+       code = 1;               /* failure */
     return code;
 }
 
@@ -656,11 +626,9 @@ afs_int32 SRXAFSCB_ProbeUuid(rxcall, uuidp)
  *      As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_GetServerPrefs(
-    struct rx_call *a_call,
-    afs_int32 a_index,
-    afs_int32 *a_srvr_addr,
-    afs_int32 *a_srvr_rank)
+afs_int32
+SRXAFSCB_GetServerPrefs(struct rx_call * a_call, afs_int32 a_index,
+                       afs_int32 * a_srvr_addr, afs_int32 * a_srvr_rank)
 {
     return RXGEN_OPCODE;
 }
@@ -687,21 +655,17 @@ afs_int32 SRXAFSCB_GetServerPrefs(
  *      As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_GetCellServDB(
-    struct rx_call *a_call,
-    afs_int32 a_index,
-    char **a_name,
-    serverList *a_hosts)
+afs_int32
+SRXAFSCB_GetCellServDB(struct rx_call * a_call, afs_int32 a_index,
+                      char **a_name, serverList * a_hosts)
 {
     return RXGEN_OPCODE;
 }
 
 
-afs_int32 SRXAFSCB_GetCellByNum(
-    struct rx_call *a_call,
-    afs_int32 a_cellnum,
-    char **a_name,
-    serverList *a_hosts)
+afs_int32
+SRXAFSCB_GetCellByNum(struct rx_call * a_call, afs_int32 a_cellnum,
+                     char **a_name, serverList * a_hosts)
 {
     return RXGEN_OPCODE;
 }
@@ -727,15 +691,14 @@ afs_int32 SRXAFSCB_GetCellByNum(
  *      As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_GetLocalCell(
-    struct rx_call *a_call,
-    char **a_name)
+afs_int32
+SRXAFSCB_GetLocalCell(struct rx_call * a_call, char **a_name)
 {
     char *t_name;
 
-    t_name = (char *)malloc(AFSNAMEMAX);
+    t_name = malloc(AFSNAMEMAX);
     if (!t_name)
-        return ENOMEM;
+       return ENOMEM;
     strcpy(t_name, "This is xstat_fs");
     *a_name = t_name;
     return 0;
@@ -767,46 +730,48 @@ afs_int32 SRXAFSCB_GetLocalCell(
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-afs_int32 SRXAFSCB_GetCacheConfig(
-    struct rx_call *a_call,
-    afs_uint32 callerVersion,
-    afs_uint32 *serverVersion,
-    afs_uint32 *configCount,
-    cacheConfig *config)
+afs_int32
+SRXAFSCB_GetCacheConfig(struct rx_call * a_call, afs_uint32 callerVersion,
+                       afs_uint32 * serverVersion, afs_uint32 * configCount,
+                       cacheConfig * config)
 {
     return RXGEN_OPCODE;
 }
 
-afs_int32 SRXAFSCB_TellMeAboutYourself(struct rx_call *rxcall, 
-                                       struct interfaceAddr *addr,
-                                       Capabilities *capabilites)
+afs_int32
+SRXAFSCB_TellMeAboutYourself(struct rx_call * rxcall,
+                            struct interfaceAddr * addr,
+                            Capabilities * capabilites)
 {
-    int i;
-    int code = 0;
-    int         count;
-
 #if XSTAT_FS_CALLBACK_VERBOSE
-    static char rn[] = "SRXAFSCB_TellMeAboutYourself";  /*Routine name*/
-    char hostName[256];                                 /*Host name buffer*/
-    char *hostNameResult;                               /*Ptr to static*/
+    static char rn[] = "SRXAFSCB_TellMeAboutYourself"; /*Routine name */
+    char hostName[256];                /*Host name buffer */
+    char *hostNameResult;      /*Ptr to static */
 
     if (rxcall != (struct rx_call *)0) {
        hostNameResult =
-           hostutil_GetNameByINet((afs_int32)(rxcall->conn->peer->host));
+           hostutil_GetNameByINet((afs_int32) (rxcall->conn->peer->host));
        strcpy(hostName, hostNameResult);
-       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n",
-               mn, rn, hostName, rxcall->conn->peer->port);
-    } /*Valid rxcall param*/
+       fprintf(stderr, "[%s:%s] Called from host %s, port %d\n", mn, rn,
+               hostName, rxcall->conn->peer->port);
+    }                          /*Valid rxcall param */
 #endif /* XSTAT_FS_CALLBACK_VERBOSE */
 
-    if ( rxcall && addr )
-    {
-       if (!afs_cb_inited) init_afs_cb();
+    if (rxcall && addr) {
+       if (!afs_cb_inited)
+           init_afs_cb();
        *addr = afs_cb_interface;
     }
 
     /*
      * Return successfully.
      */
-    return(0);
+    return (0);
+}
+
+int SRXAFSCB_GetDE(struct rx_call *a_call, afs_int32 a_index, afs_int32 addr,
+                  afs_int32 inode, afs_int32 flags, afs_int32 time,
+                  char **fileName)
+{
+    return RXGEN_OPCODE;
 }