]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Further warning cleanup for the libadmin directory
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sun, 26 Jul 2009 18:41:30 +0000 (19:41 +0100)
committerJeffrey Altman <jaltman@openafs.org>
Mon, 27 Jul 2009 22:16:31 +0000 (15:16 -0700)
More code cleanup for libadmin, including additional header inclusion,
better prototyping, and signed/unsigned and const fixes

Reviewed-on: http://gerrit.openafs.org/228
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
22 files changed:
src/libadmin/adminutil/afs_utilAdmin.c
src/libadmin/adminutil/afs_utilAdmin.h
src/libadmin/cfg/afs_cfgAdmin.h
src/libadmin/cfg/cfgclient.c
src/libadmin/cfg/cfghost.c
src/libadmin/pts/afs_ptsAdmin.c
src/libadmin/pts/afs_ptsAdmin.h
src/libadmin/samples/rxstat_clear_peer.c
src/libadmin/samples/rxstat_clear_process.c
src/libadmin/samples/rxstat_enable_process.c
src/libadmin/samples/rxstat_get_process.c
src/libadmin/samples/rxstat_query_process.c
src/libadmin/test/bos.c
src/libadmin/test/kas.c
src/libadmin/test/pts.c
src/libadmin/test/vos.c
src/libadmin/vos/afs_vosAdmin.c
src/libadmin/vos/afs_vosAdmin.h
src/libadmin/vos/vosutils.c
src/libadmin/vos/vosutils.h
src/libadmin/vos/vsprocs.c
src/libadmin/vos/vsprocs.h

