[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH] memory: fix remote protocol compilation



'make -C src rpcgen' is supposed to be idempotent.  But commit
f928f43b7b mistakently manually edited a generated file rather
than fixing the upstream file.

* src/remote/remote_protocol.x (remote_memory_param_value): Use
correct spelling of enum values.
* src/remote/remote_protocol.c: Regenerate.
---

I'm pushing this under the obvious rule, as without it, I cannot
rebase my vcpus patch series.

Meanwhile, I'd like to figure out if 'make syntax-check' could
automatically run 'make -C src rpcgen' if the right rpcgen is
detected, and thus prevent us from repeating this problem.

 src/remote/remote_protocol.c |   47 +++++++++++++++++++++--------------------
 src/remote/remote_protocol.x |   12 +++++-----
 2 files changed, 30 insertions(+), 29 deletions(-)

diff --git a/src/remote/remote_protocol.c b/src/remote/remote_protocol.c
index 6a74574..5c55713 100644
--- a/src/remote/remote_protocol.c
+++ b/src/remote/remote_protocol.c
@@ -308,38 +308,39 @@ xdr_remote_sched_param (XDR *xdrs, remote_sched_param *objp)
 }

 bool_t
-xdr_remote_memory_param_value(XDR * xdrs, remote_memory_param_value * objp)
+xdr_remote_memory_param_value (XDR *xdrs, remote_memory_param_value *objp)
 {

-    if (!xdr_int(xdrs, &objp->type))
-        return FALSE;
-    switch (objp->type) {
+         if (!xdr_int (xdrs, &objp->type))
+                 return FALSE;
+        switch (objp->type) {
         case VIR_DOMAIN_MEMORY_PARAM_INT:
-            return FALSE;
+                         return FALSE;
+                break;
         case VIR_DOMAIN_MEMORY_PARAM_UINT:
-            if (!xdr_u_int(xdrs, &objp->remote_memory_param_value_u.ui))
-                return FALSE;
-            break;
+                 if (!xdr_u_int (xdrs, &objp->remote_memory_param_value_u.ui))
+                         return FALSE;
+                break;
         case VIR_DOMAIN_MEMORY_PARAM_LLONG:
-            if (!xdr_int64_t(xdrs, &objp->remote_memory_param_value_u.l))
-                return FALSE;
-            break;
+                 if (!xdr_int64_t (xdrs, &objp->remote_memory_param_value_u.l))
+                         return FALSE;
+                break;
         case VIR_DOMAIN_MEMORY_PARAM_ULLONG:
-            if (!xdr_uint64_t(xdrs, &objp->remote_memory_param_value_u.ul))
-                return FALSE;
-            break;
+                 if (!xdr_uint64_t (xdrs, &objp->remote_memory_param_value_u.ul))
+                         return FALSE;
+                break;
         case VIR_DOMAIN_MEMORY_PARAM_DOUBLE:
-            if (!xdr_double(xdrs, &objp->remote_memory_param_value_u.d))
-                return FALSE;
-            break;
+                 if (!xdr_double (xdrs, &objp->remote_memory_param_value_u.d))
+                         return FALSE;
+                break;
         case VIR_DOMAIN_MEMORY_PARAM_BOOLEAN:
-            if (!xdr_int(xdrs, &objp->remote_memory_param_value_u.b))
-                return FALSE;
-            break;
+                 if (!xdr_int (xdrs, &objp->remote_memory_param_value_u.b))
+                         return FALSE;
+                break;
         default:
-            return FALSE;
-    }
-    return TRUE;
+                return FALSE;
+        }
+        return TRUE;
 }

 bool_t
diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x
index f5dcb5c..e80fb5f 100644
--- a/src/remote/remote_protocol.x
+++ b/src/remote/remote_protocol.x
@@ -317,17 +317,17 @@ struct remote_sched_param {
 };

 union remote_memory_param_value switch (int type) {
- case VIR_DOMAIN_MEMORY_FIELD_INT:
+ case VIR_DOMAIN_MEMORY_PARAM_INT:
      int i;
- case VIR_DOMAIN_MEMORY_FIELD_UINT:
+ case VIR_DOMAIN_MEMORY_PARAM_UINT:
      unsigned int ui;
- case VIR_DOMAIN_MEMORY_FIELD_LLONG:
+ case VIR_DOMAIN_MEMORY_PARAM_LLONG:
      hyper l;
- case VIR_DOMAIN_MEMORY_FIELD_ULLONG:
+ case VIR_DOMAIN_MEMORY_PARAM_ULLONG:
      unsigned hyper ul;
- case VIR_DOMAIN_MEMORY_FIELD_DOUBLE:
+ case VIR_DOMAIN_MEMORY_PARAM_DOUBLE:
      double d;
- case VIR_DOMAIN_MEMORY_FIELD_BOOLEAN:
+ case VIR_DOMAIN_MEMORY_PARAM_BOOLEAN:
      int b;
 };

-- 
1.7.2.3


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]