Unused variable warning fixes
[openafs.git] / src / libadmin / vos / vsprocs.c
index d8531f1..5a857f0 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID
-    ("$Header$");
+#include <roken.h>
+
+#include <afs/afs_AdminErrors.h>
 
 #include "vsprocs.h"
 #include "vosutils.h"
 #include "lockprocs.h"
 #include "../adminutil/afs_AdminInternal.h"
-#include <afs/afs_AdminErrors.h>
 #include "afs_vosAdmin.h"
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#ifdef AFS_NT40_ENV
-#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;
@@ -66,7 +54,7 @@ UV_Bind(afs_cell_handle_p cellHandle, afs_int32 aserver, afs_int32 port)
  * start a transaction, delete the <delvol> */
 static afs_int32
 CheckAndDeleteVolume(struct rx_connection *aconn, afs_int32 apart,
-                    afs_int32 okvol, afs_int32 delvol)
+                    afs_uint32 okvol, afs_uint32 delvol)
 {
     afs_int32 error, code, tid, rcode;
 
@@ -114,7 +102,7 @@ CheckAndDeleteVolume(struct rx_connection *aconn, afs_int32 apart,
 /* forcibly remove a volume.  Very dangerous call */
 int
 UV_NukeVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
-             unsigned int partition, unsigned int volumeId, afs_status_p st)
+             unsigned int partition, afs_uint32 volumeId, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -135,8 +123,8 @@ 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 quota, unsigned int *volumeId, afs_status_p st)
+               unsigned int partition, char *volumeName,
+               unsigned int quota, afs_uint32 *volumeId, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -150,7 +138,7 @@ UV_CreateVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
     tstatus.maxquota = quota;
 
     /* next the next 3 available ids from the VLDB */
-    tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 3, volumeId);
+    tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 3, volumeId);
     if (tst) {
        goto fail_UV_CreateVolume;
     }
@@ -212,7 +200,7 @@ UV_CreateVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
  */
 int
 UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
