Warning cleanup for the libadmin directory
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Fri, 10 Jul 2009 23:07:37 +0000 (00:07 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Fri, 10 Jul 2009 23:57:24 +0000 (17:57 -0600)
Where we can, include headers from the include directory
Resolve a load of const char* /char * issues
Mark some Windows only variables as such
Fix prototypes

Reviewed-on: http://gerrit.openafs.org/49
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>

21 files changed:
src/libadmin/adminutil/afs_utilAdmin.h
src/libadmin/bos/afs_bosAdmin.c
src/libadmin/bos/afs_bosAdmin.h
src/libadmin/cfg/cfgclient.c
src/libadmin/cfg/cfghost.c
src/libadmin/cfg/cfgservers.c
src/libadmin/samples/cm_list_cells.c
src/libadmin/samples/cm_local_cell.c
src/libadmin/samples/cm_server_prefs.c
src/libadmin/samples/rxdebug_basic_stats.c
src/libadmin/samples/rxdebug_conns.c
src/libadmin/samples/rxdebug_peers.c
src/libadmin/samples/rxdebug_rx_stats.c
src/libadmin/samples/rxdebug_version.c
src/libadmin/samples/rxstat_enable_process.c
src/libadmin/samples/rxstat_query_process.c
src/libadmin/test/afscp.c
src/libadmin/test/bos.c
src/libadmin/test/client.c
src/libadmin/test/kas.c
src/libadmin/vos/vsprocs.h

index c07ea7c..3722dcb 100644 (file)
@@ -47,6 +47,7 @@ extern int ADMINAPI util_AdminServerAddressGetFromName(const char *serverName,
 extern int ADMINAPI CellHandleIsValid(const void *cellHandle,
                                      afs_status_p st);
 
+struct rpcStats;
 extern int ADMINAPI util_RPCStatsGetBegin(struct rx_connection *conn,
                                          int (*rpc) (struct rx_connection *,
                                                      afs_uint32, afs_uint32 *,
index c52c3c5..44be450 100644 (file)
@@ -322,9 +322,9 @@ bos_ServerClose(const void *serverHandle, afs_status_p st)
 static char *processTypes[] = { "simple", "fs", "cron", 0 };
 
 int ADMINAPI
-bos_ProcessCreate(const void *serverHandle, const char *processName,
-                 bos_ProcessType_t processType, const char *process,
-                 const char *cronTime, const char *notifier, afs_status_p st)
+bos_ProcessCreate(const void *serverHandle, char *processName,
+                 bos_ProcessType_t processType, char *process,
+                 char *cronTime, char *notifier, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -402,9 +402,9 @@ bos_ProcessCreate(const void *serverHandle, const char *processName,
  */
 
 int ADMINAPI
-bos_FSProcessCreate(const void *serverHandle, const char *processName,
-                   const char *fileserverPath, const char *volserverPath,
-                   const char *salvagerPath, const char *notifier,
+bos_FSProcessCreate(const void *serverHandle, char *processName,
+                   char *fileserverPath, char *volserverPath,
+                   char *salvagerPath, char *notifier,
                    afs_status_p st)
 {
     int rc = 0;
@@ -471,7 +471,7 @@ bos_FSProcessCreate(const void *serverHandle, const char *processName,
  */
 
 int ADMINAPI
-bos_ProcessDelete(const void *serverHandle, const char *processName,
+bos_ProcessDelete(const void *serverHandle, char *processName,
                  afs_status_p st)
 {
     int rc = 0;
@@ -527,7 +527,7 @@ bos_ProcessDelete(const void *serverHandle, const char *processName,
 
 int ADMINAPI
 bos_ProcessExecutionStateGet(const void *serverHandle,
-                            const char *processName,
+                            char *processName,
                             bos_ProcessExecutionState_p processStatusP,
                             char *auxiliaryProcessStatus, afs_status_p st)
 {
@@ -599,7 +599,7 @@ bos_ProcessExecutionStateGet(const void *serverHandle,
 static int
 SetExecutionState(const void *serverHandle, const char *processName,
                  const bos_ProcessExecutionState_t processStatus,
-                 int (*func) (struct rx_connection *, const char *,
+                 int (*func) (struct rx_connection *, char *,
                               afs_int32), afs_status_p st)
 {
     int rc = 0;
@@ -624,7 +624,7 @@ SetExecutionState(const void *serverHandle, const char *processName,
 
     state = (afs_int32) processStatus;
 
-    tst = func(b_handle->server, processName, state);
+    tst = func(b_handle->server, (char *)processName, state);
 
     if (tst == 0) {
        rc = 1;
@@ -661,7 +661,7 @@ SetExecutionState(const void *serverHandle, const char *processName,
 int ADMINAPI
 bos_ProcessExecutionStateSet(const void *serverHandle,
                             const char *processName,
-                            bos_ProcessExecutionState_t processStatus,
+                            const bos_ProcessExecutionState_t processStatus,
                             afs_status_p st)
 {
     return SetExecutionState(serverHandle, processName, processStatus,
@@ -691,7 +691,7 @@ bos_ProcessExecutionStateSet(const void *serverHandle,
 
 int ADMINAPI
 bos_ProcessExecutionStateSetTemporary(const void *serverHandle,
-                                     const char *processName,
+                                     char *processName,
                                      bos_ProcessExecutionState_t
                                      processStatus, afs_status_p st)
 {
@@ -939,7 +939,7 @@ bos_ProcessNameGetDone(const void *iterationId, afs_status_p st)
  */
 
 int ADMINAPI
-bos_ProcessInfoGet(const void *serverHandle, const char *processName,
+bos_ProcessInfoGet(const void *serverHandle, char *processName,
                   bos_ProcessType_p processTypeP,
                   bos_ProcessInfo_p processInfoP, afs_status_p st)
 {
@@ -1291,7 +1291,8 @@ bos_ProcessNotifierGet(const void *serverHandle, const char *processName,
        goto fail_bos_ProcessNotifierGet;
     }
 
-    tst = BOZO_GetInstanceParm(b_handle->server, processName, 999, &notifier);
+    tst = BOZO_GetInstanceParm(b_handle->server, (char *)processName,
+                              999, &notifier);
 
     if (tst == 0) {
        rc = 1;
@@ -1341,7 +1342,7 @@ bos_ProcessRestart(const void *serverHandle, const char *processName,
        goto fail_bos_ProcessRestart;
     }
 
-    tst = BOZO_Restart(b_handle->server, processName);
+    tst = BOZO_Restart(b_handle->server, (char *)processName);
 
     if (tst == 0) {
        rc = 1;
@@ -1621,7 +1622,7 @@ bos_AdminCreate(const void *serverHandle, const char *adminName,
        goto fail_bos_AdminCreate;
     }
 
-    tst = BOZO_AddSUser(b_handle->server, adminName);
+    tst = BOZO_AddSUser(b_handle->server, (char *)adminName);
 
     if (tst == 0) {
        rc = 1;
@@ -1671,7 +1672,7 @@ bos_AdminDelete(const void *serverHandle, const char *adminName,
        goto fail_bos_AdminDelete;
     }
 
-    tst = BOZO_DeleteSUser(b_handle->server, adminName);
+    tst = BOZO_DeleteSUser(b_handle->server, (char *)adminName);
 
     if (tst == 0) {
        rc = 1;
@@ -2252,7 +2253,7 @@ bos_CellSet(const void *serverHandle, const char *cellName, afs_status_p st)
        goto fail_bos_CellSet;
     }
 
-    tst = BOZO_SetCellName(b_handle->server, cellName);
+    tst = BOZO_SetCellName(b_handle->server, (char *)cellName);
 
     if (tst == 0) {
        rc = 1;
@@ -2349,7 +2350,7 @@ bos_HostCreate(const void *serverHandle, const char *hostName,
        goto fail_bos_HostCreate;
     }
 
-    tst = BOZO_AddCellHost(b_handle->server, hostName);
+    tst = BOZO_AddCellHost(b_handle->server, (char *)hostName);
 
     if (tst == 0) {
        rc = 1;
@@ -2398,7 +2399,7 @@ bos_HostDelete(const void *serverHandle, const char *hostName,
        goto fail_bos_HostDelete;
     }
 
-    tst = BOZO_DeleteCellHost(b_handle->server, hostName);
+    tst = BOZO_DeleteCellHost(b_handle->server, (char *)hostName);
 
     if (tst == 0) {
        rc = 1;
@@ -2699,7 +2700,7 @@ bos_ExecutableCreate(const void *serverHandle, const char *sourceFile,
     tcall = rx_NewCall(b_handle->server);
 
     tst =
-       StartBOZO_Install(tcall, destFile, estat.st_size,
+       StartBOZO_Install(tcall, (char *)destFile, estat.st_size,
                          (afs_int32) estat.st_mode, estat.st_mtime);
 
     if (tst) {
@@ -2786,7 +2787,7 @@ bos_ExecutableRevert(const void *serverHandle, const char *execFile,
        goto fail_bos_ExecutableRevert;
     }
 
-    tst = BOZO_UnInstall(b_handle->server, execFile);
+    tst = BOZO_UnInstall(b_handle->server, (char *)execFile);
 
     if (tst == 0) {
        rc = 1;
@@ -2855,7 +2856,7 @@ bos_ExecutableTimestampGet(const void *serverHandle, const char *execFile,
     }
 
     tst =
-       BOZO_GetDates(b_handle->server, execFile, newTime, bakTime, oldTime);
+       BOZO_GetDates(b_handle->server, (char *)execFile, newTime, bakTime, oldTime);
 
     if (tst == 0) {
        rc = 1;
index 7ed7fc7..ddfb63c 100644 (file)
@@ -140,26 +140,26 @@ extern int ADMINAPI bos_ServerClose(const void *serverHandle,
                                    afs_status_p st);
 
 extern int ADMINAPI bos_ProcessCreate(const void *serverHandle,
-                                     const char *processName,
+                                     char *processName,
                                      bos_ProcessType_t processType,
-                                     const char *process,
-                                     const char *cronTime,
-                                     const char *notifier, afs_status_p st);
+                                     char *process,
+                                     char *cronTime,
+                                     char *notifier, afs_status_p st);
 
 extern int ADMINAPI bos_FSProcessCreate(const void *serverHandle,
-                                       const char *processName,
-                                       const char *fileserverPath,
-                                       const char *volserverPath,
-                                       const char *salvagerPath,
-                                       const char *notifier,
+                                       char *processName,
+                                       char *fileserverPath,
+                                       char *volserverPath,
+                                       char *salvagerPath,
+                                       char *notifier,
                                        afs_status_p st);
 
 extern int ADMINAPI bos_ProcessDelete(const void *serverHandle,
-                                     const char *processName,
+                                     char *processName,
                                      afs_status_p st);
 
 extern int ADMINAPI bos_ProcessExecutionStateGet(const void *serverHandle,
-                                                const char *processName,
+                                                char *processName,
                                                 bos_ProcessExecutionState_p
                                                 processStatusP,
                                                 char *auxiliaryProcessStatus,
@@ -167,12 +167,12 @@ extern int ADMINAPI bos_ProcessExecutionStateGet(const void *serverHandle,
 
 extern int ADMINAPI bos_ProcessExecutionStateSet(const void *serverHandle,
                                                 const char *processName,
-                                                bos_ProcessExecutionState_t
+                                                const bos_ProcessExecutionState_t
                                                 processStatus,
                                                 afs_status_p st);
 
 extern int ADMINAPI bos_ProcessExecutionStateSetTemporary(const void
-                                                         *serverHandle, const char
+                                                         *serverHandle, char
                                                          *processName,
                                                          bos_ProcessExecutionState_t
                                                          processStatus,
@@ -190,7 +190,7 @@ extern int ADMINAPI bos_ProcessNameGetDone(const void *iterationId,
                                           afs_status_p st);
 
 extern int ADMINAPI bos_ProcessInfoGet(const void *serverHandle,
-                                      const char *processName,
+                                      char *processName,
                                       bos_ProcessType_p processTypeP,
                                       bos_ProcessInfo_p processInfoP,
                                       afs_status_p st);
index 65a02c2..8e8c30c 100644 (file)
@@ -682,7 +682,10 @@ static int
 CacheManagerStart(unsigned timeout, afs_status_p st)
 {
     int rc = 1;
-    afs_status_t tst2, tst = 0;
+#ifdef AFS_NT40_ENV
+    afs_status_t tst2;
+#endif
+    afs_status_t tst = 0;
 
 #ifdef AFS_NT40_ENV
     /* Windows - cache manager is a service */
@@ -719,7 +722,10 @@ static int
 CacheManagerStop(unsigned timeout, afs_status_p st)
 {
     int rc = 1;
-    afs_status_t tst2, tst = 0;
+#ifdef AFS_NT40_ENV
+    afs_status_t tst2;
+#endif
+    afs_status_t tst = 0;
 
 #ifdef AFS_NT40_ENV
     /* Windows - cache manager is a service */
index 1e8eb22..88824df 100644 (file)
@@ -995,8 +995,11 @@ cfg_HostPartitionTableAddEntry(void *hostHandle,   /* host config handle */
                               afs_status_p st)
 {                              /* completion status */
     int rc = 1;
-    afs_status_t tst2, tst = 0;
+    afs_status_t tst = 0;
+#ifdef AFS_NT40_ENV
+    afs_status_t tst2;
     cfg_host_p cfg_host = (cfg_host_p) hostHandle;
+#endif
 
 #ifdef AFS_NT40_ENV
     /* validate parameters */
@@ -1066,8 +1069,11 @@ cfg_HostPartitionTableRemoveEntry(void *hostHandle,      /* host config handle */
                                  afs_status_p st)
 {                              /* completion status */
     int rc = 1;
-    afs_status_t tst2, tst = 0;
+    afs_status_t tst = 0;
+#ifdef AFS_NT40_ENV
+    afs_status_t tst2;
     cfg_host_p cfg_host = (cfg_host_p) hostHandle;
+#endif
 
 #ifdef AFS_NT40_ENV
     /* validate parameters */
index c2b308a..a26e1b7 100644 (file)
@@ -1793,13 +1793,13 @@ SimpleProcessStart(void *bosHandle, const char *instance,
        }
 
        if (!bos_ProcessCreate
-           (bosHandle, instance, BOS_PROCESS_SIMPLE, cmd, NULL, NULL, &tst2)
+           (bosHandle, (char *)instance, BOS_PROCESS_SIMPLE, cmd, NULL, NULL, &tst2)
            && tst2 != BZEXISTS) {
            /* failed to create instance (and not because existed) */
            tst = tst2;
        } else
            if (!bos_ProcessExecutionStateSet
-               (bosHandle, instance, BOS_PROCESS_RUNNING, &tst2)) {
+               (bosHandle, (char *)instance, BOS_PROCESS_RUNNING, &tst2)) {
            /* failed to set instance state to running */
            tst = tst2;
        }
@@ -1835,7 +1835,7 @@ FsProcessStart(void *bosHandle, const char *instance,
     afs_status_t tst2, tst = 0;
 
     if (!bos_FSProcessCreate
-       (bosHandle, instance, fileserverExe, volserverExe, salvagerExe, NULL,
+       (bosHandle, (char *)instance, (char *)fileserverExe, (char *)volserverExe, (char *)salvagerExe, NULL,
         &tst2) && tst2 != BZEXISTS) {
        /* failed to create instance (and not because existed) */
        tst = tst2;
@@ -1880,7 +1880,7 @@ BosProcessDelete(void *bosHandle, const char *instance, afs_status_p st)
        /* failed to wait for process to stop */
        tst = tst2;
 
-    } else if (!bos_ProcessDelete(bosHandle, instance, &tst2)) {
+    } else if (!bos_ProcessDelete(bosHandle, (char *)instance, &tst2)) {
        /* failed to delete instance (or does not exist) */
        if (tst2 != BZNOENT) {
            tst = tst2;
@@ -2106,7 +2106,6 @@ UbikVoteStatusFetch(int serverAddr, unsigned short serverPort,
     } else {
        int rpcCode;
        struct ubik_debug udebugInfo;
-       extern int VOTE_Debug(), VOTE_DebugOld();
 
        if ((rpcCode = VOTE_Debug(serverConn, &udebugInfo)) == 0) {
            /* talking to a 3.5 or later server */
index e1fcfc1..518d7ca 100644 (file)
@@ -32,7 +32,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: cm_list_cells <host> <port>\n");
     exit(1);
index 58e94a3..3f32c3a 100644 (file)
@@ -36,7 +36,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: cm_local_cell <host> <port>\n");
     exit(1);
index ca76d61..1b7d817 100644 (file)
@@ -36,7 +36,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: cm_server_prefs <host> <port>\n");
     exit(1);
index 81e7b0a..f297808 100644 (file)
@@ -36,7 +36,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxdebug_basic_stats <host> <port>\n");
     exit(1);
index 5697ca9..33cf83c 100644 (file)
@@ -36,7 +36,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxdebug_conns <host> <port>\n");
     exit(1);
index 696264e..0b18975 100644 (file)
@@ -36,7 +36,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxdebug_peers <host> <port>\n");
     exit(1);
@@ -70,7 +70,6 @@ main(int argc, char *argv[])
     void *iterator;
     struct rx_debugPeer peer;
     afs_uint32 supportedValues;
-    int i;
 
     ParseArgs(argc, argv, &srvrName, &srvrPort);
 
index 9b5da5f..a07c6a4 100644 (file)
@@ -37,7 +37,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxdebug_rx_stats <host> <port>\n");
     exit(1);
index 0acd817..2e17d44 100644 (file)
@@ -36,7 +36,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxdebug_version <host> <port>\n");
     exit(1);
index 74823e6..e793ace 100644 (file)
@@ -34,7 +34,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 extern int RXSTATS_EnableProcessRPCStats();
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxstat_enable_process <cell> <host> <port>\n");
     exit(1);
index 707ac7b..9c77ddb 100644 (file)
@@ -34,7 +34,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 extern int RXSTATS_QueryProcessRPCStats();
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxstat_query_process <host> <port>\n");
     exit(1);
index ff2a4d6..0376f9f 100644 (file)
@@ -64,7 +64,6 @@ MyBeforeProc(struct cmd_syndesc *as, void *arock)
 {
     afs_status_t st = 0;
     int no_auth = 0;
-    int auth = 0;
     char auth_cell[MAXCELLCHARS];
     char exec_cell[MAXCELLCHARS];
 
@@ -181,7 +180,6 @@ main(int argc, char *argv[])
 {
     int code;
     afs_status_t st;
-    char *whoami = argv[0];
 
     /* perform client initialization */
 
index cfae71f..a5d1a92 100644 (file)
@@ -14,6 +14,7 @@
 #include <afsconfig.h>
 #include <afs/param.h>
 
+#include <ctype.h>
 
 #include "bos.h"
 
@@ -61,7 +62,7 @@ static char *day[] = {
     "sat"
 };
 
-static
+static int
 LocalFreeTokens(struct token *alist)
 {
     register struct token *nlist;
@@ -73,7 +74,7 @@ LocalFreeTokens(struct token *alist)
     return 0;
 }
 
-static
+static int
 space(int x)
 {
     if (x == 0 || x == ' ' || x == '\t' || x == '\n')
@@ -82,7 +83,7 @@ space(int x)
        return 0;
 }
 
-static
+static int
 LocalParseLine(char *aline, struct token **alist)
 {
     char tbuffer[256];
@@ -138,14 +139,17 @@ static struct ptemp {
     char *key;
     afs_int32 value;
 } ptkeys[] = {
-"sun", 0x10000, "mon", 0x10001, "tue", 0x10002, "wed", 0x10003, "thu",
-       0x10004, "fri", 0x10005, "sat", 0x10006, "sunday", 0x10000,
-       "monday", 0x10001, "tuesday", 0x10002, "wednesday", 0x10003,
-       "thursday", 0x10004, "thur", 0x10004, "friday", 0x10005,
-       "saturday", 0x10006, "am", 0x20000, "pm", 0x20001, "a.m.",
-       0x20000, "p.m.", 0x20001, 0, 0,};
-
-static
+       {"sun", 0x10000}, {"mon", 0x10001}, {"tue", 0x10002},
+       {"wed", 0x10003}, {"thu", 0x10004}, {"fri", 0x10005},
+       {"sat", 0x10006},
+       {"sunday", 0x10000}, {"monday", 0x10001},
+       {"tuesday", 0x10002}, {"wednesday", 0x10003},
+       {"thursday", 0x10004}, {"thur", 0x10004},
+       {"friday", 0x10005}, {"saturday", 0x10006},
+       {"am", 0x20000}, {"pm", 0x20001},
+       {"a.m.", 0x20000}, {"p.m.", 0x20001}, {0, 0}};
+
+static int
 ParseTime(bos_RestartTime_p ak, char *astr)
 {
     int field;
@@ -321,7 +325,7 @@ DoBosProcessCreate(struct cmd_syndesc *as, void *arock)
     }
 
     if (!bos_ProcessCreate
-       (bos_server, process, process_type, binary, cron_time, notifier,
+       (bos_server, (char *)process, process_type, (char *)binary, (char *)cron_time, (char *)notifier,
         &st)) {
        ERR_ST_EXT("bos_ProcessCreate", st);
     }
@@ -373,7 +377,7 @@ DoBosFSProcessCreate(struct cmd_syndesc *as, void *arock)
     }
 
     if (!bos_FSProcessCreate
-       (bos_server, process, fileserver, volserver, salvager, notifier,
+       (bos_server, (char *)process, (char *)fileserver, (char *)volserver, (char *)salvager, (char *)notifier,
         &st)) {
        ERR_ST_EXT("bos_FSProcessCreate", st);
     }
@@ -402,7 +406,7 @@ DoBosProcessDelete(struct cmd_syndesc *as, void *arock)
        process = as->parms[PROCESS].items->data;
     }
 
-    if (!bos_ProcessDelete(bos_server, process, &st)) {
+    if (!bos_ProcessDelete(bos_server, (char *)process, &st)) {
        ERR_ST_EXT("bos_ProcessDelete", st);
     }
 
@@ -454,7 +458,7 @@ DoBosProcessExecutionStateGet(struct cmd_syndesc *as, void *arock)
     }
 
     if (!bos_ProcessExecutionStateGet
-       (bos_server, process, &state, aux_status, &st)) {
+       (bos_server, (char *)process, &state, aux_status, &st)) {
        ERR_ST_EXT("bos_ProcessExecutionStateGet", st);
     }
 
@@ -562,7 +566,7 @@ DoBosProcessExecutionStateSetTemporary(struct cmd_syndesc *as, void *arock)
     }
 
     if (!bos_ProcessExecutionStateSetTemporary
-       (bos_server, process, state, &st)) {
+       (bos_server, (char *)process, state, &st)) {
        ERR_ST_EXT("bos_ProcessExecutionStateSetTemporary", st);
     }
 
@@ -681,7 +685,7 @@ DoBosProcessInfoGet(struct cmd_syndesc *as, void *arock)
        process = as->parms[PROCESS].items->data;
     }
 
-    if (!bos_ProcessInfoGet(bos_server, process, &type, &info, &st)) {
+    if (!bos_ProcessInfoGet(bos_server, (char *)process, &type, &info, &st)) {
        ERR_ST_EXT("bos_ProcessInfoGet", st);
     }
 
index cf77af3..55597f3 100644 (file)
@@ -19,6 +19,7 @@
 #include <afs/cellconfig.h>
 #include <afs/bosint.h>
 #include <rx/rxstat.h>
+#include <rx/rxstat_prototypes.h>
 #include <afs/afsint.h>
 #define FSINT_COMMON_XG
 #include <afs/afscbint.h>
 #include <pthread.h>
 #endif
 
-/* These aren't coming from a header, currently, so they must stay here. 
-   Fix elsewhere, or leave alone. */
-extern int RXSTATS_RetrieveProcessRPCStats();
-extern int RXSTATS_RetrievePeerRPCStats();
-extern int RXSTATS_QueryProcessRPCStats();
-extern int RXSTATS_QueryPeerRPCStats();
-extern int RXSTATS_EnableProcessRPCStats();
-extern int RXSTATS_EnablePeerRPCStats();
-extern int RXSTATS_DisableProcessRPCStats();
-extern int RXSTATS_DisablePeerRPCStats();
-extern int RXSTATS_ClearProcessRPCStats();
-extern int RXSTATS_ClearPeerRPCStats();
-
 /*
  * This structure stores the client and server function lists.
  * This is kept separate from the actual interface definitions
@@ -481,7 +469,6 @@ DoClientRPCStatsStateGet(struct cmd_syndesc *as, void *arock)
     } DoClientRPCStatsStateGet_parm_t;
     afs_status_t st = 0;
     struct rx_connection *conn;
-    int servAddr = 0;
     afs_stat_source_t type;
     int srvrPort;
     int typeIsValid = 0;
@@ -539,7 +526,6 @@ DoClientRPCStatsStateEnable(struct cmd_syndesc *as, void *arock)
     typedef enum { SERVER, PROCESS, STAT_TYPE } DoClientRPCStatsEnable_parm_t;
     afs_status_t st = 0;
     struct rx_connection *conn;
-    int servAddr = 0;
     afs_stat_source_t type;
     int srvrPort;
     int typeIsValid = 0;
@@ -595,7 +581,6 @@ DoClientRPCStatsStateDisable(struct cmd_syndesc *as, void *arock)
     } DoClientRPCStatsDisable_parm_t;
     afs_status_t st = 0;
     struct rx_connection *conn;
-    int servAddr = 0;
     afs_stat_source_t type;
     int srvrPort;
     int typeIsValid = 0;
@@ -697,7 +682,6 @@ DoClientRPCStatsList(struct cmd_syndesc *as, void *arock)
     typedef enum { SERVER, PROCESS, STAT_TYPE } DoClientRPCStatsList_parm_t;
     afs_status_t st = 0;
     struct rx_connection *conn;
-    int servAddr = 0;
     afs_stat_source_t type;
     int srvrPort;
     int typeIsValid = 0;
@@ -828,7 +812,6 @@ DoClientRPCStatsClear(struct cmd_syndesc *as, void *arock)
     } DoClientRPCStatsClear_parm_t;
     afs_status_t st = 0;
     struct rx_connection *conn;
-    int servAddr = 0;
     afs_stat_source_t type;
     int srvrPort;
     int typeIsValid = 0;
@@ -995,7 +978,6 @@ DoClientRPCStatsVersionGet(struct cmd_syndesc *as, void *arock)
     afs_status_t st = 0;
     struct rx_connection *conn;
     afs_stat_source_t type;
-    int servAddr = 0;
     int srvrPort;
     int typeIsValid = 0;
     afs_RPCStatsVersion_t version;
@@ -1050,7 +1032,6 @@ DoClientCMGetServerPrefs(struct cmd_syndesc *as, void *arock)
     afs_status_t st = 0;
     typedef enum { SERVER, PORT } DoClientCMGetServerPrefs_parm_t;
     struct rx_connection *conn;
-    int servAddr = 0;
     int srvrPort = AFSCONF_CALLBACKPORT;
     afs_CMServerPref_t prefs;
     void *iter;
@@ -1120,7 +1101,6 @@ DoClientCMListCells(struct cmd_syndesc *as, void *arock)
     afs_status_t st = 0;
     typedef enum { SERVER, PORT } DoClientCMListCells_parm_t;
     struct rx_connection *conn;
-    int servAddr = 0;
     int srvrPort = AFSCONF_CALLBACKPORT;
     afs_CMListCell_t cellInfo;
     void *iter;
@@ -1175,7 +1155,6 @@ DoClientCMLocalCell(struct cmd_syndesc *as, void *arock)
     afs_status_t st = 0;
     typedef enum { SERVER, PORT } DoClientCMLocalCell_parm_t;
     struct rx_connection *conn;
-    int servAddr = 0;
     int srvrPort = AFSCONF_CALLBACKPORT;
     afs_CMCellName_t cellname;
 
@@ -1234,7 +1213,6 @@ DoClientCMClientConfig(struct cmd_syndesc *as, void *arock)
     afs_status_t st = 0;
     typedef enum { SERVER, PORT } DoClientCMLocalCell_parm_t;
     struct rx_connection *conn;
-    int servAddr = 0;
     int srvrPort = AFSCONF_CALLBACKPORT;
     afs_ClientConfig_t config;
 
index 71b8b9f..10c9207 100644 (file)
@@ -49,7 +49,6 @@ DoKasPrincipalCreate(struct cmd_syndesc *as, void *arock)
        PASSWORD
     } DoKasPrincipalCreate_parm_t;
     afs_status_t st = 0;
-    const char *instance = NULL;
     kas_identity_t user;
     const char *password;
 
@@ -75,7 +74,6 @@ DoKasPrincipalDelete(struct cmd_syndesc *as, void *arock)
 {
     typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalGet_parm_t;
     afs_status_t st = 0;
-    const char *instance = NULL;
     kas_identity_t user;
 
     strcpy(user.principal, as->parms[PRINCIPAL].items->data);
@@ -162,7 +160,6 @@ DoKasPrincipalGet(struct cmd_syndesc *as, void *arock)
 {
     typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalGet_parm_t;
     afs_status_t st = 0;
-    const char *instance = NULL;
     kas_identity_t user;
     kas_principalEntry_t principal;
 
@@ -287,7 +284,6 @@ DoKasPrincipalUnlock(struct cmd_syndesc *as, void *arock)
     typedef enum { PRINCIPAL, INSTANCE } DoKasPrincipalUnlock_parm_t;
     afs_status_t st = 0;
     kas_identity_t user;
-    unsigned int lock_end_time = 0;
 
     strcpy(user.principal, as->parms[PRINCIPAL].items->data);
 
index 5fd04f9..090c9f4 100644 (file)
@@ -33,7 +33,7 @@
 #include <afs/volser.h>
 #include <afs/volint.h>
 #include "../../volser/lockdata.h"
-#include "../../vlserver/vlclient.h"
+#include <afs/vldbint.h>
 #include <afs/com_err.h>
 #include <rx/rxkad.h>
 #include <afs/kautils.h>
 
 #define        CLOCKSKEW   2           /* not really skew, but resolution */
 
-extern int ubik_Call();
-extern int ubik_Call_New();
-
-
 extern int UV_NukeVolume(afs_cell_handle_p cellHandle,
                         struct rx_connection *server, unsigned int partition,
                         afs_uint32 volumeId, afs_status_p st);