Allow passing in human-readable units for specifying amounts of space
[openafs.git] / src / volser / vos.c
index d02e512..2078e19 100644 (file)
 #include <afsconfig.h>
 #include <afs/param.h>
 
-RCSID
-    ("$Header$");
 
 #include <sys/types.h>
+#include <string.h>
 #ifdef AFS_NT40_ENV
 #include <fcntl.h>
 #include <io.h>
@@ -31,14 +30,6 @@ RCSID
 #endif
 #include <errno.h>
 
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#ifdef HAVE_STRINGS_H
-#include <strings.h>
-#endif
-#endif
-
 #include <lock.h>
 #include <afs/stds.h>
 #include <rx/xdr.h>
@@ -65,13 +56,20 @@ RCSID
 #include <signal.h>
 #endif
 #include "volser_prototypes.h"
+#include "vsutils_prototypes.h"
+#include "lockprocs_prototypes.h"
 
 #ifdef HAVE_POSIX_REGEX
 #include <regex.h>
 #endif
 
+/* Local Prototypes */
+int PrintDiagnostics(char *astring, afs_int32 acode);
+int GetVolumeInfo(afs_uint32 volid, afs_int32 *server, afs_int32 *part, 
+                  afs_int32 *voltype, struct nvldbentry *rentry);
+
 struct tqElem {
-    afs_int32 volid;
+    afs_uint32 volid;
     struct tqElem *next;
 };
 
@@ -86,10 +84,10 @@ cmd_AddParm(ts, "-noauth", CMD_FLAG, CMD_OPTIONAL, "don't authenticate");\
 cmd_AddParm(ts, "-localauth",CMD_FLAG,CMD_OPTIONAL,"use server tickets");\
 cmd_AddParm(ts, "-verbose", CMD_FLAG, CMD_OPTIONAL, "verbose");\
 cmd_AddParm(ts, "-encrypt", CMD_FLAG, CMD_OPTIONAL, "encrypt commands");\
+cmd_AddParm(ts, "-noresolve", CMD_FLAG, CMD_OPTIONAL, "don't resolve addresses"); \
 
 #define ERROR_EXIT(code) {error=(code); goto error_exit;}
 
-extern int verbose;
 int rxInitDone = 0;
 struct rx_connection *tconn;
 afs_int32 tserver;
@@ -107,7 +105,7 @@ qInit(struct tqHead *ahead)
 
 
 static void
-qPut(struct tqHead *ahead, afs_int32 volid)
+qPut(struct tqHead *ahead, afs_uint32 volid)
 {
     struct tqElem *elem;
 
@@ -120,7 +118,7 @@ qPut(struct tqHead *ahead, afs_int32 volid)
 }
 
 static void
