提交 450cbebe 编写于 作者: E Eric Blake

memory: fix remote protocol compilation

'make -C src rpcgen' is supposed to be idempotent.  But commit
f928f43b 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.
上级 f98a6cd6
...@@ -308,38 +308,39 @@ xdr_remote_sched_param (XDR *xdrs, remote_sched_param *objp) ...@@ -308,38 +308,39 @@ xdr_remote_sched_param (XDR *xdrs, remote_sched_param *objp)
} }
bool_t 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)) if (!xdr_int (xdrs, &objp->type))
return FALSE; return FALSE;
switch (objp->type) { switch (objp->type) {
case VIR_DOMAIN_MEMORY_PARAM_INT: case VIR_DOMAIN_MEMORY_PARAM_INT:
return FALSE; return FALSE;
break;
case VIR_DOMAIN_MEMORY_PARAM_UINT: case VIR_DOMAIN_MEMORY_PARAM_UINT:
if (!xdr_u_int(xdrs, &objp->remote_memory_param_value_u.ui)) if (!xdr_u_int (xdrs, &objp->remote_memory_param_value_u.ui))
return FALSE; return FALSE;
break; break;
case VIR_DOMAIN_MEMORY_PARAM_LLONG: case VIR_DOMAIN_MEMORY_PARAM_LLONG:
if (!xdr_int64_t(xdrs, &objp->remote_memory_param_value_u.l)) if (!xdr_int64_t (xdrs, &objp->remote_memory_param_value_u.l))
return FALSE; return FALSE;
break; break;
case VIR_DOMAIN_MEMORY_PARAM_ULLONG: case VIR_DOMAIN_MEMORY_PARAM_ULLONG:
if (!xdr_uint64_t(xdrs, &objp->remote_memory_param_value_u.ul)) if (!xdr_uint64_t (xdrs, &objp->remote_memory_param_value_u.ul))
return FALSE; return FALSE;
break; break;
case VIR_DOMAIN_MEMORY_PARAM_DOUBLE: case VIR_DOMAIN_MEMORY_PARAM_DOUBLE:
if (!xdr_double(xdrs, &objp->remote_memory_param_value_u.d)) if (!xdr_double (xdrs, &objp->remote_memory_param_value_u.d))
return FALSE; return FALSE;
break; break;
case VIR_DOMAIN_MEMORY_PARAM_BOOLEAN: case VIR_DOMAIN_MEMORY_PARAM_BOOLEAN:
if (!xdr_int(xdrs, &objp->remote_memory_param_value_u.b)) if (!xdr_int (xdrs, &objp->remote_memory_param_value_u.b))
return FALSE; return FALSE;
break; break;
default: default:
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
} }
bool_t bool_t
......
...@@ -317,17 +317,17 @@ struct remote_sched_param { ...@@ -317,17 +317,17 @@ struct remote_sched_param {
}; };
union remote_memory_param_value switch (int type) { union remote_memory_param_value switch (int type) {
case VIR_DOMAIN_MEMORY_FIELD_INT: case VIR_DOMAIN_MEMORY_PARAM_INT:
int i; int i;
case VIR_DOMAIN_MEMORY_FIELD_UINT: case VIR_DOMAIN_MEMORY_PARAM_UINT:
unsigned int ui; unsigned int ui;
case VIR_DOMAIN_MEMORY_FIELD_LLONG: case VIR_DOMAIN_MEMORY_PARAM_LLONG:
hyper l; hyper l;
case VIR_DOMAIN_MEMORY_FIELD_ULLONG: case VIR_DOMAIN_MEMORY_PARAM_ULLONG:
unsigned hyper ul; unsigned hyper ul;
case VIR_DOMAIN_MEMORY_FIELD_DOUBLE: case VIR_DOMAIN_MEMORY_PARAM_DOUBLE:
double d; double d;
case VIR_DOMAIN_MEMORY_FIELD_BOOLEAN: case VIR_DOMAIN_MEMORY_PARAM_BOOLEAN:
int b; int b;
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册