vos-full-listvol-irix-20040101
[openafs.git] / src / volser / vos.c
index a50d8f6..93a0dd5 100644 (file)
@@ -23,6 +23,7 @@ RCSID
 #include <sys/file.h>
 #include <netdb.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #endif
 #include <sys/stat.h>
 #ifdef AFS_AIX_ENV
@@ -76,9 +77,6 @@ struct tqHead {
     struct tqElem *next;
 };
 
-
-struct hostent *hostutil_GetHostByName(register char *ahost);
-
 #define COMMONPARMS     cmd_Seek(ts, 12);\
 cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");\
 cmd_AddParm(ts, "-noauth", CMD_FLAG, CMD_OPTIONAL, "don't authenticate");\
@@ -94,23 +92,6 @@ struct rx_connection *tconn;
 afs_int32 tserver;
 extern struct ubik_client *cstruct;
 const char *confdir;
-extern struct rx_connection *UV_Bind();
-extern int UV_SetSecurity();
-extern int UV_SetVolumeInfo();
-extern int vsu_SetCrypt();
-extern VL_SetLock();
-extern VL_ReleaseLock();
-extern VL_DeleteEntry();
-extern VL_ListEntry();
-extern VL_GetAddrs();
-extern VL_GetAddrsU();
-extern VL_ChangeAddr();
-
-extern int vsu_ExtractName();
-extern PrintError();
-extern void EnumerateEntry();
-extern void SubEnumerateEntry();
-
 
 static struct tqHead busyHead, notokHead;
 
@@ -1149,7 +1130,6 @@ VolumeStats(pntr, entry, server, part, voltype)
      afs_int32 server, part;
 {
     int totalOK, totalNotOK, totalBusy;
-    afs_int32 vcode, vcode2;
 
     DisplayFormat(pntr, server, part, &totalOK, &totalNotOK, &totalBusy, 0, 1,
                  1);
@@ -2084,9 +2064,6 @@ BackupVolume(as)
 
     afs_int32 buvolid, buserver, bupart, butype;
     struct nvldbentry buentry;
-    struct rx_connection *conn;
-    volEntries volInfo;
-    struct nvldbentry store;
 
     avolid = vsu_GetVolumeID(as->parms[0].items->data, cstruct, &err);
     if (avolid == 0) {
@@ -3452,6 +3429,10 @@ GetVolumeInfo(volid, server, part, voltype, rentry)
        *part = rentry->serverPartition[index];
        return 0;
     }
+    fprintf(STDERR,
+            "unexpected volume type for volume %lu\n",
+            (unsigned long)volid);
+    return -1;
 }
 
 static
@@ -3868,7 +3849,6 @@ BackSys(as)
     afs_int32 totalFail = 0;
     int previdx = -1, error, same;
     int comp = 0;
-    char compstr[50];
     struct cmd_item *ti;
     char *ccode;
     int match;
@@ -4416,7 +4396,6 @@ print_addrs(const bulkaddrs * addrs, const afsUUID * m_uuid, int nentries,
 {
     afs_int32 vcode;
     afs_int32 i, j;
-    struct VLCallBack unused;
     afs_int32 *addrp;
     bulkaddrs m_addrs;
     ListAddrByAttributes m_attrs;
@@ -4501,14 +4480,12 @@ ListAddrs(as)
      register struct cmd_syndesc *as;
 {
     afs_int32 vcode;
-    afs_int32 i, j, noresolve = 0, printuuid = 0;
-    struct VLCallBack unused;
-    afs_int32 nentries, *addrp;
-    bulkaddrs addrs, m_addrs;
+    afs_int32 i, noresolve = 0, printuuid = 0;
+    afs_int32 nentries;
+    bulkaddrs m_addrs;
     ListAddrByAttributes m_attrs;
     afsUUID m_uuid, askuuid;
-    afs_int32 m_unique, m_nentries, *m_addrp;
-    afs_int32 base, index;
+    afs_int32 m_unique, m_nentries;
 
     memset(&m_attrs, 0, sizeof(struct ListAddrByAttributes));
     m_attrs.Mask = VLADDR_INDEX;