-               unsigned int partition, unsigned int volumeId,
+               unsigned int partition, afs_uint32 volumeId,
                afs_status_p st)
 {
     int rc = 0;
@@ -229,7 +217,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
 
     /* Find and read the VLDB entry for this volume */
     tst =
-       ubik_Call(VL_SetLock, cellHandle->vos, 0, volumeId, avoltype,
+       ubik_VL_SetLock(cellHandle->vos, 0, volumeId, avoltype,
                  VLOP_DELETE);
     if (tst) {
        if (tst != VL_NOENT) {
@@ -332,7 +320,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
     }
 
     if ((entry.nServers <= 0) || !(entry.flags & (RO_EXISTS | RW_EXISTS))) {
-       tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, volumeId, vtype);
+       tst = ubik_VL_DeleteEntry(cellHandle->vos, 0, volumeId, vtype);
        if (tst) {
            goto fail_UV_DeleteVolume;
        }
@@ -364,7 +352,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
 
     if (islocked) {
        temp =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volumeId, -1,
+           ubik_VL_ReleaseLock(cellHandle->vos, 0, volumeId, -1,
                      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
        if (temp) {
            if (!tst)
@@ -385,7 +373,7 @@ UV_DeleteVolume(afs_cell_handle_p cellHandle, struct rx_connection *server,
  */
 
 int
-UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
+UV_MoveVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
              afs_int32 afromserver, afs_int32 afrompart, afs_int32 atoserver,
              afs_int32 atopart, afs_status_p st)
 {
@@ -400,12 +388,12 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
     afs_int32 rcode;
     afs_int32 fromDate;
     struct restoreCookie cookie;
-    afs_int32 newVol, volid, backupId;
+    afs_uint32 newVol, volid, backupId;
     struct volser_status tstatus;
     struct destServer destination;
 
     struct nvldbentry entry;
-    int islocked, pntg;
+    int islocked;
     afs_int32 error;
     int same;
     afs_int32 store_flags;
@@ -423,7 +411,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
     clonetid = 0;
     error = 0;
     volid = 0;
-    pntg = 0;
     backupId = 0;
     newVol = 0;
 
@@ -437,7 +424,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
     }
 
     tst =
-       ubik_Call(VL_SetLock, cellHandle->vos, 0, afromvol, RWVOL, VLOP_MOVE);
+       ubik_VL_SetLock(cellHandle->vos, 0, afromvol, RWVOL, VLOP_MOVE);
     if (tst) {
        goto fail_UV_MoveVolume;
     }
@@ -454,7 +441,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
        if (!Lp_Match(cellHandle, &entry, atoserver, atopart, &tst)) {
            /* the to server and partition do not exist in the vldb entry corresponding to volid */
            tst =
-               ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
+               ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
                          (LOCKREL_OPCODE | LOCKREL_AFSID |
                           LOCKREL_TIMESTAMP));
            if (tst) {
@@ -471,7 +458,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
         */
        fromconn = UV_Bind(cellHandle, afromserver, AFSCONF_VOLUMEPORT);
        fromtid = 0;
-       pntg = 1;
 
        tst =
            AFSVolTransCreate(fromconn, afromvol, afrompart, ITOffline,
@@ -545,7 +531,6 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
        }
     }
 
-    pntg = 1;
     toconn = UV_Bind(cellHandle, atoserver, AFSCONF_VOLUMEPORT);       /* get connections to the servers */
     fromconn = UV_Bind(cellHandle, afromserver, AFSCONF_VOLUMEPORT);
     fromtid = totid = 0;       /* initialize to uncreated */
@@ -561,7 +546,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 
     /* Get a clone id */
     newVol = 0;
-    tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &newVol);
+    tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &newVol);
     if (tst) {
        goto fail_UV_MoveVolume;
     }
@@ -824,7 +809,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 
     if (islocked) {
        etst =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
+           ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
                      (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
        if (etst) {
            if (!tst)
@@ -878,7 +863,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 
     /* unlock VLDB entry */
     if (islocked)
-       ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
+       ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
                  (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 
     if (clonetid)
@@ -962,7 +947,7 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
     }
 
     /* unlock VLDB entry */
-    ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
+    ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
              (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
 
   done:                        /* routine cleanup */
@@ -989,12 +974,12 @@ UV_MoveVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 
 int
 UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
-               afs_int32 apart, afs_int32 avolid, afs_status_p st)
+               afs_int32 apart, afs_uint32 avolid, afs_status_p st)
 {
     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;
@@ -1018,7 +1003,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
        /* no assigned backup volume id */
 
        tst =
-           ubik_Call(VL_SetLock, cellHandle->vos, 0, avolid, RWVOL,
+           ubik_VL_SetLock(cellHandle->vos, 0, avolid, RWVOL,
                      VLOP_BACKUP);
        if (tst) {
            goto fail_UV_BackupVolume;
@@ -1041,7 +1026,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
        /* Get a backup volume id from the VLDB and update the vldb
         * entry with it. 
         */
-       tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &backupID);
+       tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &backupID);
        if (tst) {
            goto fail_UV_BackupVolume;
        }
@@ -1160,7 +1145,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
            }
        } else {
            temp =
-               ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, avolid, RWVOL,
+               ubik_VL_ReleaseLock(cellHandle->vos, 0, avolid, RWVOL,
                          (LOCKREL_OPCODE | LOCKREL_AFSID |
                           LOCKREL_TIMESTAMP));
            if (temp) {
@@ -1182,7 +1167,7 @@ UV_BackupVolume(afs_cell_handle_p cellHandle, afs_int32 aserver,
 }
 
 static int
-DelVol(struct rx_connection *conn, afs_int32 vid, afs_int32 part,
+DelVol(struct rx_connection *conn, afs_uint32 vid, afs_int32 part,
        afs_int32 flags)
 {
     afs_int32 acode, ccode, rcode, tid;
@@ -1205,7 +1190,7 @@ DelVol(struct rx_connection *conn, afs_int32 vid, afs_int32 part,
 #if 0                          /* doesn't appear to be used, why compile it */
 static int
 CloneVol(afs_cell_handle_p cellHandle, struct rx_connection *conn,
-        afs_int32 rwvid, afs_int32 part, afs_int32 * rovidp, int nottemp,
+        afs_uint32 rwvid, afs_int32 part, afs_uint32 * rovidp, int nottemp,
         struct nvldbentry *entry, afs_int32 * vidCreateDate, afs_status_p st)
 {
     int rc = 0;
@@ -1223,7 +1208,7 @@ CloneVol(afs_cell_handle_p cellHandle, struct rx_connection *conn,
     /* Get the RO volume id. Allocate a new one if need to */
     *rovidp = entry->volumeId[ROVOL];
     if (*rovidp == INVALID_BID) {
-       tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, rovidp);
+       tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, rovidp);
        if (tst) {
            goto fail_CloneVol;
        }
@@ -1316,7 +1301,7 @@ GetTrans(afs_cell_handle_p cellHandle, struct nvldbentry *vldbEntryPtr,
 {
     int rc = 0;
     afs_status_t tst = 0, etst = 0;
-    afs_int32 volid;
+    afs_uint32 volid;
     struct volser_status tstatus;
     int rcode;
 
@@ -1456,7 +1441,7 @@ VolumeExists(afs_cell_handle_p cellHandle, afs_int32 server,
  * sites if forceflag is 1.If its 0 complete the release if the previous
  * release aborted else start a new release */
 int
-UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
+UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
                 afs_int32 afromserver, afs_int32 afrompart, int forceflag,
                 afs_status_p st)
 {
@@ -1465,7 +1450,7 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 
     char vname[64];
     afs_int32 rcode;
-    afs_int32 cloneVolId, roVolId;
+    afs_uint32 cloneVolId, roVolId;
     struct replica *replicas = 0;
     struct nvldbentry entry;
     int i, volcount, m, fullrelease, vldbindex;
@@ -1491,11 +1476,11 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
     int releasecount = 0;
     struct volser_status volstatus;
 
-    memset((char *)remembertime, 0, sizeof(remembertime));
-    memset((char *)&results, 0, sizeof(results));
+    memset(remembertime, 0, sizeof(remembertime));
+    memset(&results, 0, sizeof(results));
 
     tst =
-       ubik_Call(VL_SetLock, cellHandle->vos, 0, afromvol, RWVOL,
+       ubik_VL_SetLock(cellHandle->vos, 0, afromvol, RWVOL,
                  VLOP_RELEASE);
     if ((tst) && (tst != VL_RERELEASE)) {
        goto fail_UV_ReleaseVolume;
@@ -1544,7 +1529,7 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
     /* Make sure we have a RO volume id to work with */
     if (entry.volumeId[ROVOL] == INVALID_BID) {
        /* need to get a new RO volume id */
-       tst = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &roVolId);
+       tst = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &roVolId);
        if (tst) {
            goto fail_UV_ReleaseVolume;
        }
@@ -1969,7 +1954,7 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
     }
     if (islocked) {
        tst =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, RWVOL,
+           ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, RWVOL,
                      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
        if (tst) {
            rc = 0;
@@ -1994,11 +1979,11 @@ UV_ReleaseVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 }
 
 static int
-ReceiveFile(register int fd, register struct rx_call *call,
-           register struct stat *status)
+ReceiveFile(int fd, struct rx_call *call,
+           struct stat *status)
 {
-    register char *buffer = (char *)0;
-    register int blockSize;
+    char *buffer = (char *)0;
+    int blockSize;
     afs_int32 bytesread, nbytes, bytesleft, w;
     fd_set out;
     afs_int32 error = 0;
@@ -2092,7 +2077,7 @@ DumpFunction(struct rx_call *call, const char *filename)
 * DumpFunction does the real work behind the scenes after
 * extracting parameters from the rock  */
 int
-UV_DumpVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
+UV_DumpVolume(afs_cell_handle_p cellHandle, afs_uint32 afromvol,
              afs_int32 afromserver, afs_int32 afrompart, afs_int32 fromdate,
              const char *filename, afs_status_p st)
 {
@@ -2154,7 +2139,7 @@ UV_DumpVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 
     if (islocked) {
        etst =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, afromvol, -1,
+           ubik_VL_ReleaseLock(cellHandle->vos, 0, afromvol, -1,
                      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
        if (etst) {
            if (!tst)
@@ -2191,8 +2176,8 @@ UV_DumpVolume(afs_cell_handle_p cellHandle, afs_int32 afromvol,
 }
 
 int
-SendFile(register int fd, register struct rx_call *call,
-        register struct stat *status)
+SendFile(int fd, struct rx_call *call,
+        struct stat *status)
 {
     char *buffer = (char *)0;
     int blockSize;
@@ -2291,7 +2276,7 @@ WriteData(struct rx_call *call, const char *filename)
  */
 int
 UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
-                afs_int32 topart, afs_int32 tovolid, const char *tovolname,
+                afs_int32 topart, afs_uint32 tovolid, char *tovolname,
                 int flags, const char *dumpFile, afs_status_p st)
 {
     int rc = 0;
@@ -2303,7 +2288,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
     afs_int32 rxError = 0;
     struct volser_status tstatus;
     char partName[10];
-    afs_int32 pvolid;
+    afs_uint32 pvolid;
     afs_int32 temptid;
     int success;
     struct nvldbentry entry;
@@ -2332,7 +2317,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
        aVLDB_GetEntryByName(cellHandle, tovolname, &entry, &tst);
        if (tst == VL_NOENT) {
            tst =
-               ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 1, &pvolid);
+               ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 1, &pvolid);
            if (tst) {
                goto fail_UV_RestoreVolume;
            }
@@ -2479,7 +2464,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
            islocked = 0;
        } else {                /*update the existing entry */
            tst =
-               ubik_Call(VL_SetLock, cellHandle->vos, 0, pvolid, RWVOL,
+               ubik_VL_SetLock(cellHandle->vos, 0, pvolid, RWVOL,
                          VLOP_RESTORE);
            if (tst) {
                goto fail_UV_RestoreVolume;
@@ -2557,7 +2542,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
     }
     if (islocked) {
        etst =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, pvolid, RWVOL,
+           ubik_VL_ReleaseLock(cellHandle->vos, 0, pvolid, RWVOL,
                      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
        if (etst) {
            if (!tst)
@@ -2598,7 +2583,7 @@ UV_RestoreVolume(afs_cell_handle_p cellHandle, afs_int32 toserver,
 *in vldb */
 int
 UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
-          afs_int32 volid, afs_status_p st)
+          afs_uint32 volid, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -2607,7 +2592,7 @@ UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
     int same = 0;
 
     tst =
-       ubik_Call(VL_SetLock, cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
+       ubik_VL_SetLock(cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
     if (tst) {
        goto fail_UV_AddSite;
     }
@@ -2665,7 +2650,7 @@ UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
 
     if (islocked) {
        tst =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volid, RWVOL,
+           ubik_VL_ReleaseLock(cellHandle->vos, 0, volid, RWVOL,
                      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
     }
 
@@ -2678,7 +2663,7 @@ UV_AddSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
 /*removes <server> <part> as read only site for <volid> from the vldb */
 int
 UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
-             afs_int32 volid, afs_status_p st)
+             afs_uint32 volid, afs_status_p st)
 {
     int rc = 0;
     afs_status_t tst = 0;
@@ -2686,7 +2671,7 @@ UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
     int islocked = 0;
 
     tst =
-       ubik_Call(VL_SetLock, cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
+       ubik_VL_SetLock(cellHandle->vos, 0, volid, RWVOL, VLOP_ADDSITE);
     if (tst) {
        goto fail_UV_RemoveSite;
     }
@@ -2704,7 +2689,7 @@ UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
        if ((entry.nServers == 1) && (entry.flags & RW_EXISTS))
            entry.flags &= ~RO_EXISTS;
        if (entry.nServers < 1) {       /*this is the last ref */
-           tst = ubik_Call(VL_DeleteEntry, cellHandle->vos, 0, volid, ROVOL);
+           tst = ubik_VL_DeleteEntry(cellHandle->vos, 0, volid, ROVOL);
            if (tst) {
                goto fail_UV_RemoveSite;
            }
@@ -2721,7 +2706,7 @@ UV_RemoveSite(afs_cell_handle_p cellHandle, afs_int32 server, afs_int32 part,
 
     if (islocked) {
        afs_status_t t;
-       t = ubik_Call(VL_ReleaseLock, cellHandle->vos, 0, volid, RWVOL,
+       t = ubik_VL_ReleaseLock(cellHandle->vos, 0, volid, RWVOL,
                      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
        if (tst == 0) {
            tst = t;
@@ -2743,7 +2728,7 @@ UV_ListPartitions(struct rx_connection *server, struct partList *ptrPartList,
     afs_status_t tst = 0;
     struct pIDs partIds;
     struct partEntries partEnts;
-    register int i, j = 0;
+    int i, j = 0;
 
     *cntp = 0;
 
@@ -2901,7 +2886,7 @@ UV_XListVolumes(struct rx_connection *server, afs_int32 a_partID, int a_all,
 
 int
 UV_XListOneVolume(struct rx_connection *server, afs_int32 a_partID,
-                 afs_int32 a_volID, struct volintXInfo **a_resultPP,
+                 afs_uint32 a_volID, struct volintXInfo **a_resultPP,
                  afs_status_p st)
 {
     int rc = 0;
@@ -2962,10 +2947,10 @@ UV_XListOneVolume(struct rx_connection *server, afs_int32 a_partID,
  *------------------------------------------------------------------------*/
 
 int UV_ListOneVolume(struct rx_connection *server, afs_int32 a_partID,
-                 afs_int32 a_volID, struct volintInfo **a_resultPP,
+                 afs_uint32 a_volID, struct volintInfo **a_resultPP,
                  afs_status_p st)
 {
-       int rc = 0;
+    int rc = 0;
     afs_status_t tst = 0;
     volEntries volumeInfo;     /*Area for returned info */
 
@@ -3004,8 +2989,10 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue,
               struct rx_connection *server, afs_int32 apart, afs_int32 force)
 {
     struct aqueue elem;
-    int success, temp, temp1, temp2;
-    afs_int32 vcode, maxVolid = 0;
+    int success, temp;
+    afs_uint32 temp1, temp2;
+    afs_int32 vcode;
+    afs_uint32 maxVolid = 0;
     struct nvldbentry entry;
     int noError = 1, error, same;
     int totalC, totalU, totalCE, totalUE, totalG;
@@ -3017,7 +3004,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue,
     counter = 0;
 
     /* get the next  available id's from the vldb server */
-    vcode = ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, 0, &maxVolid);
+    vcode = ubik_VL_GetNewVolumeId(cellHandle->vos, 0, 0, &maxVolid);
     if (vcode) {
        return (vcode);
     }
@@ -3039,32 +3026,27 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue,
            temp2 = elem.ids[RWVOL] - maxVolid + 1;
            maxVolid = 0;
            vcode =
-               ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2,
+               ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2,
                          &maxVolid);
            maxVolid += temp2;
-
-
        }
        if (maxVolid <= elem.ids[ROVOL]) {
-
            temp1 = maxVolid;
            temp2 = elem.ids[ROVOL] - maxVolid + 1;
            maxVolid = 0;
            vcode =
-               ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2,
+               ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2,
                          &maxVolid);
            maxVolid += temp2;
-
        }
        if (maxVolid <= elem.ids[BACKVOL]) {
            temp1 = maxVolid;
            temp2 = elem.ids[BACKVOL] - temp1 + 1;
            maxVolid = 0;
            vcode =
-               ubik_Call(VL_GetNewVolumeId, cellHandle->vos, 0, temp2,
+               ubik_VL_GetNewVolumeId(cellHandle->vos, 0, temp2,
                          &maxVolid);
            maxVolid += temp2;
-
        }
        aVLDB_GetEntryByID(cellHandle, elem.ids[RWVOL], RWVOL, &entry, &tst);
        if (tst && (tst != VL_NOENT)) {
@@ -3248,7 +3230,7 @@ ProcessEntries(afs_cell_handle_p cellHandle, struct qHead *myQueue,
                totalUE++;
 
                vcode =
-                   ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,
+                   ubik_VL_ReleaseLock(cellHandle->vos, 0,
                              elem.ids[RWVOL], RWVOL,
                              LOCKREL_OPCODE | LOCKREL_AFSID |
                              LOCKREL_TIMESTAMP);
@@ -3529,7 +3511,6 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
     int islocked = 0;
     int pass = 0;
     afs_int32 modentry = 0;
-    afs_int32 delentry = 0;
 
     if (modified) {
        *modified = 0;
@@ -3548,7 +3529,7 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
      */
     if (++pass == 2) {
        tst =
-           ubik_Call(VL_SetLock, cellHandle->vos, 0, entry->volumeId[RWVOL],
+           ubik_VL_SetLock(cellHandle->vos, 0, entry->volumeId[RWVOL],
                      RWVOL, VLOP_DELETE);
        if (tst) {
            goto fail_CheckVldb;
@@ -3588,12 +3569,11 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
            && !(entry->flags & RO_EXISTS)) {
            /* The RW, BK, nor RO volumes do not exist. Delete the VLDB entry */
            tst =
-               ubik_Call(VL_DeleteEntry, cellHandle->vos, 0,
+               ubik_VL_DeleteEntry(cellHandle->vos, 0,
                          entry->volumeId[RWVOL], RWVOL);
            if (tst) {
                goto fail_CheckVldb;
            }
-           delentry = 1;
        } else {
            /* Replace old entry with our new one */
            if (!VLDB_ReplaceEntry
@@ -3613,10 +3593,9 @@ CheckVldb(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
 
     if (islocked) {
        vcode =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,
-                     entry->volumeId[RWVOL], RWVOL,
-                     (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP),
-                     &tst);
+           ubik_VL_ReleaseLock(cellHandle->vos, 0,
+                               entry->volumeId[RWVOL], RWVOL,
+                               (LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP));
        if (vcode) {
            if (!tst)
                tst = vcode;
@@ -3643,8 +3622,8 @@ UV_SyncServer(afs_cell_handle_p cellHandle, struct rx_connection *server,
     struct VldbListByAttributes attributes;
     nbulkentries arrayEntries;
     int totalF;
-    register struct nvldbentry *vllist;
-    register int j;
+    struct nvldbentry *vllist;
+    int j;
     afs_int32 si, nsi;
     afs_int32 modified = 0;
 
@@ -3698,13 +3677,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;
@@ -3721,7 +3703,7 @@ UV_RenameVolume(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
     tid = 0;
     islocked = 0;
 
-    tst = ubik_Call(VL_SetLock, cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE);      /*last param is dummy */
+    tst = ubik_VL_SetLock(cellHandle->vos, 0, entry->volumeId[RWVOL], RWVOL, VLOP_ADDSITE);    /*last param is dummy */
     if (tst) {
        goto fail_UV_RenameVolume;
     }
@@ -3853,7 +3835,7 @@ UV_RenameVolume(afs_cell_handle_p cellHandle, struct nvldbentry *entry,
 
     if (islocked) {
        etst =
-           ubik_Call(VL_ReleaseLock, cellHandle->vos, 0,
+           ubik_VL_ReleaseLock(cellHandle->vos, 0,
                      entry->volumeId[RWVOL], RWVOL,
                      LOCKREL_OPCODE | LOCKREL_AFSID | LOCKREL_TIMESTAMP);
        if (etst) {
@@ -4071,7 +4053,7 @@ UV_VolserStatus(struct rx_connection *server, transDebugInfo ** rpntr,
 /*delete the volume without interacting with the vldb */
 int
 UV_VolumeZap(afs_cell_handle_p cellHandle, struct rx_connection *server,
-            unsigned int partition, unsigned int volumeId, afs_status_p st)
+            unsigned int partition, afs_uint32 volumeId, afs_status_p st)
 {
     afs_int32 rcode, ttid, error, code;
     int rc = 0;
@@ -4109,7 +4091,7 @@ UV_VolumeZap(afs_cell_handle_p cellHandle, struct rx_connection *server,
 
 int
 UV_SetVolume(struct rx_connection *server, afs_int32 partition,
-            afs_int32 volid, afs_int32 transflag, afs_int32 setflag,
+            afs_uint32 volid, afs_int32 transflag, afs_int32 setflag,
             unsigned int sleepTime, afs_status_p st)
 {
     int rc = 0;