index 22f4b77a83a0535bbf98532f97d6fa5d4b820106..7049a46e144948ef372f7421a2bdc27399f13b64 100644 (file)
@@ -2300,7 +2300,7 @@ util_CMClientConfig(struct rx_connection *conn, afs_ClientConfig_p config,
 {
     int rc = 0;
     afs_status_t tst = 0;
-    afs_int32 allocbytes;
+    afs_uint32 allocbytes;
     struct cacheConfig tconfig;
 
     if (conn == NULL) {
index 3722dcba45678ba55f1a05f02fade59ca3394418..6e4d444a25adf3865742bfaf04317ddc5ea319d5 100644 (file)
@@ -133,9 +133,9 @@ extern int ADMINAPI util_CMClientConfig(struct rx_connection *conn,
 typedef char rxdebugVersion_t[UTIL_MAX_RXDEBUG_VERSION_LEN],
     *rxdebugVersion_p;
 
-extern int ADMINAPI util_RXDebugVersionString(rxdebugHandle_p handle,
-                                             rxdebugVersion_p version,
-                                             afs_status_p st);
+extern int ADMINAPI util_RXDebugVersion(rxdebugHandle_p handle,
+                                       rxdebugVersion_p version,
+                                       afs_status_p st);
 
 extern int ADMINAPI util_RXDebugSupportedStats(rxdebugHandle_p handle,
                                               afs_uint32 * supportedStats,
index ff69e3fd571aefce54bbeca3f3e8730dcd8acca5..58349bd6aa51667bf75548ba4adaf1a3863b6550 100644 (file)
@@ -140,7 +140,7 @@ extern int ADMINAPI cfg_HostSetAfsPrincipal(void *hostHandle, short isFirst,
                                            afs_status_p st);
 
 extern int ADMINAPI cfg_HostSetAdminPrincipal(void *hostHandle, short isFirst,
-                                             const char *admin,
+                                             char *admin,
                                              const char *passwd,
                                              unsigned int afsUid,
                                              afs_status_p st);
index 8e8c30c836596e3f0847cc48b45181ce3fbbe972..5d3cb3e7b340d48b46b5776da0a7500ebd089037 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <afs/dirpath.h>
 #include <afs/cellconfig.h>
+#include <afs/kautils.h>
 
 #ifdef AFS_NT40_ENV
 #include <windows.h>
index 88824dff4634163ac4c629cb53be69ddf0d4a165..d23068642dad4ab8ae874219775c621d1a52bdcb 100644 (file)
@@ -636,7 +636,7 @@ cfg_HostSetAfsPrincipal(void *hostHandle,   /* host config handle */
 int ADMINAPI
 cfg_HostSetAdminPrincipal(void *hostHandle,    /* host config handle */
                          short isFirst,        /* first server in cell flag */
-                         const char *admin,    /* admin principal name */
+                         char *admin,          /* admin principal name */
                          const char *passwd,   /* admin initial password */
                          unsigned int afsUid,  /* admin AFS UID */
                          afs_status_p st)
index ef57b812e27bbda1a8f55de66d132597622c00a8..342a9d3496ce9acbc9b5cd6bfc83382f8f66893b 100644 (file)
@@ -543,8 +543,8 @@ pts_GroupOwnerChange(const void *cellHandle, const char *targetGroup,
  */
 
 int ADMINAPI
-pts_GroupCreate(const void *cellHandle, const char *newGroup,
-               const char *newOwner, int *newGroupId, afs_status_p st)
+pts_GroupCreate(const void *cellHandle, char *newGroup,
+               char *newOwner, int *newGroupId, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -1552,7 +1552,7 @@ pts_GroupMemberRemove(const void *cellHandle, const char *userName,
 
 int ADMINAPI
 pts_GroupRename(const void *cellHandle, const char *oldName,
-               const char *newName, afs_status_p st)
+               char *newName, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -1789,7 +1789,7 @@ pts_GroupModify(const void *cellHandle, const char *groupName,
  */
 
 int ADMINAPI
-pts_UserCreate(const void *cellHandle, const char *userName, int *newUserId,
+pts_UserCreate(const void *cellHandle, char *userName, int *newUserId,
               afs_status_p st)
 {
     int rc = 0;
@@ -2141,7 +2141,7 @@ pts_UserGet(const void *cellHandle, const char *userName,
 
 int ADMINAPI
 pts_UserRename(const void *cellHandle, const char *oldName,
-              const char *newName, afs_status_p st)
+              char *newName, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
index d55e55419816c7ae386531ce28ff40458058702c..5b3e0f8db51ea42a1c52198a7002066f61cd347d 100644 (file)
@@ -88,8 +88,8 @@ extern int ADMINAPI pts_GroupOwnerChange(const void *cellHandle,
                                         afs_status_p st);
 
 extern int ADMINAPI pts_GroupCreate(const void *cellHandle,
-                                   const char *newGroup,
-                                   const char *newOwner, int *newGroupId,
+                                   char *newGroup,
+                                   char *newOwner, int *newGroupId,
                                    afs_status_p st);
 
 extern int ADMINAPI pts_GroupGet(const void *cellHandle,
@@ -123,7 +123,7 @@ extern int ADMINAPI pts_GroupMemberRemove(const void *cellHandle,
                                          afs_status_p st);
 
 extern int ADMINAPI pts_GroupRename(const void *cellHandle,
-                                   const char *oldName, const char *newName,
+                                   const char *oldName, char *newName,
                                    afs_status_p st);
 
 extern int ADMINAPI pts_GroupModify(const void *cellHandle,
@@ -132,7 +132,7 @@ extern int ADMINAPI pts_GroupModify(const void *cellHandle,
                                    afs_status_p st);
 
 extern int ADMINAPI pts_UserCreate(const void *cellHandle,
-                                  const char *userName, int *newUserId,
+                                  char *userName, int *newUserId,
                                   afs_status_p st);
 
 extern int ADMINAPI pts_UserDelete(const void *cellHandle,
@@ -142,7 +142,7 @@ extern int ADMINAPI pts_UserGet(const void *cellHandle, const char *userName,
                                pts_UserEntry_p userP, afs_status_p st);
 
 extern int ADMINAPI pts_UserRename(const void *cellHandle,
-                                  const char *oldName, const char *newName,
+                                  const char *oldName, char *newName,
                                   afs_status_p st);
 
 extern int ADMINAPI pts_UserModify(const void *cellHandle,
index 69764b94ecde82e19adb4adbde5744146db62e6f..09b516ac783f1c4f386d45c0e3d406fb54ef61c4 100644 (file)
@@ -35,8 +35,6 @@ pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
-extern int RXSTATS_ClearPeerRPCStats();
-
 void
 Usage(void)
 {
index c36e248369d916b13bf2d63b8b1c555bc68b7ac2..661e0b129abd9b8f26d3d26020f28edc8fe5f8c9 100644 (file)
@@ -35,8 +35,6 @@ pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
-extern int RXSTATS_ClearProcessRPCStats();
-
 void
 Usage(void)
 {
index e793acefa2e8a1b0e67abb7b0a7975ba54d2fbed..1878c6725e80a38cf15901423e8e5010dcd184c5 100644 (file)
@@ -24,6 +24,8 @@
 #include <afs/afs_Admin.h>
 #include <afs/afs_clientAdmin.h>
 #include <afs/afs_utilAdmin.h>
+#include <rx/rx.h>
+#include <rx/rxstat.h>
 
 #ifdef AFS_DARWIN_ENV
 pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -31,8 +33,6 @@ pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
-extern int RXSTATS_EnableProcessRPCStats();
-
 void
 Usage(void)
 {
index 170ff035dee92192b9933b9a83087d80b4b6d150..f8dd79757db2afc3a0eb46ac31f4b00fce582490 100644 (file)
@@ -53,7 +53,7 @@ pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #include <ubik_int.h>
 
 void
-Usage()
+Usage(void)
 {
     fprintf(stderr, "Usage: rxstat_get_process <cell> <host> <port>\n");
     exit(1);
index 9c77ddbd2cbd50b2ab083338a3d6d3242a58818b..c6c6da1084ed558c5e962fe3b5c7cc259e52b4c7 100644 (file)
@@ -24,6 +24,8 @@
 #include <afs/afs_Admin.h>
 #include <afs/afs_clientAdmin.h>
 #include <afs/afs_utilAdmin.h>
+#include <rx/rx.h>
+#include <rx/rxstat.h>
 
 #ifdef AFS_DARWIN_ENV
 pthread_mutex_t des_init_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -31,8 +33,6 @@ pthread_mutex_t des_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 pthread_mutex_t rxkad_random_mutex = PTHREAD_MUTEX_INITIALIZER;
 #endif /* AFS_DARWIN_ENV */
 
-extern int RXSTATS_QueryProcessRPCStats();
-
 void
 Usage(void)
 {
index a5d1a929fda47f8dfc2d8f35bb242df2c71a392e..b7373e140a80f3ebc243b814710f90da2336c36c 100644 (file)
@@ -1785,6 +1785,7 @@ DoBosSalvage(struct cmd_syndesc *as, void *arock)
     return 0;
 }
 
+#if 0
 static void
 Print_afs_RPCStatsState_p(afs_RPCStatsState_p state, const char *prefix)
 {
@@ -1798,6 +1799,7 @@ Print_afs_RPCStatsState_p(afs_RPCStatsState_p state, const char *prefix)
        break;
     }
 }
+#endif
 
 void
 SetupBosAdminCmd(void)
index 10c920736f7dbc21b5778dd3cddea795e2aa0b45..f5dcd2c9462933c4c2feb5da8dfe2d70bf0b7d08 100644 (file)
@@ -497,9 +497,9 @@ Print_kas_serverStats_p(kas_serverStats_p stats, const char *prefix)
     printf("%sHost %x\n", prefix, stats->host);
     printf("%sServer start time %s\n", prefix, ctime(&stime));
     printf("%sUser time %ld secs %ld usec\n", prefix, stats->userTime.tv_sec,
-          stats->userTime.tv_usec);
+          (long) stats->userTime.tv_usec);
     printf("%sSystem time %ld secs %ld usec\n", prefix,
-          stats->systemTime.tv_sec, stats->systemTime.tv_usec);
+          stats->systemTime.tv_sec, (long) stats->systemTime.tv_usec);
     printf("%sData size %d\n", prefix, stats->dataSize);
     printf("%sStack size %d\n", prefix, stats->stackSize);
     printf("%sPage faults %d\n", prefix, stats->pageFaults);
index 74f46b82cbe3e619872fa11c6c2884320fecbc88..d4381b4719efbee8d4e5920e66fab790495a4e89 100644 (file)
@@ -122,8 +122,8 @@ DoPtsGroupCreate(struct cmd_syndesc *as, void *arock)
 {
     typedef enum { OWNER, GROUP } DoPtsGroupCreate_parm_t;
     afs_status_t st = 0;
-    const char *owner = as->parms[OWNER].items->data;
-    const char *group = as->parms[GROUP].items->data;
+    char *owner = as->parms[OWNER].items->data;
+    char *group = as->parms[GROUP].items->data;
     int new_group_id;
 
     if (!pts_GroupCreate(cellHandle, group, owner, &new_group_id, &st)) {
@@ -278,7 +278,7 @@ DoPtsGroupRename(struct cmd_syndesc *as, void *arock)
     typedef enum { GROUP, NEWNAME } DoPtsGroupRename_parm_t;
     afs_status_t st = 0;
     const char *group = as->parms[GROUP].items->data;
-    const char *new_name = as->parms[NEWNAME].items->data;
+    char *new_name = as->parms[NEWNAME].items->data;
 
     if (!pts_GroupRename(cellHandle, group, new_name, &st)) {
        ERR_ST_EXT("pts_GroupRename", st);
@@ -325,7 +325,7 @@ DoPtsUserCreate(struct cmd_syndesc *as, void *arock)
 {
     typedef enum { USER } DoPtsUserCreate_parm_t;
     afs_status_t st = 0;
-    const char *user = as->parms[USER].items->data;
+    char *user = as->parms[USER].items->data;
     int new_user_id;
 
     if (!pts_UserCreate(cellHandle, user, &new_user_id, &st)) {
@@ -403,7 +403,7 @@ DoPtsUserRename(struct cmd_syndesc *as, void *arock)
     typedef enum { USER, NEWNAME } DoPtsUserRename_parm_t;
     afs_status_t st = 0;
     const char *user = as->parms[USER].items->data;
-    const char *new_name = as->parms[NEWNAME].items->data;
+    char *new_name = as->parms[NEWNAME].items->data;
 
     if (!pts_UserRename(cellHandle, user, new_name, &st)) {
        ERR_ST_EXT("pts_UserRename", st);
index 0d5aa46033786979767d1e515f1c61576d2309fe..2c7db4cec2b3d9b160c38e0d6e0492f4c0fd1156 100644 (file)
@@ -71,7 +71,7 @@ GetVolumeIdFromString(const char *volume)
      * is a volume name
      */
     if (vos_VLDBGet
-       (cellHandle, 0, (const unsigned int *)0, volume, &entry, &st)) {
+       (cellHandle, 0, NULL, (char *)volume, &entry, &st)) {
        return entry.volumeId[VOS_READ_WRITE_VOLUME];
     } else {
        ERR_EXT("failed to convert specified volume to an id");
@@ -533,7 +533,7 @@ DoVosVLDBGet(struct cmd_syndesc *as, void *arock)
     afs_status_t st = 0;
     vos_vldbEntry_t entry;
     unsigned int volume_id;
-    const char *volume_name = NULL;
+    char *volume_name = NULL;
 
     if (as->parms[VOLUME].items) {
        const char *volume = as->parms[VOLUME].items->data;
@@ -833,7 +833,7 @@ DoVosVolumeCreate(struct cmd_syndesc *as, void *arock)
     void *vos_server = NULL;
     unsigned int partition_id = 0;
     unsigned int volume_id;
-    const char *volume = NULL;
+    char *volume = NULL;
     unsigned int quota = 0;
 
     if (as->parms[SERVER].items) {
@@ -908,7 +908,7 @@ DoVosVolumeRename(struct cmd_syndesc *as, void *arock)
     typedef enum { OLDVOLUME, NEWVOLUME } DoVosVolumeRename_parm_t;
     afs_status_t st = 0;
     unsigned int old_volume = 0;
-    const char *new_volume = 0;
+    char *new_volume = NULL;
 
     if (as->parms[OLDVOLUME].items) {
        const char *volume = as->parms[OLDVOLUME].items->data;
@@ -994,7 +994,7 @@ DoVosVolumeRestore(struct cmd_syndesc *as, void *arock)
     unsigned int volume_id;
     unsigned int *vol_ptr = NULL;
     const char *dumpfile = NULL;
-    const char *volume_name = NULL;
+    char *volume_name = NULL;
     vos_volumeRestoreType_t restore = VOS_RESTORE_INCREMENTAL;
 
     if (as->parms[SERVER].items) {
@@ -1725,7 +1725,7 @@ Print_vos_volintInfo(afs_uint32 server, afs_uint32 partition, volintInfo* pinfo,
     printf("%scopyDate\t%-9lu\n", prefix,
           afs_printable_uint32_lu(pinfo->copyDate));
            
-    printf("%sflags\t\t%#lx\t(Optional)\n",prefix, pinfo->flags);
+    printf("%sflags\t\t%#lx\t(Optional)\n",prefix, afs_printable_int32_ld(pinfo->flags));
     printf("%sdiskused\t%u\n",prefix, pinfo->size);
     printf("%smaxquota\t%u\n",prefix, pinfo->maxquota);
     printf("%sminquota\t%lu\t(Optional)\n",prefix,
index 653e6ec1673d3ba765fe75b74eeea5777e44bfcf..31d2683dfa282333d593205405db512807aad528 100644 (file)
@@ -1079,8 +1079,9 @@ vos_ServerSync(const void *cellHandle, const void *serverHandle,
 
 int ADMINAPI
 vos_FileServerAddressChange(const void *cellHandle,
-                           vos_MessageCallBack_t callBack, int oldAddress,
-                           int newAddress, afs_status_p st)
+                           vos_MessageCallBack_t callBack,
+                           unsigned int oldAddress,
+                           unsigned int newAddress, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -1095,8 +1096,7 @@ vos_FileServerAddressChange(const void *cellHandle,
     }
 
     tst =
-       ubik_Call_New(VL_ChangeAddr, c_handle->vos, 0, oldAddress,
-                     newAddress);
+       ubik_VL_ChangeAddr(c_handle->vos, 0, oldAddress, newAddress);
     if (tst) {
        goto fail_vos_FileServerAddressChange;
     }
@@ -1134,13 +1134,14 @@ vos_FileServerAddressChange(const void *cellHandle,
 
 int ADMINAPI
 vos_FileServerAddressRemove(const void *cellHandle,
-                           vos_MessageCallBack_t callBack, int serverAddress,
+                           vos_MessageCallBack_t callBack,
+                           unsigned int serverAddress,
                            afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
     afs_cell_handle_p c_handle = (afs_cell_handle_p) cellHandle;
-    int dummyAddress = 0xffffffff;
+    unsigned int dummyAddress = 0xffffffff;
 
     /*
      * Validate arguments
@@ -1151,7 +1152,7 @@ vos_FileServerAddressRemove(const void *cellHandle,
     }
 
     tst =
-       ubik_Call_New(VL_ChangeAddr, c_handle->vos, 0, dummyAddress,
+       ubik_VL_ChangeAddr(c_handle->vos, 0, dummyAddress,
                      serverAddress);
     if (tst) {
        goto fail_vos_FileServerAddressRemove;
@@ -1372,7 +1373,7 @@ vos_FileServerGetBegin(const void *cellHandle, vos_MessageCallBack_t callBack,
 
     serv->vldb = c_handle->vos;
     tst =
-       ubik_Call_New(VL_GetAddrs, c_handle->vos, 0, 0, 0, &unused,
+       ubik_VL_GetAddrs(c_handle->vos, 0, 0, 0, &unused,
                      &serv->total_addresses, &serv->addresses);
 
     if (tst) {
@@ -1947,7 +1948,7 @@ copyVLDBEntry(struct nvldbentry *source, vos_vldbEntry_p dest,
 
 int ADMINAPI
 vos_VLDBGet(const void *cellHandle, vos_MessageCallBack_t callBack,
-           const unsigned int *volumeId, const char *volumeName,
+           const unsigned int *volumeId, char *volumeName,
            vos_vldbEntry_p vldbEntry, afs_status_p st)
 {
     int rc = 0;
@@ -2877,7 +2878,7 @@ vos_VLDBSync(const void *cellHandle, const void *serverHandle,
 int ADMINAPI
 vos_VolumeCreate(const void *cellHandle, const void *serverHandle,
                 vos_MessageCallBack_t callBack, unsigned int partition,
-                const char *volumeName, unsigned int quota,
+                char *volumeName, unsigned int quota,
                 unsigned int *volumeId, afs_status_p st)
 {
     int rc = 0;
@@ -3049,7 +3050,7 @@ vos_VolumeDelete(const void *cellHandle, const void *serverHandle,
 
 int ADMINAPI
 vos_VolumeRename(const void *cellHandle, vos_MessageCallBack_t callBack,
-                unsigned int readWriteVolumeId, const char *newVolumeName,
+                unsigned int readWriteVolumeId, char *newVolumeName,
                 afs_status_p st)
 {
     int rc = 0;
@@ -3219,7 +3220,7 @@ vos_VolumeDump(const void *cellHandle, const void *serverHandle,
 int ADMINAPI
 vos_VolumeRestore(const void *cellHandle, const void *serverHandle,
                  vos_MessageCallBack_t callBack, unsigned int partition,
-                 unsigned int *volumeId, const char *volumeName,
+                 unsigned int *volumeId, char *volumeName,
                  const char *dumpFile, vos_volumeRestoreType_t dumpType,
                  afs_status_p st)
 {
index be051ef98cd9ee3ab269f3a430110c854dccc8f8..a84250d84392a222cac4a120faacdd2c1ae25f88 100644 (file)
@@ -262,13 +262,13 @@ extern int ADMINAPI vos_ServerSync(const void *cellHandle,
 
 extern int ADMINAPI vos_FileServerAddressChange(const void *cellHandle,
                                                vos_MessageCallBack_t
-                                               callBack, int oldAddress,
-                                               int newAddress,
+                                               callBack, unsigned int oldAddress,
+                                               unsigned int newAddress,
                                                afs_status_p st);
 
 extern int ADMINAPI vos_FileServerAddressRemove(const void *cellHandle,
                                                vos_MessageCallBack_t
-                                               callBack, int serverAddress,
+                                               callBack, unsigned int serverAddress,
                                                afs_status_p st);
 
 extern int ADMINAPI vos_FileServerGetBegin(const void *cellHandle,
@@ -303,7 +303,7 @@ extern int ADMINAPI vos_ServerTransactionStatusGetDone(const void
 extern int ADMINAPI vos_VLDBGet(const void *cellHandle,
                                vos_MessageCallBack_t callBack,
                                const unsigned int *volumeId,
-                               const char *volumeName,
+                               char *volumeName,
                                vos_vldbEntry_p vldbEntry, afs_status_p st);
 
 extern int ADMINAPI vos_VLDBGetBegin(const void *cellHandle,
@@ -364,7 +364,7 @@ extern int ADMINAPI vos_VolumeCreate(const void *cellHandle,
                                     const void *serverHandle,
                                     vos_MessageCallBack_t callBack,
                                     unsigned int partition,
-                                    const char *volumeName,
+                                    char *volumeName,
                                     unsigned int quota,
                                     unsigned int *volumeId, afs_status_p st);
 
@@ -377,7 +377,7 @@ extern int ADMINAPI vos_VolumeDelete(const void *cellHandle,
 extern int ADMINAPI vos_VolumeRename(const void *cellHandle,
                                     vos_MessageCallBack_t callBack,
                                     unsigned int readWriteVolumeId,
-                                    const char *newVolumeName,
+                                    char *newVolumeName,
                                     afs_status_p st);
 
 extern int ADMINAPI vos_VolumeDump(const void *cellHandle,
@@ -393,7 +393,7 @@ extern int ADMINAPI vos_VolumeRestore(const void *cellHandle,
                                      vos_MessageCallBack_t callBack,
                                      unsigned int partition,
                                      unsigned int *volumeId,
-                                     const char *volumeName,
+                                     char *volumeName,
                                      const char *dumpFile,
                                      vos_volumeRestoreType_t dumpType,
                                      afs_status_p st);
index 4fe5856ffdd7e89de909b40439dd9d157923d2c4..624d9d0d35014911f5809cf8041dd7136a4e1099 100644 (file)
@@ -163,7 +163,7 @@ aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_uint32 volid,
 }
 
 int
-aVLDB_GetEntryByName(afs_cell_handle_p cellHandle, const char *namep,
+aVLDB_GetEntryByName(afs_cell_handle_p cellHandle, char *namep,
                    struct nvldbentry *entryp, afs_status_p st)
 {
     struct vldbentry oentry;
@@ -326,7 +326,8 @@ VLDB_IsSameAddrs(afs_cell_handle_p cellHandle, afs_int32 serv1,
 
     ListAddrByAttributes attrs;
     bulkaddrs addrs;
-    afs_uint32 *addrp, nentries, unique, i;
+    afs_uint32 *addrp;
+    afs_int32 nentries, unique, i;
     afsUUID uuid;
 
     *equal = 0;
index a6d14f4aa9d49dbf0fd735597457a925bed8a62f..fcf6b5efec85f1be18ff1e51184ad32474cebdb4 100644 (file)
@@ -21,7 +21,7 @@ extern int aVLDB_GetEntryByID(afs_cell_handle_p cellHandle, afs_uint32 volid,
 
 
 extern int aVLDB_GetEntryByName(afs_cell_handle_p cellHandle,
-                              const char *namep, struct nvldbentry *entryp,
+                              char *namep, struct nvldbentry *entryp,
                               afs_status_p st);
 
 extern int VLDB_ReplaceEntry(afs_cell_handle_p cellHandle, afs_uint32 volid,
index ce3a1118f702d8ae89c0be7ae982dd51ac251821..b9647e70a279251bf20c2e551fe628107fe854ea 100644 (file)
@@ -36,7 +36,8 @@
 #include <io.h>
 #endif
 
-static afs_int32 GroupEntries();
+static afs_int32 GroupEntries(struct rx_connection *server, volintInfo * pntr, afs_int32 count,
+             struct qHead *myQueue, afs_int32 apart);
 
 struct release {
     afs_int32 time;
@@ -127,7 +128,7 @@ UV_NukeVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
 * back new vol id in <anewid>*/
 int
 UV_CreateVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
-               unsigned int partition, const char *volumeName,
+               unsigned int partition, char *volumeName,
                unsigned int quota, afs_uint32 *volumeId, afs_status_p st)
 {
     int rc = 0;
@@ -986,7 +987,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
     int rc = 0;
     afs_status_t tst = 0, temp = 0;
     afs_int32 ttid = 0, btid = 0;
-    afs_int32 backupID;
+    afs_uint32 backupID;
     afs_int32 rcode = 0;
     char vname[VOLSER_MAXVOLNAME + 1];
     struct nvldbentry entry;
@@ -2283,7 +2284,7 @@ WriteData(struct rx_call *call, const char *filename)
  */
 int
 UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
-                afs_int32 topart, afs_uint32 tovolid, const char *tovolname,
+                afs_int32 topart, afs_uint32 tovolid, char *tovolname,
                 int flags, const char *dumpFile, afs_status_p st)
 {
     int rc = 0;
@@ -3686,13 +3687,16 @@ UV_SyncServer(afs_cell_handle_p cellHandle, struct rx_connection *server,
     return rc;
 }
 
-/*rename volume <oldname> to <newname>, changing the names of the related 
- *readonly and backup volumes. This operation is also idempotent.
- *salvager is capable of recovering from rename operation stopping halfway.
- *to recover run syncserver on the affected machines,it will force renaming to completion. name clashes should have been detected before calling this proc */
+/* rename volume <oldname> to <newname>, changing the names of the related
+ * readonly and backup volumes. This operation is also idempotent.
+ * salvager is capable of recovering from rename operation stopping halfway.
+ * to recover run syncserver on the affected machines,it will force
+ * renaming to completion. name clashes should have been detected before
+ * calling this proc
+ */
 int
 UV_RenameVolume(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
-               const char *newname, afs_status_p st)
+               char *newname, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
index 090c9f49abd42122a34cdccd7d1c724f7bc3533d..c1829580a281fc6334c0670dd003df6b6b64194e 100644 (file)
@@ -50,7 +50,7 @@ extern int UV_NukeVolume(afs_cell_handle_p cellHandle,
 
 extern int UV_CreateVolume(afs_cell_handle_p cellHandle,
                           struct rx_connection *server,
-                          unsigned int partition, const char *volumeName,
+                          unsigned int partition, char *volumeName,
                           unsigned int quota, afs_uint32 *volumeId,
                           afs_status_p st);
 
@@ -79,7 +79,7 @@ extern int UV_DumpVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
 
 extern int UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
                            afs_int32 topart, afs_uint32 tovolid,
-                           const char *tovolname, int flags,
+                           char *tovolname, int flags,
                            const char *dumpFile, afs_status_p st);
 
 extern int UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server,
@@ -132,5 +132,5 @@ extern int UV_SetVolume(struct rx_connection *server, afs_int32 partition,
                        afs_status_p st);
 
 extern int UV_RenameVolume(afs_cell_handle_p cellHandle,
-                          struct nvldbentry *entry, const char *newname,
+                          struct nvldbentry *entry, char *newname,
                           afs_status_p st);