-qGet(struct tqHead *ahead, afs_int32 *volid)
+qGet(struct tqHead *ahead, afs_uint32 *volid)
 {
     struct tqElem *tmp;
 
@@ -287,8 +285,12 @@ SendFile(usd_handle_t ufd, register struct rx_call *call, long blksize)
        FD_ZERO(&in);
        FD_SET((int)(ufd->handle), &in);
        /* don't timeout if read blocks */
+#if defined(AFS_PTHREAD_ENV)
+       select(((int)(ufd->handle)) + 1, &in, 0, 0, 0);
+#else
        IOMGR_Select(((int)(ufd->handle)) + 1, &in, 0, 0, 0);
 #endif
+#endif
        error = USD_READ(ufd, buffer, blksize, &nbytes);
        if (error) {
            fprintf(STDERR, "File system read failed\n");
@@ -311,9 +313,9 @@ SendFile(usd_handle_t ufd, register struct rx_call *call, long blksize)
 /* function invoked by UV_RestoreVolume, reads the data from rx_trx_stream and
  * writes it out to the volume. */
 afs_int32
-WriteData(struct rx_call *call, char *rock)
+WriteData(struct rx_call *call, void *rock)
 {
-    char *filename;
+    char *filename = (char *) rock;
     usd_handle_t ufd;
     long blksize;
     afs_int32 error, code;
@@ -324,7 +326,6 @@ WriteData(struct rx_call *call, char *rock)
 
     error = 0;
 
-    filename = rock;
     if (!filename || !*filename) {
        usd_StandardInput(&ufd);
        blksize = 4096;
@@ -340,21 +341,21 @@ WriteData(struct rx_call *call, char *rock)
            error = VOLSERBADOP;
            goto wfail;
        }
+       /* test if we have a valid dump */
+       hset64(filesize, 0, 0);
+       USD_SEEK(ufd, filesize, SEEK_END, &currOffset);
+       hset64(filesize, hgethi(currOffset), hgetlo(currOffset)-sizeof(afs_uint32));
+       USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
+       USD_READ(ufd, (char *)&buffer, sizeof(afs_uint32), &got);
+       if ((got != sizeof(afs_uint32)) || (ntohl(buffer) != DUMPENDMAGIC)) {
+           fprintf(STDERR, "Signature missing from end of file '%s'\n", filename);
+           error = VOLSERBADOP;
+           goto wfail;
+       }
+       /* rewind, we are done */
+       hset64(filesize, 0, 0);
+       USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
     }
-    /* test if we have a valid dump */
-    hset64(filesize, 0, 0);
-    USD_SEEK(ufd, filesize, SEEK_END, &currOffset);
-    hset64(filesize, hgethi(currOffset), hgetlo(currOffset)-sizeof(afs_uint32));
-    USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
-    USD_READ(ufd, &buffer, sizeof(afs_uint32), &got);
-    if ((got != sizeof(afs_uint32)) || (ntohl(buffer) != DUMPENDMAGIC)) {
-       fprintf(STDERR, "Signature missing from end of file '%s'\n", filename);
-        error = VOLSERBADOP;
-        goto wfail;
-    }
-    hset64(filesize, 0, 0);
-    USD_SEEK(ufd, filesize, SEEK_SET, &currOffset);
-    /* rewind, we are done */
     code = SendFile(ufd, call, blksize);
     if (code) {
        error = code;
@@ -397,8 +398,12 @@ ReceiveFile(usd_handle_t ufd, struct rx_call *call, long blksize)
            FD_ZERO(&out);
            FD_SET((int)(ufd->handle), &out);
            /* don't timeout if write blocks */
+#if defined(AFS_PTHREAD_ENV)
+           select(((int)(ufd->handle)) + 1, &out, 0, 0, 0);
+#else
            IOMGR_Select(((int)(ufd->handle)) + 1, 0, &out, 0, 0);
 #endif
+#endif
            error =
                USD_WRITE(ufd, &buffer[bytesread - bytesleft], bytesleft, &w);
            if (error) {
@@ -415,8 +420,9 @@ ReceiveFile(usd_handle_t ufd, struct rx_call *call, long blksize)
 }
 
 afs_int32
-DumpFunction(struct rx_call *call, char *filename)
+DumpFunction(struct rx_call *call, void *rock)
 {
+    char *filename = (char *)rock;
     usd_handle_t ufd;          /* default is to stdout */
     afs_int32 error = 0, code;
     afs_hyper_t size;
@@ -464,24 +470,17 @@ DumpFunction(struct rx_call *call, char *filename)
     return (error);
 }
 
-#if SIZEOF_TIME_T!=4
 static char *
 vos_ctime(afs_int32 *timep)
 {
     time_t foo = *timep;
     return ctime(&foo);
 }
-#else
-#define vos_ctime ctime
-#endif
 
 static void
-DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast,
-             longlist, disp)
-     volintInfo *pntr;
-     afs_int32 server, part;
-     int *totalOK, *totalNotOK, *totalBusy;
-     int fast, longlist, disp;
+DisplayFormat(volintInfo *pntr, afs_int32 server, afs_int32 part,
+             int *totalOK, int *totalNotOK, int *totalBusy, int fast,
+             int longlist, int disp)
 {
     char pname[10];
 
@@ -503,7 +502,7 @@ DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast,
                *totalOK += 1;
            } else {
                fprintf(STDOUT, "Off-line");
-               *totalNotOK++;
+               *totalNotOK += 1;
            }
            if (pntr->needsSalvaged == 1)
                fprintf(STDOUT, "**needs salvage**");
@@ -532,13 +531,12 @@ DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast,
 #endif
            if (!pntr->updateDate)
                fprintf(STDOUT, "    Last Update Never\n");
-           else {
+           else
                fprintf(STDOUT, "    Last Update %s",
                        vos_ctime( & pntr->updateDate));
-               fprintf(STDOUT,
-                       "    %d accesses in the past day (i.e., vnode references)\n",
-                       pntr->dayUse);
-           }
+           fprintf(STDOUT,
+                   "    %d accesses in the past day (i.e., vnode references)\n",
+                   pntr->dayUse);
        } else if (pntr->status == VBUSY) {
            *totalBusy += 1;
            qPut(&busyHead, pntr->volid);
@@ -618,18 +616,9 @@ DisplayFormat(pntr, server, part, totalOK, totalNotOK, totalBusy, fast,
  *------------------------------------------------------------------------*/
 
 static void
-XDisplayFormat(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
-              a_totalBusyP, a_fast, a_int32, a_showProblems)
-     volintXInfo *a_xInfoP;
-     afs_int32 a_servID;
-     afs_int32 a_partID;
-     int *a_totalOKP;
-     int *a_totalNotOKP;
-     int *a_totalBusyP;
-     int a_fast;
-     int a_int32;
-     int a_showProblems;
-
+XDisplayFormat(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
+              int *a_totalOKP, int *a_totalNotOKP, int *a_totalBusyP,
+              int a_fast, int a_int32, int a_showProblems)
 {                              /*XDisplayFormat */
 
     char pname[10];
@@ -689,13 +678,12 @@ XDisplayFormat(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
 #endif
            if (!a_xInfoP->updateDate)
                fprintf(STDOUT, "    Last Update Never\n");
-           else {
+           else
                fprintf(STDOUT, "    Last Update %s",
                        vos_ctime( & a_xInfoP->updateDate));
-               fprintf(STDOUT,
-                       "    %d accesses in the past day (i.e., vnode references)\n",
-                       a_xInfoP->dayUse);
-           }
+           fprintf(STDOUT,
+                   "    %d accesses in the past day (i.e., vnode references)\n",
+                   a_xInfoP->dayUse);
 
            /*
             * Print all the read/write and authorship stats.
@@ -854,18 +842,9 @@ XDisplayFormat(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
  *------------------------------------------------------------------------*/
 
 static void
-XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
-              a_totalBusyP, a_fast, a_int32, a_showProblems)
-     volintXInfo *a_xInfoP;
-     afs_int32 a_servID;
-     afs_int32 a_partID;
-     int *a_totalOKP;
-     int *a_totalNotOKP;
-     int *a_totalBusyP;
-     int a_fast;
-     int a_int32;
-     int a_showProblems;
-
+XDisplayFormat2(volintXInfo *a_xInfoP, afs_int32 a_servID, afs_int32 a_partID,
+               int *a_totalOKP, int *a_totalNotOKP, int *a_totalBusyP,
+               int a_fast, int a_int32, int a_showProblems)
 {                              /*XDisplayFormat */
     if (a_fast) {
        /*
@@ -900,7 +879,7 @@ XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
                }
 
                fprintf(STDOUT, "name\t\t%s\n", a_xInfoP->name);
-               fprintf(STDOUT, "id\t\t%lu\n", a_xInfoP->volid);
+               fprintf(STDOUT, "id\t\t%lu\n", afs_printable_uint32_lu(a_xInfoP->volid));
                fprintf(STDOUT, "serv\t\t%s\t%s\n", address, hostname);
                fprintf(STDOUT, "part\t\t%s\n", pname);
                switch (a_xInfoP->status) {
@@ -914,9 +893,12 @@ XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
                        fprintf(STDOUT, "status\t\tUNATTACHABLE\n");
                        return;
                }
-               fprintf(STDOUT, "backupID\t%lu\n", a_xInfoP->backupID);
-               fprintf(STDOUT, "parentID\t%lu\n", a_xInfoP->parentID);
-               fprintf(STDOUT, "cloneID\t\t%lu\n", a_xInfoP->cloneID);
+               fprintf(STDOUT, "backupID\t%lu\n", 
+                       afs_printable_uint32_lu(a_xInfoP->backupID));
+               fprintf(STDOUT, "parentID\t%lu\n", 
+                       afs_printable_uint32_lu(a_xInfoP->parentID));
+               fprintf(STDOUT, "cloneID\t\t%lu\n", 
+                       afs_printable_uint32_lu(a_xInfoP->cloneID));
                fprintf(STDOUT, "inUse\t\t%s\n", a_xInfoP->inUse ? "Y" : "N");
                switch (a_xInfoP->type) {
                case 0:
@@ -932,15 +914,20 @@ XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
                        fprintf(STDOUT, "type\t\t?\n");
                        break;
                }
-               fprintf(STDOUT, "creationDate\t%-9lu\t%s", a_xInfoP->creationDate,
+               fprintf(STDOUT, "creationDate\t%-9lu\t%s", 
+                       afs_printable_uint32_lu(a_xInfoP->creationDate),
                        vos_ctime(&a_xInfoP->creationDate));
-               fprintf(STDOUT, "accessDate\t%-9lu\t%s", a_xInfoP->accessDate,
+               fprintf(STDOUT, "accessDate\t%-9lu\t%s", 
+                       afs_printable_uint32_lu(a_xInfoP->accessDate),
                        vos_ctime(&a_xInfoP->accessDate));
-               fprintf(STDOUT, "updateDate\t%-9lu\t%s", a_xInfoP->updateDate,
+               fprintf(STDOUT, "updateDate\t%-9lu\t%s", 
+                       afs_printable_uint32_lu(a_xInfoP->updateDate),
                        vos_ctime(&a_xInfoP->updateDate));
-               fprintf(STDOUT, "backupDate\t%-9lu\t%s", a_xInfoP->backupDate,
+               fprintf(STDOUT, "backupDate\t%-9lu\t%s", 
+                       afs_printable_uint32_lu(a_xInfoP->backupDate),
                        vos_ctime(&a_xInfoP->backupDate));
-               fprintf(STDOUT, "copyDate\t%-9lu\t%s", a_xInfoP->copyDate,
+               fprintf(STDOUT, "copyDate\t%-9lu\t%s", 
+                       afs_printable_uint32_lu(a_xInfoP->copyDate),
                        vos_ctime(&a_xInfoP->copyDate));
                
                fprintf(STDOUT, "diskused\t%u\n", a_xInfoP->size);
@@ -1027,9 +1014,7 @@ XDisplayFormat2(a_xInfoP, a_servID, a_partID, a_totalOKP, a_totalNotOKP,
 
 #ifdef FULL_LISTVOL_SWITCH
 static void
-DisplayFormat2(server, partition, pntr)
-     long server, partition;
-     volintInfo *pntr;
+DisplayFormat2(long server, long partition, volintInfo *pntr)
 {
     static long server_cache = -1, partition_cache = -1;
     static char hostname[256], address[32], pname[16];
@@ -1047,7 +1032,8 @@ DisplayFormat2(server, partition, pntr)
        partition_cache = partition;
     }
     fprintf(STDOUT, "name\t\t%s\n", pntr->name);
-    fprintf(STDOUT, "id\t\t%lu\n", pntr->volid);
+    fprintf(STDOUT, "id\t\t%lu\n", 
+           afs_printable_uint32_lu(pntr->volid));
     fprintf(STDOUT, "serv\t\t%s\t%s\n", address, hostname);
     fprintf(STDOUT, "part\t\t%s\n", pname);
     switch (pntr->status) {
@@ -1061,9 +1047,12 @@ DisplayFormat2(server, partition, pntr)
        fprintf(STDOUT, "status\t\tUNATTACHABLE\n");
        return;
     }
-    fprintf(STDOUT, "backupID\t%lu\n", pntr->backupID);
-    fprintf(STDOUT, "parentID\t%lu\n", pntr->parentID);
-    fprintf(STDOUT, "cloneID\t\t%lu\n", pntr->cloneID);
+    fprintf(STDOUT, "backupID\t%lu\n", 
+           afs_printable_uint32_lu(pntr->backupID));
+    fprintf(STDOUT, "parentID\t%lu\n", 
+           afs_printable_uint32_lu(pntr->parentID));
+    fprintf(STDOUT, "cloneID\t\t%lu\n", 
+           afs_printable_uint32_lu(pntr->cloneID));
     fprintf(STDOUT, "inUse\t\t%s\n", pntr->inUse ? "Y" : "N");
     fprintf(STDOUT, "needsSalvaged\t%s\n", pntr->needsSalvaged ? "Y" : "N");
     /* 0xD3 is from afs/volume.h since I had trouble including the file */
@@ -1082,32 +1071,40 @@ DisplayFormat2(server, partition, pntr)
        fprintf(STDOUT, "type\t\t?\n");
        break;
     }
-    fprintf(STDOUT, "creationDate\t%-9lu\t%s", pntr->creationDate,
+    fprintf(STDOUT, "creationDate\t%-9lu\t%s", 
+           afs_printable_uint32_lu(pntr->creationDate),
            vos_ctime(&pntr->creationDate));
-    fprintf(STDOUT, "accessDate\t%-9lu\t%s", pntr->accessDate,
+    fprintf(STDOUT, "accessDate\t%-9lu\t%s", 
+           afs_printable_uint32_lu(pntr->accessDate),
            vos_ctime(&pntr->accessDate));
-    fprintf(STDOUT, "updateDate\t%-9lu\t%s", pntr->updateDate,
+    fprintf(STDOUT, "updateDate\t%-9lu\t%s", 
+           afs_printable_uint32_lu(pntr->updateDate),
            vos_ctime(&pntr->updateDate));
-    fprintf(STDOUT, "backupDate\t%-9lu\t%s", pntr->backupDate,
+    fprintf(STDOUT, "backupDate\t%-9lu\t%s", 
+           afs_printable_uint32_lu(pntr->backupDate),
            vos_ctime(&pntr->backupDate));
-    fprintf(STDOUT, "copyDate\t%-9lu\t%s", pntr->copyDate,
+    fprintf(STDOUT, "copyDate\t%-9lu\t%s", 
+           afs_printable_uint32_lu(pntr->copyDate),
            vos_ctime(&pntr->copyDate));
-    fprintf(STDOUT, "flags\t\t%#lx\t(Optional)\n", pntr->flags);
+    fprintf(STDOUT, "flags\t\t%#lx\t(Optional)\n", 
+           afs_printable_uint32_lu(pntr->flags));
     fprintf(STDOUT, "diskused\t%u\n", pntr->size);
     fprintf(STDOUT, "maxquota\t%u\n", pntr->maxquota);
-    fprintf(STDOUT, "minquota\t%lu\t(Optional)\n", pntr->spare0);
+    fprintf(STDOUT, "minquota\t%lu\t(Optional)\n", 
+           afs_printable_uint32_lu(pntr->spare0));
     fprintf(STDOUT, "filecount\t%u\n", pntr->filecount);
     fprintf(STDOUT, "dayUse\t\t%u\n", pntr->dayUse);
-    fprintf(STDOUT, "weekUse\t\t%lu\t(Optional)\n", pntr->spare1);
-    fprintf(STDOUT, "spare2\t\t%lu\t(Optional)\n", pntr->spare2);
-    fprintf(STDOUT, "spare3\t\t%lu\t(Optional)\n", pntr->spare3);
+    fprintf(STDOUT, "weekUse\t\t%lu\t(Optional)\n",
+           afs_printable_uint32_lu(pntr->spare1));
+    fprintf(STDOUT, "spare2\t\t%lu\t(Optional)\n", 
+           afs_printable_uint32_lu(pntr->spare2));
+    fprintf(STDOUT, "spare3\t\t%lu\t(Optional)\n", 
+           afs_printable_uint32_lu(pntr->spare3));
     return;
 }
 
 static void
-DisplayVolumes2(server, partition, pntr, count)
-     volintInfo *pntr;
-     long server, partition, count;
+DisplayVolumes2(long server, long partition, volintInfo *pntr, long count)
 {
     long i;
 
@@ -1122,14 +1119,12 @@ DisplayVolumes2(server, partition, pntr, count)
 #endif /* FULL_LISTVOL_SWITCH */
 
 static void
-DisplayVolumes(server, part, pntr, count, longlist, fast, quiet)
-     afs_int32 server, part;
-     volintInfo *pntr;
-     afs_int32 count, longlist, fast;
-     int quiet;
+DisplayVolumes(afs_int32 server, afs_int32 part, volintInfo *pntr,
+              afs_int32 count, afs_int32 longlist, afs_int32 fast,
+              int quiet)
 {
     int totalOK, totalNotOK, totalBusy, i;
-    afs_int32 volid;
+    afs_uint32 volid = 0;
 
     totalOK = 0;
     totalNotOK = 0;
@@ -1190,23 +1185,16 @@ DisplayVolumes(server, part, pntr, count, longlist, fast, quiet)
  *------------------------------------------------------------------------*/
 
 static void
-XDisplayVolumes(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast,
-               a_quiet)
-     afs_int32 a_servID;
-     afs_int32 a_partID;
-     volintXInfo *a_xInfoP;
-     afs_int32 a_count;
-     afs_int32 a_int32;
-     afs_int32 a_fast;
-     int a_quiet;
-
+XDisplayVolumes(afs_int32 a_servID, afs_int32 a_partID, volintXInfo *a_xInfoP,
+               afs_int32 a_count, afs_int32 a_int32, afs_int32 a_fast,
+               int a_quiet)
 {                              /*XDisplayVolumes */
 
     int totalOK;               /*Total OK volumes */
     int totalNotOK;            /*Total screwed volumes */
     int totalBusy;             /*Total busy volumes */
     int i;                     /*Loop variable */
-    afs_int32 volid;           /*Current volume ID */
+    afs_uint32 volid = 0;      /*Current volume ID */
 
     /*
      * Initialize counters and (global!!) queues.
@@ -1281,23 +1269,16 @@ XDisplayVolumes(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast,
  *------------------------------------------------------------------------*/
 
 static void
-XDisplayVolumes2(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast,
-               a_quiet)
-     afs_int32 a_servID;
-     afs_int32 a_partID;
-     volintXInfo *a_xInfoP;
-     afs_int32 a_count;
-     afs_int32 a_int32;
-     afs_int32 a_fast;
-     int a_quiet;
-
+XDisplayVolumes2(afs_int32 a_servID, afs_int32 a_partID, volintXInfo *a_xInfoP,
+                afs_int32 a_count, afs_int32 a_int32, afs_int32 a_fast,
+                int a_quiet)
 {                              /*XDisplayVolumes */
 
     int totalOK;               /*Total OK volumes */
     int totalNotOK;            /*Total screwed volumes */
     int totalBusy;             /*Total busy volumes */
     int i;                     /*Loop variable */
-    afs_int32 volid;           /*Current volume ID */
+    afs_uint32 volid = 0;      /*Current volume ID */
 
     /*
      * Initialize counters and (global!!) queues.
@@ -1353,11 +1334,8 @@ XDisplayVolumes2(a_servID, a_partID, a_xInfoP, a_count, a_int32, a_fast,
 /* set <server> and <part> to the correct values depending on 
  * <voltype> and <entry> */
 static void
-GetServerAndPart(entry, voltype, server, part, previdx)
-     struct nvldbentry *entry;
-     afs_int32 *server, *part;
-     int voltype;
-     int *previdx;
+GetServerAndPart(struct nvldbentry *entry, int voltype, afs_int32 *server,
+                afs_int32 *part, int *previdx)
 {
     int i, istart, vtype;
 
@@ -1389,8 +1367,7 @@ GetServerAndPart(entry, voltype, server, part, previdx)
 }
 
 static void
-PostVolumeStats(entry)
-     struct nvldbentry *entry;
+PostVolumeStats(struct nvldbentry *entry)
 {
     SubEnumerateEntry(entry);
     /* Check for VLOP_ALLOPERS */
@@ -1423,13 +1400,8 @@ PostVolumeStats(entry)
  *------------------------------------------------------------------------*/
 
 static void
-XVolumeStats(a_xInfoP, a_entryP, a_srvID, a_partID, a_volType)
-     volintXInfo *a_xInfoP;
-     struct nvldbentry *a_entryP;
-     afs_int32 a_srvID;
-     afs_int32 a_partID;
-     int a_volType;
-
+XVolumeStats(volintXInfo *a_xInfoP, struct nvldbentry *a_entryP,
+            afs_int32 a_srvID, afs_int32 a_partID, int a_volType)
 {                              /*XVolumeStats */
 
     int totalOK, totalNotOK, totalBusy;        /*Dummies - we don't really count here */
@@ -1448,11 +1420,8 @@ XVolumeStats(a_xInfoP, a_entryP, a_srvID, a_partID, a_volType)
 }                              /*XVolumeStats */
 
 static void
-VolumeStats(pntr, entry, server, part, voltype)
-     volintInfo *pntr;
-     struct nvldbentry *entry;
-     int voltype;
-     afs_int32 server, part;
+VolumeStats_int(volintInfo *pntr, struct nvldbentry *entry, afs_int32 server, 
+            afs_int32 part, int voltype)
 {
     int totalOK, totalNotOK, totalBusy;
 
@@ -1462,12 +1431,12 @@ VolumeStats(pntr, entry, server, part, voltype)
 }
 
 /* command to forcibly remove a volume */
-static
-NukeVolume(as)
-     register struct cmd_syndesc *as;
+static int
+NukeVolume(register struct cmd_syndesc *as)
 {
     register afs_int32 code;
-    afs_int32 volID, err;
+    afs_uint32 volID;
+    afs_int32  err;
     afs_int32 partID;
     afs_int32 server;
     register char *tp;
@@ -1528,15 +1497,14 @@ NukeVolume(as)
  *     As advertised.
  *------------------------------------------------------------------------
  */
-static
-ExamineVolume(as)
-     register struct cmd_syndesc *as;
+static int
+ExamineVolume(register struct cmd_syndesc *as, void *arock)
 {
     struct nvldbentry entry;
     afs_int32 vcode = 0;
     volintInfo *pntr = (volintInfo *) 0;
     volintXInfo *xInfoP = (volintXInfo *) 0;
-    afs_int32 volid;
+    afs_uint32 volid;
     afs_int32 code, err, error = 0;
     int voltype, foundserv = 0, foundentry = 0;
     afs_int32 aserver, apart;
@@ -1636,7 +1604,7 @@ ExamineVolume(as)
                EnumerateEntry(&entry);
            } else
 #endif /* FULL_LISTVOL_SWITCH */
-               VolumeStats(pntr, &entry, aserver, apart, voltype);
+               VolumeStats_int(pntr, &entry, aserver, apart, voltype);
 
            if ((voltype == BACKVOL) && !(entry.flags & BACK_EXISTS)) {
                /* The VLDB says there is no backup volume yet we found one on disk */
@@ -1681,14 +1649,12 @@ ExamineVolume(as)
  *     As advertised.
  *------------------------------------------------------------------------
  */
-static
-SetFields(as)
-     register struct cmd_syndesc *as;
+static int
+SetFields(register struct cmd_syndesc *as, void *arock)
 {
     struct nvldbentry entry;
-    afs_int32 vcode = 0;
     volintInfo info;
-    afs_int32 volid;
+    afs_uint32 volid;
     afs_int32 code, err;
     afs_int32 aserver, apart;
     int previdx = -1;
@@ -1725,7 +1691,7 @@ SetFields(as)
 
     if (as->parms[1].items) {
        /* -max <quota> */
-       code = util_GetInt32(as->parms[1].items->data, &info.maxquota);
+       code = util_GetHumanInt32(as->parms[1].items->data, &info.maxquota);
        if (code) {
            fprintf(STDERR, "invalid quota value\n");
            return code;
@@ -1766,11 +1732,11 @@ SetFields(as)
  *     As advertised.
  *------------------------------------------------------------------------
  */
-static
-volOnline(as)
-     register struct cmd_syndesc *as;
+static int
+volOnline(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 server, partition, volid;
+    afs_int32 server, partition;
+    afs_uint32 volid;
     afs_int32 code, err = 0;
 
     server = GetServer(as->parms[0].items->data);
@@ -1827,9 +1793,10 @@ volOnline(as)
  *------------------------------------------------------------------------
  */
 static int
-volOffline(register struct cmd_syndesc *as)
+volOffline(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 server, partition, volid;
+    afs_int32 server, partition;
+    afs_uint32 volid;
     afs_int32 code, err = 0;
     afs_int32 transflag, sleeptime, transdone;
 
@@ -1877,11 +1844,12 @@ volOffline(register struct cmd_syndesc *as)
 }
 
 static int
-CreateVolume(register struct cmd_syndesc *as)
+CreateVolume(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 pnum;
     char part[10];
-    afs_int32 volid, code;
+    afs_uint32 volid;
+    afs_int32 code;
     struct nvldbentry entry;
     afs_int32 vcode;
     afs_int32 quota;
@@ -1934,13 +1902,7 @@ CreateVolume(register struct cmd_syndesc *as)
     }
 
     if (as->parms[3].items) {
-       if (!IsNumeric(as->parms[3].items->data)) {
-           fprintf(STDERR, "Initial quota %s should be numeric.\n",
-                   as->parms[3].items->data);
-           return EINVAL;
-       }
-
-       code = util_GetInt32(as->parms[3].items->data, &quota);
+       code = util_GetHumanInt32(as->parms[3].items->data, &quota);
        if (code) {
            fprintf(STDERR, "vos: bad integer specified for quota.\n");
            return code;
@@ -1961,12 +1923,13 @@ CreateVolume(register struct cmd_syndesc *as)
     return 0;
 }
 
+#if 0
 static afs_int32
-DeleteAll(entry)
-     struct nvldbentry *entry;
+DeleteAll(struct nvldbentry *entry)
 {
     int i;
-    afs_int32 error, code, curserver, curpart, volid;
+    afs_int32 error, code, curserver, curpart;
+    afs_uint32 volid;
 
     MapHostToNetwork(entry);
     error = 0;
@@ -1984,13 +1947,14 @@ DeleteAll(entry)
     }
     return error;
 }
+#endif
 
-static
-DeleteVolume(as)
-     struct cmd_syndesc *as;
+static int
+DeleteVolume(struct cmd_syndesc *as, void *arock)
 {
     afs_int32 err, code = 0;
-    afs_int32 server = 0, partition = -1, volid;
+    afs_int32 server = 0, partition = -1;
+    afs_uint32 volid;
     char pname[10];
     afs_int32 idx, j;
 
@@ -2106,16 +2070,16 @@ DeleteVolume(as)
 }
 
 #define TESTM  0               /* set for move space tests, clear for production */
-static
-MoveVolume(as)
-     register struct cmd_syndesc *as;
+static int
+MoveVolume(register struct cmd_syndesc *as, void *arock)
 {
 
-    afs_int32 volid, fromserver, toserver, frompart, topart;
+    afs_uint32 volid;
+    afs_int32 fromserver, toserver, frompart, topart;
     afs_int32 flags, code, err;
     char fromPartName[10], toPartName[10];
 
-    struct diskPartition partition;    /* for space check */
+    struct diskPartition64 partition;  /* for space check */
     volintInfo *p;
 
     volid = vsu_GetVolumeID(as->parms[0].items->data, cstruct, &err);
@@ -2184,13 +2148,13 @@ MoveVolume(as)
      * check target partition for space to move volume
      */
 
-    code = UV_PartitionInfo(toserver, toPartName, &partition);
+    code = UV_PartitionInfo64(toserver, toPartName, &partition);
     if (code) {
        fprintf(STDERR, "vos: cannot access partition %s\n", toPartName);
        exit(1);
     }
     if (TESTM)
-       fprintf(STDOUT, "target partition %s free space %d\n", toPartName,
+       fprintf(STDOUT, "target partition %s free space %" AFS_INT64_FMT "\n", toPartName,
                partition.free);
 
     p = (volintInfo *) 0;
@@ -2234,14 +2198,14 @@ MoveVolume(as)
     return 0;
 }
 
-static
-CopyVolume(as)
-     register struct cmd_syndesc *as;
+static int
+CopyVolume(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 volid, fromserver, toserver, frompart, topart, code, err, flags;
+    afs_uint32 volid;
+    afs_int32 fromserver, toserver, frompart, topart, code, err, flags;
     char fromPartName[10], toPartName[10], *tovolume;
     struct nvldbentry entry;
-    struct diskPartition partition;    /* for space check */
+    struct diskPartition64 partition;  /* for space check */
     volintInfo *p;
 
     volid = vsu_GetVolumeID(as->parms[0].items->data, cstruct, &err);
@@ -2336,13 +2300,13 @@ CopyVolume(as)
      * check target partition for space to move volume
      */
 
-    code = UV_PartitionInfo(toserver, toPartName, &partition);
+    code = UV_PartitionInfo64(toserver, toPartName, &partition);
     if (code) {
        fprintf(STDERR, "vos: cannot access partition %s\n", toPartName);
        exit(1);
     }
     if (TESTM)
-       fprintf(STDOUT, "target partition %s free space %d\n", toPartName,
+       fprintf(STDOUT, "target partition %s free space %" AFS_INT64_FMT "\n", toPartName,
                partition.free);
 
     p = (volintInfo *) 0;
@@ -2381,15 +2345,14 @@ CopyVolume(as)
 }
 
 
-static
-ShadowVolume(as)
-     register struct cmd_syndesc *as;
+static int
+ShadowVolume(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 volid, fromserver, toserver, frompart, topart, tovolid;
+    afs_uint32 volid, tovolid;
+    afs_int32 fromserver, toserver, frompart, topart;
     afs_int32 code, err, flags;
     char fromPartName[10], toPartName[10], toVolName[32], *tovolume;
-    struct nvldbentry entry;
-    struct diskPartition partition;    /* for space check */
+    struct diskPartition64 partition;  /* for space check */
     volintInfo *p, *q;
 
     p = (volintInfo *) 0;
@@ -2522,13 +2485,13 @@ ShadowVolume(as)
      * check target partition for space to move volume
      */
 
-    code = UV_PartitionInfo(toserver, toPartName, &partition);
+    code = UV_PartitionInfo64(toserver, toPartName, &partition);
     if (code) {
        fprintf(STDERR, "vos: cannot access partition %s\n", toPartName);
        exit(1);
     }
     if (TESTM)
-       fprintf(STDOUT, "target partition %s free space %d\n", toPartName,
+       fprintf(STDOUT, "target partition %s free space %" AFS_INT64_FMT "\n", toPartName,
                partition.free);
 
     /* Don't do this again if we did it above */
@@ -2578,11 +2541,11 @@ ShadowVolume(as)
 }
 
 
-static
-CloneVolume(as)
-     register struct cmd_syndesc *as;
+static int
+CloneVolume(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 server, part, volid, cloneid, voltype;
+    afs_uint32 volid, cloneid;
+    afs_int32 server, part, voltype;
     char partName[10], *volname;
     afs_int32 code, err, flags;
     struct nvldbentry entry;
@@ -2639,12 +2602,18 @@ CloneVolume(as)
                volname, VOLSER_OLDMAXVOLNAME - 1);
            return E2BIG;
        }
+#if 0
+       /* 
+        * In order that you be able to make clones of RO or BK, this
+        * check must be omitted.
+        */
        if (!VolNameOK(volname)) {
            fprintf(STDERR,
                "Illegal volume name %s, should not end in .readonly or .backup\n",
                volname);
            return EINVAL;
        }
+#endif
        if (IsNumeric(volname)) {
            fprintf(STDERR,
                "Illegal volume name %s, should not be a number\n",
@@ -2679,21 +2648,22 @@ CloneVolume(as)
        return code;
     }
     MapPartIdIntoName(part, partName);
-    fprintf(STDOUT, "Created clone for volume %lu\n",
+    fprintf(STDOUT, "Created clone for volume %s\n",
            as->parms[0].items->data);
 
     return 0;
 }
 
 
-static
-BackupVolume(as)
-     register struct cmd_syndesc *as;
+static int
+BackupVolume(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, aserver, apart, vtype, code, err;
+    afs_uint32 avolid;
+    afs_int32 aserver, apart, vtype, code, err;
     struct nvldbentry entry;
 
-    afs_int32 buvolid, buserver, bupart, butype;
+    afs_uint32 buvolid;
+    afs_int32 buserver, bupart, butype;
     struct nvldbentry buentry;
 
     avolid = vsu_GetVolumeID(as->parms[0].items->data, cstruct, &err);
@@ -2755,13 +2725,13 @@ BackupVolume(as)
     return 0;
 }
 
-static
-ReleaseVolume(as)
-     register struct cmd_syndesc *as;
+static int
+ReleaseVolume(register struct cmd_syndesc *as, void *arock)
 {
 
     struct nvldbentry entry;
-    afs_int32 avolid, aserver, apart, vtype, code, err;
+    afs_uint32 avolid;
+    afs_int32 aserver, apart, vtype, code, err;
     int force = 0;
 
     if (as->parms[1].items)
@@ -2801,12 +2771,11 @@ ReleaseVolume(as)
     return 0;
 }
 
-static
-DumpVolume(as)
-     register struct cmd_syndesc *as;
-
+static int
+DumpVolumeCmd(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i;
+    afs_uint32 avolid;
+    afs_int32 aserver, apart, voltype, fromdate = 0, code, err, i, flags;
     char filename[MAXPATHLEN];
     struct nvldbentry entry;
 
@@ -2866,14 +2835,20 @@ DumpVolume(as)
        strcpy(filename, "");
     }
 
+    flags = as->parms[6].items ? VOLDUMPV2_OMITDIRS : 0;
+retry_dump:
     if (as->parms[5].items) {
        code =
            UV_DumpClonedVolume(avolid, aserver, apart, fromdate,
-                               DumpFunction, filename);
+                               DumpFunction, filename, flags);
     } else {
        code =
            UV_DumpVolume(avolid, aserver, apart, fromdate, DumpFunction,
-                         filename);
+                         filename, flags);
+    }
+    if ((code == RXGEN_OPCODE) && (as->parms[6].items)) {
+       flags &= ~VOLDUMPV2_OMITDIRS;
+       goto retry_dump;
     }
     if (code) {
        PrintDiagnostics("dump", code);
@@ -2897,15 +2872,15 @@ DumpVolume(as)
 #define TS_KEEP        2
 #define TS_NEW 3
 
-static
-RestoreVolume(as)
-     register struct cmd_syndesc *as;
-
+static int
+RestoreVolumeCmd(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, aparentid, aserver, apart, code, vcode, err;
+    afs_uint32 avolid, aparentid;
+    afs_int32 aserver, apart, code, vcode, err;
     afs_int32 aoverwrite = ASK;
     afs_int32 acreation = 0, alastupdate = 0;
-    int restoreflags, readonly = 0, offline = 0, voltype = RWVOL;
+    int restoreflags = 0;
+    int readonly = 0, offline = 0, voltype = RWVOL;
     char prompt;
     char afilename[MAXPATHLEN], avolname[VOLSER_MAXVOLNAME + 1], apartName[10];
     char volname[VOLSER_MAXVOLNAME + 1];
@@ -3170,6 +3145,10 @@ RestoreVolume(as)
        default:
            restoreflags |= RV_LUDUMP;
     }
+    if (as->parms[10].items) {
+       restoreflags |= RV_NODEL;
+    }
+    
 
     code =
        UV_RestoreVolume2(aserver, apart, avolid, aparentid,
@@ -3189,12 +3168,11 @@ RestoreVolume(as)
     return 0;
 }
 
-static
-LockReleaseCmd(as)
-     register struct cmd_syndesc *as;
-
+static int
+LockReleaseCmd(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, code, err;
+    afs_uint32 avolid;
+    afs_int32 code, err;
 
     avolid = vsu_GetVolumeID(as->parms[0].items->data, cstruct, &err);
     if (avolid == 0) {
@@ -3216,11 +3194,11 @@ LockReleaseCmd(as)
     return 0;
 }
 
-static
-AddSite(as)
-     register struct cmd_syndesc *as;
+static int
+AddSite(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, aserver, apart, code, err;
+    afs_uint32 avolid;
+    afs_int32 aserver, apart, code, err, valid = 0;
     char apartName[10], avolname[VOLSER_MAXVOLNAME + 1];
 
     vsu_ExtractName(avolname, as->parms[2].items->data);;
@@ -3254,7 +3232,10 @@ AddSite(as)
                    as->parms[1].items->data);
        exit(1);
     }
-    code = UV_AddSite(aserver, apart, avolid);
+    if (as->parms[3].items) {
+       valid = 1;
+    }
+    code = UV_AddSite(aserver, apart, avolid, valid);
     if (code) {
        PrintDiagnostics("addsite", code);
        exit(1);
@@ -3265,12 +3246,12 @@ AddSite(as)
     return 0;
 }
 
-static
-RemoveSite(as)
-     register struct cmd_syndesc *as;
+static int
+RemoveSite(register struct cmd_syndesc *as, void *arock)
 {
 
-    afs_int32 avolid, aserver, apart, code, err;
+    afs_uint32 avolid;
+    afs_int32 aserver, apart, code, err;
     char apartName[10], avolname[VOLSER_MAXVOLNAME + 1];
 
     vsu_ExtractName(avolname, as->parms[2].items->data);
@@ -3317,11 +3298,11 @@ RemoveSite(as)
     return 0;
 }
 
-static
-ChangeLocation(as)
-     register struct cmd_syndesc *as;
+static int
+ChangeLocation(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, aserver, apart, code, err;
+    afs_uint32 avolid;
+    afs_int32 aserver, apart, code, err;
     char apartName[10];
 
     avolid = vsu_GetVolumeID(as->parms[2].items->data, cstruct, &err);
@@ -3365,9 +3346,8 @@ ChangeLocation(as)
     return 0;
 }
 
-static
-ListPartitions(as)
-     register struct cmd_syndesc *as;
+static int
+ListPartitions(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 aserver, code;
     struct partList dummyPartList;
@@ -3407,8 +3387,7 @@ ListPartitions(as)
 }
 
 static int
-CompareVolName(p1, p2)
-     char *p1, *p2;
+CompareVolName(const void *p1, const void *p2)
 {
     volintInfo *arg1, *arg2;
 
@@ -3441,9 +3420,7 @@ CompareVolName(p1, p2)
  *------------------------------------------------------------------------*/
 
 static int
-XCompareVolName(a_obj1P, a_obj2P)
-     char *a_obj1P, *a_obj2P;
-
+XCompareVolName(const void *a_obj1P, const void *a_obj2P)
 {                              /*XCompareVolName */
 
     return (strcmp
@@ -3453,8 +3430,7 @@ XCompareVolName(a_obj1P, a_obj2P)
 }                              /*XCompareVolName */
 
 static int
-CompareVolID(p1, p2)
-     char *p1, *p2;
+CompareVolID(const void *p1, const void *p2)
 {
     volintInfo *arg1, *arg2;
 
@@ -3492,9 +3468,7 @@ CompareVolID(p1, p2)
  *------------------------------------------------------------------------*/
 
 static int
-XCompareVolID(a_obj1P, a_obj2P)
-     char *a_obj1P, *a_obj2P;
-
+XCompareVolID(const void *a_obj1P, const void *a_obj2P)
 {                              /*XCompareVolID */
 
     afs_int32 id1, id2;                /*Volume IDs we're comparing */
@@ -3530,17 +3504,18 @@ XCompareVolID(a_obj1P, a_obj2P)
  *     As advertised.
  *------------------------------------------------------------------------*/
 
-static
-ListVolumes(as)
-     register struct cmd_syndesc *as;
+static int
+ListVolumes(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 apart, int32list, fast;
     afs_int32 aserver, code;
-    volintInfo *pntr, *oldpntr;
+    volintInfo *pntr;
+    volintInfo *oldpntr = NULL;
     afs_int32 count;
     int i;
     char *base;
-    volintXInfo *xInfoP, *origxInfoP;  /*Ptr to current/orig extended vol info */
+    volintXInfo *xInfoP;
+    volintXInfo *origxInfoP = NULL; /*Ptr to current/orig extended vol info */
     int wantExtendedInfo;      /*Do we want extended vol info? */
 
     char pname[10];
@@ -3687,9 +3662,8 @@ ListVolumes(as)
     return 0;
 }
 
-static
-SyncVldb(as)
-     register struct cmd_syndesc *as;
+static int
+SyncVldb(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 pnum = 0, code;  /* part name */
     char part[10];
@@ -3731,6 +3705,10 @@ SyncVldb(as)
        }
     }
 
+    if (as->parms[3].items) {
+       flags |= 2; /* don't update */
+    }
+
     if (as->parms[2].items) {
        /* Synchronize an individual volume */
        volname = as->parms[2].items->data;
@@ -3757,7 +3735,7 @@ SyncVldb(as)
     if (tserver) {
        fprintf(STDOUT, " with state of server %s", as->parms[0].items->data);
     }
-    if (flags) {
+    if (flags & 1) {
        MapPartIdIntoName(pnum, part);
        fprintf(STDOUT, " partition %s\n", part);
     }
@@ -3766,10 +3744,8 @@ SyncVldb(as)
     return 0;
 }
 
-static
-SyncServer(as)
-     register struct cmd_syndesc *as;
-
+static int
+SyncServer(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 pnum, code;      /* part name */
     char part[10];
@@ -3803,12 +3779,15 @@ SyncServer(as)
         pnum = -1;
     }
 
+    if (as->parms[2].items) {
+       flags |= 2; /* don't update */
+    }
     code = UV_SyncServer(tserver, pnum, flags, 0 /*unused */ );
     if (code) {
        PrintDiagnostics("syncserv", code);
        exit(1);
     }
-    if (flags) {
+    if (flags & 1) {
        MapPartIdIntoName(pnum, part);
        fprintf(STDOUT, "Server %s partition %s synchronized with VLDB\n",
                as->parms[0].items->data, part);
@@ -3819,9 +3798,8 @@ SyncServer(as)
 
 }
 
-static
-VolumeInfoCmd(name)
-     char *name;
+static int
+VolumeInfoCmd(char *name)
 {
     struct nvldbentry entry;
     afs_int32 vcode;
@@ -3847,13 +3825,12 @@ VolumeInfoCmd(name)
     return 0;
 }
 
-static
-VolumeZap(as)
-     register struct cmd_syndesc *as;
-
+static int
+VolumeZap(register struct cmd_syndesc *as, void *arock)
 {
     struct nvldbentry entry;
-    afs_int32 volid, code, server, part, zapbackupid = 0, backupid = 0, err;
+    afs_uint32 volid, zapbackupid = 0, backupid = 0;
+    afs_int32 code, server, part, err;
 
     if (as->parms[3].items) {
        /* force flag is on, use the other version */
@@ -3934,10 +3911,8 @@ VolumeZap(as)
     return 0;
 }
 
-static
-VolserStatus(as)
-     register struct cmd_syndesc *as;
-
+static int
+VolserStatus(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 server, code;
     transDebugInfo *pntr, *oldpntr;
@@ -4027,9 +4002,8 @@ VolserStatus(as)
     return 0;
 }
 
-static
-RenameVolume(as)
-     register struct cmd_syndesc *as;
+static int
+RenameVolume(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 code1, code2, code;
     struct nvldbentry entry;
@@ -4088,9 +4062,9 @@ RenameVolume(as)
     return 0;
 }
 
-GetVolumeInfo(volid, server, part, voltype, rentry)
-     afs_int32 *server, volid, *part, *voltype;
-     register struct nvldbentry *rentry;
+int
+GetVolumeInfo(afs_uint32 volid, afs_int32 *server, afs_int32 *part, afs_int32 *voltype, 
+              struct nvldbentry *rentry)
 {
     afs_int32 vcode;
     int i, index = -1;
@@ -4148,13 +4122,11 @@ GetVolumeInfo(volid, server, part, voltype, rentry)
     return -1;
 }
 
-static
-DeleteEntry(as)
-     register struct cmd_syndesc *as;
-
+static int
+DeleteEntry(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 apart;
-    afs_int32 avolid;
+    afs_int32 apart = 0;
+    afs_uint32 avolid;
     afs_int32 vcode;
     struct VldbListByAttributes attributes;
     nbulkentries arrayEntries;
@@ -4327,8 +4299,7 @@ DeleteEntry(as)
 
 
 static int
-CompareVldbEntryByName(p1, p2)
-     char *p1, *p2;
+CompareVldbEntryByName(const void *p1, const void *p2)
 {
     struct nvldbentry *arg1, *arg2;
 
@@ -4338,8 +4309,7 @@ CompareVldbEntryByName(p1, p2)
 }
 
 /*
-static int CompareVldbEntry(p1,p2)
-char *p1,*p2;
+static int CompareVldbEntry(char *p1, char *p2)
 {
     struct nvldbentry *arg1,*arg2;
     int i;
@@ -4373,9 +4343,8 @@ char *p1,*p2;
 }
 
 */
-static
-ListVLDB(as)
-     struct cmd_syndesc *as;
+static int
+ListVLDB(struct cmd_syndesc *as, void *arock)
 {
     afs_int32 apart;
     afs_int32 aserver, code;
@@ -4383,7 +4352,9 @@ ListVLDB(as)
     struct VldbListByAttributes attributes;
     nbulkentries arrayEntries;
     struct nvldbentry *vllist, *tarray = 0, *ttarray;
-    afs_int32 centries, nentries = 0, tarraysize, parraysize;
+    afs_int32 centries, nentries = 0;
+    afs_int32 tarraysize = 0;
+    afs_int32 parraysize;
     int j;
     char pname[10];
     int quiet, sort, lock;
@@ -4544,11 +4515,11 @@ ListVLDB(as)
     return 0;
 }
 
-static
-BackSys(as)
-     register struct cmd_syndesc *as;
+static int
+BackSys(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 apart = 0, avolid;
+    afs_uint32 avolid;
+    afs_int32 apart = 0;
     afs_int32 aserver = 0, code, aserver1, apart1;
     afs_int32 vcode;
     struct VldbListByAttributes attributes;
@@ -4560,11 +4531,14 @@ BackSys(as)
     int seenprefix, seenxprefix, exclude, ex, exp, noaction;
     afs_int32 totalBack = 0;
     afs_int32 totalFail = 0;
-    int previdx = -1, error, same;
-    int comp = 0;
+    int previdx = -1;
+    int error;
+    int same = 0;
     struct cmd_item *ti;
+    int match = 0;
+#ifndef HAVE_POSIX_REGEX
     char *ccode;
-    int match;
+#endif
 
     memset(&attributes, 0, sizeof(struct VldbListByAttributes));
     attributes.Mask = 0;
@@ -4874,19 +4848,19 @@ BackSys(as)
     return 0;
 }
 
-static
-UnlockVLDB(as)
-     register struct cmd_syndesc *as;
+static int
+UnlockVLDB(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 apart;
-    afs_int32 aserver, code;
+    afs_int32 aserver = 0;
+    afs_int32 code;
     afs_int32 vcode;
     struct VldbListByAttributes attributes;
     nbulkentries arrayEntries;
     register struct nvldbentry *vllist;
     afs_int32 nentries;
     int j;
-    afs_int32 volid;
+    afs_uint32 volid;
     afs_int32 totalE;
     char pname[10];
 
@@ -5004,18 +4978,17 @@ PrintInt64Size(afs_uint64 in)
     return output;
 }
 
-static
-PartitionInfo(as)
-     register struct cmd_syndesc *as;
+static int
+PartitionInfo(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 apart;
     afs_int32 aserver, code;
     char pname[10];
-    struct diskPartition partition;
+    struct diskPartition64 partition;
     struct partList dummyPartList;
     int i, cnt;
     int printSummary=0, sumPartitions=0;
-    afs_uint64 sumFree, sumStorage, tmp;
+    afs_uint64 sumFree, sumStorage;
 
     ZeroInt64(sumFree);
     ZeroInt64(sumStorage);
@@ -5060,7 +5033,7 @@ PartitionInfo(as)
     for (i = 0; i < cnt; i++) {
        if (dummyPartList.partFlags[i] & PARTVALID) {
            MapPartIdIntoName(dummyPartList.partId[i], pname);
-           code = UV_PartitionInfo(aserver, pname, &partition);
+           code = UV_PartitionInfo64(aserver, pname, &partition);
            if (code) {
                fprintf(STDERR, "Could not get information on partition %s\n",
                        pname);
@@ -5068,13 +5041,11 @@ PartitionInfo(as)
                exit(1);
            }
            fprintf(STDOUT,
-                   "Free space on partition %s: %d K blocks out of total %d\n",
+                   "Free space on partition %s: %" AFS_INT64_FMT " K blocks out of total %" AFS_INT64_FMT "\n",
                    pname, partition.free, partition.minFree);
            sumPartitions++;
-            FillInt64(tmp,0,partition.free);
-            AddUInt64(sumFree,tmp,&sumFree);
-            FillInt64(tmp,0,partition.minFree);
-            AddUInt64(sumStorage,tmp,&sumStorage);
+            AddUInt64(sumFree,partition.free,&sumFree);
+            AddUInt64(sumStorage,partition.minFree,&sumStorage);
        }
     }
     if (printSummary) {
@@ -5089,10 +5060,8 @@ PartitionInfo(as)
     return 0;
 }
 
-static
-ChangeAddr(as)
-     register struct cmd_syndesc *as;
-
+static int
+ChangeAddr(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 ip1, ip2, vcode;
     int remove = 0;
@@ -5155,7 +5124,7 @@ ChangeAddr(as)
 
 static void
 print_addrs(const bulkaddrs * addrs, const afsUUID * m_uuid, int nentries,
-           int print, int noresolve)
+           int print)
 {
     afs_int32 vcode;
     afs_int32 i, j;
@@ -5193,7 +5162,7 @@ print_addrs(const bulkaddrs * addrs, const afsUUID * m_uuid, int nentries,
                m_addrs.bulkaddrs_len = 0;
                vcode =
                    ubik_VL_GetAddrsU(cstruct, 0, &m_attrs, &m_uuid,
-                                     &vlcb, &m_nentries, &m_addrs);
+                                     (afs_int32 *)&vlcb, &m_nentries, &m_addrs);
                if (vcode) {
                    fprintf(STDERR,
                            "vos: could not list the multi-homed server addresses\n");
@@ -5239,12 +5208,11 @@ print_addrs(const bulkaddrs * addrs, const afsUUID * m_uuid, int nentries,
     return;
 }
 
-static
-ListAddrs(as)
-     register struct cmd_syndesc *as;
+static int
+ListAddrs(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 vcode;
-    afs_int32 i, noresolve = 0, printuuid = 0;
+    afs_int32 i, printuuid = 0;
     struct VLCallBack vlcb;
     afs_int32 nentries;
     bulkaddrs m_addrs;
@@ -5282,9 +5250,6 @@ ListAddrs(as)
        m_attrs.ipaddr = ntohl(saddr);
     }
     if (as->parms[2].items) {
-       noresolve = 1;
-    }
-    if (as->parms[3].items) {
        printuuid = 1;
     }
 
@@ -5337,7 +5302,7 @@ ListAddrs(as)
            return (vcode);
        }
 
-       print_addrs(&m_addrs, &m_uuid, m_nentries, printuuid, noresolve);
+       print_addrs(&m_addrs, &m_uuid, m_nentries, printuuid);
        i++;
 
        if ((as->parms[1].items) || (as->parms[0].items) || (i > nentries))
@@ -5347,12 +5312,11 @@ ListAddrs(as)
     return 0;
 }
 
-static
-LockEntry(as)
-     register struct cmd_syndesc *as;
-
+static int
+LockEntry(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, vcode, err;
+    afs_uint32 avolid;
+    afs_int32 vcode, err;
 
     avolid = vsu_GetVolumeID(as->parms[0].items->data, cstruct, &err);
     if (avolid == 0) {
@@ -5375,21 +5339,20 @@ LockEntry(as)
     return 0;
 }
 
-static
-ConvertRO(as)
-     register struct cmd_syndesc *as;
-
+static int
+ConvertRO(register struct cmd_syndesc *as, void *arock)
 {
     afs_int32 partition = -1;
-    afs_int32 server, volid, code, i, same;
+    afs_uint32 volid;
+    afs_int32 server, code, i, same;
     struct nvldbentry entry, storeEntry;
     afs_int32 vcode;
-    afs_int32 rwindex;
+    afs_int32 rwindex = 0;
     afs_int32 rwserver = 0;
-    afs_int32 rwpartition;
-    afs_int32 roindex;
+    afs_int32 rwpartition = 0;
+    afs_int32 roindex = 0;
     afs_int32 roserver = 0;
-    afs_int32 ropartition;
+    afs_int32 ropartition = 0;
     int force = 0;
     struct rx_connection *aconn;
     char c, dc;
@@ -5541,11 +5504,11 @@ ConvertRO(as)
     return code;
 }
 
-static
-Sizes(as)
-     register struct cmd_syndesc *as;
+static int
+Sizes(register struct cmd_syndesc *as, void *arock)
 {
-    afs_int32 avolid, aserver, apart, voltype, fromdate = 0, code, err, i;
+    afs_uint32 avolid;
+    afs_int32 aserver, apart, voltype, fromdate = 0, code, err, i;
     struct nvldbentry entry;
     volintSize vol_size;
 
@@ -5626,9 +5589,8 @@ Sizes(as)
     return 0;
 }
 
-PrintDiagnostics(astring, acode)
-     char *astring;
-     afs_int32 acode;
+int
+PrintDiagnostics(char *astring, afs_int32 acode)
 {
     if (acode == EACCES) {
        fprintf(STDERR,
@@ -5642,10 +5604,8 @@ PrintDiagnostics(astring, acode)
 }
 
 
-static
-MyBeforeProc(as, arock)
-     struct cmd_syndesc *as;
-     char *arock;
+static int
+MyBeforeProc(struct cmd_syndesc *as, void *arock)
 {
     register char *tcell;
     register afs_int32 code;
@@ -5675,11 +5635,15 @@ MyBeforeProc(as, arock)
        verbose = 1;
     else
        verbose = 0;
+    if (as->parms[17].items)   /* -noresolve flag set */
+       noresolve = 1;
+    else
+       noresolve = 0;
     return 0;
 }
 
 int
-osi_audit()
+osi_audit(void)
 {
 /* this sucks but it works for now.
 */
@@ -5688,9 +5652,8 @@ osi_audit()
 
 #include "AFS_component_version_number.c"
 
-main(argc, argv)
-     int argc;
-     char **argv;
+int
+main(int argc, char **argv)
 {
     register afs_int32 code;
 
@@ -5715,7 +5678,7 @@ main(argc, argv)
 
     cmd_SetBeforeProc(MyBeforeProc, NULL);
 
-    ts = cmd_CreateSyntax("create", CreateVolume, 0, "create a new volume");
+    ts = cmd_CreateSyntax("create", CreateVolume, NULL, "create a new volume");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
     cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "volume name");
@@ -5726,14 +5689,14 @@ main(argc, argv)
 #endif
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("remove", DeleteVolume, 0, "delete a volume");
+    ts = cmd_CreateSyntax("remove", DeleteVolume, NULL, "delete a volume");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
 
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("move", MoveVolume, 0, "move a volume");
+    ts = cmd_CreateSyntax("move", MoveVolume, NULL, "move a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
     cmd_AddParm(ts, "-frompartition", CMD_SINGLE, 0,
@@ -5746,7 +5709,7 @@ main(argc, argv)
                "copy live volume without cloning");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("copy", CopyVolume, 0, "copy a volume");
+    ts = cmd_CreateSyntax("copy", CopyVolume, NULL, "copy a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID on source");
     cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
     cmd_AddParm(ts, "-frompartition", CMD_SINGLE, 0,
@@ -5764,7 +5727,7 @@ main(argc, argv)
                "copy live volume without cloning");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("shadow", ShadowVolume, 0,
+    ts = cmd_CreateSyntax("shadow", ShadowVolume, NULL,
                          "make or update a shadow volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID on source");
     cmd_AddParm(ts, "-fromserver", CMD_SINGLE, 0, "machine name on source");
@@ -5788,12 +5751,12 @@ main(argc, argv)
                "do incremental update if target exists");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("backup", BackupVolume, 0,
+    ts = cmd_CreateSyntax("backup", BackupVolume, NULL,
                          "make backup of a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("clone", CloneVolume, 0,
+    ts = cmd_CreateSyntax("clone", CloneVolume, NULL,
                          "make clone of a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "server");
@@ -5808,13 +5771,13 @@ main(argc, argv)
                "make clone volume read-only, not readwrite");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("release", ReleaseVolume, 0, "release a volume");
+    ts = cmd_CreateSyntax("release", ReleaseVolume, NULL, "release a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL,
                "force a complete release");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("dump", DumpVolume, 0, "dump a volume");
+    ts = cmd_CreateSyntax("dump", DumpVolumeCmd, NULL, "dump a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-time", CMD_SINGLE, CMD_OPTIONAL, "dump from time");
     cmd_AddParm(ts, "-file", CMD_SINGLE, CMD_OPTIONAL, "dump file");
@@ -5822,9 +5785,12 @@ main(argc, argv)
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition");
     cmd_AddParm(ts, "-clone", CMD_FLAG, CMD_OPTIONAL,
                "dump a clone of the volume");
+    cmd_AddParm(ts, "-omitdirs", CMD_FLAG, CMD_OPTIONAL,
+               "omit unchanged directories from an incremental dump");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("restore", RestoreVolume, 0, "restore a volume");
+    ts = cmd_CreateSyntax("restore", RestoreVolumeCmd, NULL,
+                         "restore a volume");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
     cmd_AddParm(ts, "-name", CMD_SINGLE, 0, "name of volume to be restored");
@@ -5840,14 +5806,16 @@ main(argc, argv)
                "dump | keep | new");
     cmd_AddParm(ts, "-lastupdate", CMD_SINGLE, CMD_OPTIONAL,
                "dump | keep | new");
+    cmd_AddParm(ts, "-nodelete", CMD_FLAG, CMD_OPTIONAL,
+               "do not delete old site when restoring to a new site");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("unlock", LockReleaseCmd, 0,
+    ts = cmd_CreateSyntax("unlock", LockReleaseCmd, NULL,
                          "release lock on VLDB entry for a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("changeloc", ChangeLocation, 0,
+    ts = cmd_CreateSyntax("changeloc", ChangeLocation, NULL,
                          "change an RW volume's location in the VLDB");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0,
                "machine name for new location");
@@ -5856,25 +5824,26 @@ main(argc, argv)
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("addsite", AddSite, 0, "add a replication site");
+    ts = cmd_CreateSyntax("addsite", AddSite, NULL, "add a replication site");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name for new site");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0,
                "partition name for new site");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
+    cmd_AddParm(ts, "-valid", CMD_FLAG, CMD_OPTIONAL, "publish as an up-to-date site in VLDB");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("remsite", RemoveSite, 0,
+    ts = cmd_CreateSyntax("remsite", RemoveSite, NULL,
                          "remove a replication site");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("listpart", ListPartitions, 0, "list partitions");
+    ts = cmd_CreateSyntax("listpart", ListPartitions, NULL, "list partitions");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("listvol", ListVolumes, 0,
+    ts = cmd_CreateSyntax("listvol", ListVolumes, NULL,
                          "list volumes on server (bypass VLDB)");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
@@ -5891,20 +5860,22 @@ main(argc, argv)
 #endif /* FULL_LISTVOL_SWITCH */
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("syncvldb", SyncVldb, 0,
+    ts = cmd_CreateSyntax("syncvldb", SyncVldb, NULL,
                          "synchronize VLDB with server");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
     cmd_AddParm(ts, "-volume", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
+    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "report without updating");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("syncserv", SyncServer, 0,
+    ts = cmd_CreateSyntax("syncserv", SyncServer, NULL,
                          "synchronize server with VLDB");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
+    cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "report without updating");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("examine", ExamineVolume, 0,
+    ts = cmd_CreateSyntax("examine", ExamineVolume, NULL,
                          "everything about the volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-extended", CMD_FLAG, CMD_OPTIONAL,
@@ -5916,7 +5887,7 @@ main(argc, argv)
     COMMONPARMS;
     cmd_CreateAlias(ts, "volinfo");
 
-    ts = cmd_CreateSyntax("setfields", SetFields, 0,
+    ts = cmd_CreateSyntax("setfields", SetFields, NULL,
                          "change volume info fields");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-maxquota", CMD_SINGLE, CMD_OPTIONAL, "quota (KB)");
@@ -5924,7 +5895,7 @@ main(argc, argv)
     cmd_AddParm(ts, "-clearVolUpCounter", CMD_FLAG, CMD_OPTIONAL, "clear volUpdateCounter");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("offline", volOffline, 0, (char *)CMD_HIDDEN);
+    ts = cmd_CreateSyntax("offline", volOffline, NULL, "force the volume status to offline");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "server name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
@@ -5932,13 +5903,13 @@ main(argc, argv)
     cmd_AddParm(ts, "-busy", CMD_FLAG, CMD_OPTIONAL, "busy volume");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("online", volOnline, 0, (char *)CMD_HIDDEN);
+    ts = cmd_CreateSyntax("online", volOnline, NULL, "force the volume status to online");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "server name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("zap", VolumeZap, 0,
+    ts = cmd_CreateSyntax("zap", VolumeZap, NULL,
                          "delete the volume, don't bother with VLDB");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
@@ -5949,17 +5920,17 @@ main(argc, argv)
                "also delete backup volume if one is found");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("status", VolserStatus, 0,
+    ts = cmd_CreateSyntax("status", VolserStatus, NULL,
                          "report on volser status");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("rename", RenameVolume, 0, "rename a volume");
+    ts = cmd_CreateSyntax("rename", RenameVolume, NULL, "rename a volume");
     cmd_AddParm(ts, "-oldname", CMD_SINGLE, 0, "old volume name ");
     cmd_AddParm(ts, "-newname", CMD_SINGLE, 0, "new volume name ");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("listvldb", ListVLDB, 0,
+    ts = cmd_CreateSyntax("listvldb", ListVLDB, NULL,
                          "list volumes in the VLDB");
     cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume name or ID");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
@@ -5971,7 +5942,7 @@ main(argc, argv)
                "do not alphabetically sort the volume names");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("backupsys", BackSys, 0, "en masse backups");
+    ts = cmd_CreateSyntax("backupsys", BackSys, NULL, "en masse backups");
     cmd_AddParm(ts, "-prefix", CMD_LIST, CMD_OPTIONAL,
                "common prefix on volume(s)");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
@@ -5983,18 +5954,18 @@ main(argc, argv)
     cmd_AddParm(ts, "-dryrun", CMD_FLAG, CMD_OPTIONAL, "no action");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("delentry", DeleteEntry, 0,
+    ts = cmd_CreateSyntax("delentry", DeleteEntry, NULL,
                          "delete VLDB entry for a volume");
     cmd_AddParm(ts, "-id", CMD_LIST, CMD_OPTIONAL, "volume name or ID");
     cmd_AddParm(ts, "-prefix", CMD_SINGLE, CMD_OPTIONAL,
                "prefix of the volume whose VLDB entry is to be deleted");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
-    cmd_AddParm(ts, "-noexecute", CMD_FLAG, CMD_OPTIONAL | CMD_HIDE,
+    cmd_AddParm(ts, "-noexecute", CMD_FLAG, CMD_OPTIONAL,
                "no execute");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("partinfo", PartitionInfo, 0,
+    ts = cmd_CreateSyntax("partinfo", PartitionInfo, NULL,
                          "list partition information");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
@@ -6002,18 +5973,18 @@ main(argc, argv)
                "print storage summary");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("unlockvldb", UnlockVLDB, 0,
+    ts = cmd_CreateSyntax("unlockvldb", UnlockVLDB, NULL,
                          "unlock all the locked entries in the VLDB");
     cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_OPTIONAL, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("lock", LockEntry, 0,
+    ts = cmd_CreateSyntax("lock", LockEntry, NULL,
                          "lock VLDB entry for a volume");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("changeaddr", ChangeAddr, 0,
+    ts = cmd_CreateSyntax("changeaddr", ChangeAddr, NULL,
                          "change the IP address of a file server");
     cmd_AddParm(ts, "-oldaddr", CMD_SINGLE, 0, "original IP address");
     cmd_AddParm(ts, "-newaddr", CMD_SINGLE, CMD_OPTIONAL, "new IP address");
@@ -6021,17 +5992,15 @@ main(argc, argv)
                "remove the IP address from the VLDB");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("listaddrs", ListAddrs, 0,
+    ts = cmd_CreateSyntax("listaddrs", ListAddrs, NULL,
                          "list the IP address of all file servers registered in the VLDB");
     cmd_AddParm(ts, "-uuid", CMD_SINGLE, CMD_OPTIONAL, "uuid of server");
     cmd_AddParm(ts, "-host", CMD_SINGLE, CMD_OPTIONAL, "address of host");
-    cmd_AddParm(ts, "-noresolve", CMD_FLAG, CMD_OPTIONAL,
-               "don't resolve addresses");
     cmd_AddParm(ts, "-printuuid", CMD_FLAG, CMD_OPTIONAL,
                "print uuid of hosts");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("convertROtoRW", ConvertRO, 0,
+    ts = cmd_CreateSyntax("convertROtoRW", ConvertRO, NULL,
                          "convert a RO volume into a RW volume (after loss of old RW volume)");
     cmd_AddParm(ts, "-server", CMD_SINGLE, 0, "machine name");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, 0, "partition name");
@@ -6039,7 +6008,7 @@ main(argc, argv)
     cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "don't ask");
     COMMONPARMS;
 
-    ts = cmd_CreateSyntax("size", Sizes, 0,
+    ts = cmd_CreateSyntax("size", Sizes, NULL,
                          "obtain various sizes of the volume.");
     cmd_AddParm(ts, "-id", CMD_SINGLE, 0, "volume name or ID");
     cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_OPTIONAL, "partition name");