]> xenbits.xensource.com Git - libvirt.git/commitdiff
remote: Rename 'nameslen' to the common 'maxnames'
authorMatthias Bolte <matthias.bolte@googlemail.com>
Fri, 22 Apr 2011 20:45:02 +0000 (22:45 +0200)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Fri, 6 May 2011 18:08:25 +0000 (20:08 +0200)
Avoids special case handling in the remote generator.

daemon/remote.c
src/remote/remote_driver.c
src/remote/remote_protocol.c
src/remote/remote_protocol.h
src/remote/remote_protocol.x
src/remote_protocol-structs

index 7cd4a438d64070c4c8ec8d6bae60e43321d9b7ac..909b6c065f83f58d490ec617adc88cb35ceac421 100644 (file)
@@ -3796,9 +3796,9 @@ remoteDispatchDomainSnapshotListNames(struct qemud_server *server ATTRIBUTE_UNUS
         goto cleanup;
     }
 
-    if (args->nameslen > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX) {
+    if (args->maxnames > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX) {
         virNetError(VIR_ERR_INTERNAL_ERROR, "%s",
-                    _("nameslen > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX"));
+                    _("maxnames > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX"));
         goto cleanup;
     }
 
@@ -3806,14 +3806,14 @@ remoteDispatchDomainSnapshotListNames(struct qemud_server *server ATTRIBUTE_UNUS
         goto cleanup;
 
     /* Allocate return buffer. */
-    if (VIR_ALLOC_N(ret->names.names_val, args->nameslen) < 0) {
+    if (VIR_ALLOC_N(ret->names.names_val, args->maxnames) < 0) {
         virReportOOMError();
         goto cleanup;
     }
 
     len = virDomainSnapshotListNames(dom,
                                      ret->names.names_val,
-                                     args->nameslen,
+                                     args->maxnames,
                                      args->flags);
     if (len < 0)
         goto cleanup;
index c027e6b299b8a536ee4e86725303d41288635208..105f73bb07a6f05acf6b9acba1f37db8118ecf96 100644 (file)
@@ -9312,7 +9312,7 @@ done:
 
 static int
 remoteDomainSnapshotListNames (virDomainPtr domain, char **const names,
-                               int nameslen, unsigned int flags)
+                               int maxnames, unsigned int flags)
 {
     int rv = -1;
     int i;
@@ -9322,15 +9322,15 @@ remoteDomainSnapshotListNames (virDomainPtr domain, char **const names,
 
     remoteDriverLock(priv);
 
-    if (nameslen > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX) {
+    if (maxnames > REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX) {
         remoteError(VIR_ERR_RPC,
                     _("too many remote domain snapshot names: %d > %d"),
-                    nameslen, REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX);
+                    maxnames, REMOTE_DOMAIN_SNAPSHOT_LIST_NAMES_MAX);
         goto done;
     }
 
     make_nonnull_domain(&args.dom, domain);
-    args.nameslen = nameslen;
+    args.maxnames = maxnames;
     args.flags = flags;
 
     memset (&ret, 0, sizeof ret);
@@ -9339,10 +9339,10 @@ remoteDomainSnapshotListNames (virDomainPtr domain, char **const names,
               (xdrproc_t) xdr_remote_domain_snapshot_list_names_ret, (char *) &ret) == -1)
         goto done;
 
-    if (ret.names.names_len > nameslen) {
+    if (ret.names.names_len > maxnames) {
         remoteError(VIR_ERR_RPC,
                     _("too many remote domain snapshots: %d > %d"),
-                    ret.names.names_len, nameslen);
+                    ret.names.names_len, maxnames);
         goto cleanup;
     }
 
index e85f607c3b86a33ba90bfcbe49f63c625b274820..1bdd79ed441f7f28e66701c2033c554252f0ee4e 100644 (file)
@@ -3756,7 +3756,7 @@ xdr_remote_domain_snapshot_list_names_args (XDR *xdrs, remote_domain_snapshot_li
 
          if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
                  return FALSE;
-         if (!xdr_int (xdrs, &objp->nameslen))
+         if (!xdr_int (xdrs, &objp->maxnames))
                  return FALSE;
          if (!xdr_int (xdrs, &objp->flags))
                  return FALSE;
index 82d098167b0124ff0768c7a662ea76853c796765..ff6903c789e63eda2f86360ae0e5a2d4a5ae5db1 100644 (file)
@@ -2119,7 +2119,7 @@ typedef struct remote_domain_snapshot_num_ret remote_domain_snapshot_num_ret;
 
 struct remote_domain_snapshot_list_names_args {
         remote_nonnull_domain dom;
-        int nameslen;
+        int maxnames;
         int flags;
 };
 typedef struct remote_domain_snapshot_list_names_args remote_domain_snapshot_list_names_args;
index 0422c7b6ca89c9b4ed4059b7c6a86fda4e5bf240..0858096b9670e39361037af83eec5fd56377a8a1 100644 (file)
@@ -1874,7 +1874,7 @@ struct remote_domain_snapshot_num_ret {
 
 struct remote_domain_snapshot_list_names_args {
     remote_nonnull_domain dom;
-    int nameslen;
+    int maxnames;
     int flags;
 };
 
index 73c720216f17542eb56f8db4484c02c644ac352e..d433f6bc404665f153355ad6919115a32115c533 100644 (file)
@@ -1371,7 +1371,7 @@ struct remote_domain_snapshot_num_ret {
 };
 struct remote_domain_snapshot_list_names_args {
         remote_nonnull_domain      dom;
-        int                        nameslen;
+        int                        maxnames;
         int                        flags;
 };
 struct remote_domain_snapshot_list_names_ret {