Convert ubik_Call(x) calls to ubik_x()
[openafs.git] / src / bucoord / commands.c
index 324510d..244f4a7 100644 (file)
@@ -9,23 +9,15 @@
 
 #include <afsconfig.h>
 #include <afs/param.h>
+#include <afs/stds.h>
 
 #include <roken.h>
 
-#include <afs/stds.h>
-#if defined(AFS_LINUX24_ENV)
-#define _REGEX_RE_COMP
+#ifdef HAVE_POSIX_REGEX                /* use POSIX regexp library */
+#include <regex.h>
 #endif
-#include <sys/types.h>
+
 #include <afs/cmd.h>
-#ifdef AFS_NT40_ENV
-#include <winsock2.h>
-#else
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#endif
-#include <errno.h>
 #include <afs/com_err.h>
 #include <afs/afsutil.h>
 #include <afs/budb.h>
 #include <afs/vldbint.h>       /* PA */
 #include <afs/ktime.h>         /* PA */
 #include <ubik.h>
-#include <time.h>
 #include <lock.h>
-#include <afs/butc.h>
 #include <afs/tcdata.h>
 #include <afs/butx.h>
 #include <afs/vsutils_prototypes.h>
-#ifdef HAVE_POSIX_REGEX                /* use POSIX regexp library */
-#include <regex.h>
-#endif
+
 #include "bc.h"
 #include "error_macros.h"
 #include "bucoord_internal.h"
@@ -244,7 +232,7 @@ EvalVolumeSet2(struct bc_config *aconfig,
            bulkentries.nbulkentries_val = 0;
            nsi = -1;
            tcode =
-               ubik_Call(VL_ListAttributesN2, uclient, 0, &attributes,
+               ubik_VL_ListAttributesN2(uclient, 0, &attributes,
                          tve->name, si, &nentries, &bulkentries, &nsi);
            if (tcode)
                ERROR(tcode);
@@ -259,6 +247,11 @@ EvalVolumeSet2(struct bc_config *aconfig,
            if (nentries == 0)
                ERROR(RXGEN_OPCODE);    /* Use EvalVolumeSet1 */
 
+           if (nentries < 0)
+               nentries = 0;
+           if (nentries > bulkentries.nbulkentries_len)
+               nentries = bulkentries.nbulkentries_len;
+
            /* Step through each entry and add it to the list of volumes */
            entries = bulkentries.nbulkentries_val;
            for (e = 0; e < nentries; e++) {
@@ -456,8 +449,7 @@ EvalVolumeSet1(struct bc_config *aconfig,
      */
     for (index = 0; 1; index = next_index) {   /*w */
        memset(&entry, 0, sizeof(entry));
-       code = ubik_Call(VL_ListEntry,  /*Routine to invoke */
-                        uclient,       /*Ubik client structure */
+       code = ubik_VL_ListEntry(uclient,       /*Ubik client structure */
                         0,     /*Ubik flags */
                         index, /*Current index */
                         &count,        /*Ptr to working variable */
@@ -2278,7 +2270,7 @@ bc_dbVerifyCmd(struct cmd_syndesc *as, void *arock)
     detail = (as->parms[0].items ? 1 : 0);     /* print more details */
 
     code =
-       ubik_Call(BUDB_DbVerify, udbHandle.uh_client, 0, &status, &orphans,
+       ubik_BUDB_DbVerify(udbHandle.uh_client, 0, &status, &orphans,
                  &host);
 
     if (code) {
@@ -3093,7 +3085,7 @@ printRecentDumps(int ndumps)
        dl.budb_dumpList_val = 0;
 
        /* outline algorithm */
-       code = ubik_Call(BUDB_GetDumps, udbHandle.uh_client, 0, BUDB_MAJORVERSION, BUDB_OP_NPREVIOUS, "",       /* no name */
+       code = ubik_BUDB_GetDumps(udbHandle.uh_client, 0, BUDB_MAJORVERSION, BUDB_OP_NPREVIOUS, "",     /* no name */
                         0,     /* start */
                         ndumps,        /* end */
                         index, /* index */