mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
Solaris portability for RPC code data types
This commit is contained in:
parent
e730de6fd8
commit
9322b2e861
12
ChangeLog
12
ChangeLog
@ -1,3 +1,15 @@
|
|||||||
|
Wed Jan 28 21:33:11 GMT 2009 Daniel P.Berrange <berrange@redhat.com
|
||||||
|
|
||||||
|
Fix RPC portability to Solaris
|
||||||
|
* configure.in: s/RPCGEN/HAVE_RPCGEN/ for automake
|
||||||
|
conditional
|
||||||
|
* qemud/Makefile.am: Move rpcgen rules into explicit
|
||||||
|
rpcgen target to be manually invoked
|
||||||
|
* qemud/remote_protocol.c, qemud/remote_protocol.h: Update
|
||||||
|
with portability fixes
|
||||||
|
* qemud/rpcgen_fix.pl: Replace quad_t types / functions
|
||||||
|
with uint64_t ones and avoid GET_LONG in favour of GET_INT32
|
||||||
|
|
||||||
Wed Jan 28 15:45:11 +0100 2009 Jim Meyering <meyering@redhat.com>
|
Wed Jan 28 15:45:11 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||||
|
|
||||||
remote_internal.c: fix typo that would mistakenly report OOM
|
remote_internal.c: fix typo that would mistakenly report OOM
|
||||||
|
@ -92,9 +92,9 @@ AC_CHECK_LIB([intl],[gettext],[])
|
|||||||
|
|
||||||
dnl Do we have rpcgen?
|
dnl Do we have rpcgen?
|
||||||
AC_PATH_PROG([RPCGEN], [rpcgen], [no])
|
AC_PATH_PROG([RPCGEN], [rpcgen], [no])
|
||||||
AM_CONDITIONAL([RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"])
|
AM_CONDITIONAL([HAVE_RPCGEN], [test "x$ac_cv_path_RPCGEN" != "xno"])
|
||||||
dnl Is this GLIBC's buggy rpcgen?
|
dnl Is this GLIBC's buggy rpcgen?
|
||||||
AM_CONDITIONAL([GLIBC_RPCGEN],
|
AM_CONDITIONAL([HAVE_GLIBC_RPCGEN],
|
||||||
[test "x$ac_cv_path_RPCGEN" != "xno" &&
|
[test "x$ac_cv_path_RPCGEN" != "xno" &&
|
||||||
$ac_cv_path_RPCGEN -t </dev/null >/dev/null 2>&1])
|
$ac_cv_path_RPCGEN -t </dev/null >/dev/null 2>&1])
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
## Process this file with automake to produce Makefile.in
|
## Process this file with automake to produce Makefile.in
|
||||||
|
|
||||||
RPCGEN = $(RPCGEN)
|
|
||||||
|
|
||||||
DAEMON_SOURCES = \
|
DAEMON_SOURCES = \
|
||||||
event.c event.h \
|
event.c event.h \
|
||||||
qemud.c qemud.h \
|
qemud.c qemud.h \
|
||||||
@ -33,32 +31,34 @@ EXTRA_DIST = \
|
|||||||
$(AVAHI_SOURCES) \
|
$(AVAHI_SOURCES) \
|
||||||
$(DAEMON_SOURCES)
|
$(DAEMON_SOURCES)
|
||||||
|
|
||||||
if RPCGEN
|
if HAVE_RPCGEN
|
||||||
SUFFIXES = .x
|
#
|
||||||
# The subshell ensures that remote_protocol.c ends up
|
# Maintainer-only target for re-generating the derived .c/.h source
|
||||||
# including <config.h> before "remote_protocol.h".
|
# files, which are actually derived from the .x file.
|
||||||
.x.c:
|
#
|
||||||
rm -f $@ $@-t $@-t1 $@-t2
|
# For committing protocol changes to CVS, the GLIBC rpcgen *must*
|
||||||
$(RPCGEN) -c -o $@-t $<
|
# be used.
|
||||||
(echo '#include <config.h>'; cat $@-t) > $@-t1
|
#
|
||||||
if GLIBC_RPCGEN
|
# Support for non-GLIB rpcgen is here as a convenience for
|
||||||
perl -w rpcgen_fix.pl $@-t1 > $@-t2
|
# non-Linux people needing to test changes during dev.
|
||||||
rm $@-t1
|
#
|
||||||
chmod 444 $@-t2
|
rpcgen:
|
||||||
mv $@-t2 $@
|
rm -f rp.c-t rp.h-t rp.c-t1 rp.c-t2 rp.h-t1
|
||||||
|
$(RPCGEN) -h -o rp.h-t $(srcdir)/remote_protocol.x
|
||||||
|
$(RPCGEN) -c -o rp.c-t $(srcdir)/remote_protocol.x
|
||||||
|
if HAVE_GLIBC_RPCGEN
|
||||||
|
perl -w $(srcdir)/rpcgen_fix.pl rp.h-t > rp.h-t1
|
||||||
|
perl -w $(srcdir)/rpcgen_fix.pl rp.c-t > rp.c-t1
|
||||||
|
(echo '#include <config.h>'; cat rp.c-t1) > rp.c-t2
|
||||||
|
chmod 0444 rp.c-t2 rp.h-t1
|
||||||
|
mv -f rp.h-t1 $(srcdir)/remote_protocol.h
|
||||||
|
mv -f rp.c-t2 $(srcdir)/remote_protocol.c
|
||||||
|
rm -f rp.c-t rp.h-t rp.c-t1
|
||||||
else
|
else
|
||||||
chmod 444 $@-t1
|
chmod 0444 rp.c-t rp.h-t
|
||||||
mv $@-t1 $@
|
mv -f rp.h-t $(srcdir)/remote_protocol.h
|
||||||
|
mv -f rp.c-t $(srcdir)/remote_protocol.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.x.h:
|
|
||||||
rm -f $@ $@-t
|
|
||||||
$(RPCGEN) -h -o $@-t $<
|
|
||||||
if GLIBC_RPCGEN
|
|
||||||
perl -pi -e 's/\t/ /g' $@-t
|
|
||||||
endif
|
|
||||||
chmod 444 $@-t
|
|
||||||
mv $@-t $@
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
remote_protocol.c: remote_protocol.h
|
remote_protocol.c: remote_protocol.h
|
||||||
|
@ -183,7 +183,7 @@ xdr_remote_vcpu_info (XDR *xdrs, remote_vcpu_info *objp)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_int (xdrs, &objp->state))
|
if (!xdr_int (xdrs, &objp->state))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->cpu_time))
|
if (!xdr_uint64_t (xdrs, &objp->cpu_time))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_int (xdrs, &objp->cpu))
|
if (!xdr_int (xdrs, &objp->cpu))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -205,11 +205,11 @@ xdr_remote_sched_param_value (XDR *xdrs, remote_sched_param_value *objp)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_SCHED_FIELD_LLONG:
|
case VIR_DOMAIN_SCHED_FIELD_LLONG:
|
||||||
if (!xdr_quad_t (xdrs, &objp->remote_sched_param_value_u.l))
|
if (!xdr_int64_t (xdrs, &objp->remote_sched_param_value_u.l))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_SCHED_FIELD_ULLONG:
|
case VIR_DOMAIN_SCHED_FIELD_ULLONG:
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->remote_sched_param_value_u.ul))
|
if (!xdr_uint64_t (xdrs, &objp->remote_sched_param_value_u.ul))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
break;
|
break;
|
||||||
case VIR_DOMAIN_SCHED_FIELD_DOUBLE:
|
case VIR_DOMAIN_SCHED_FIELD_DOUBLE:
|
||||||
@ -279,7 +279,7 @@ bool_t
|
|||||||
xdr_remote_get_version_ret (XDR *xdrs, remote_get_version_ret *objp)
|
xdr_remote_get_version_ret (XDR *xdrs, remote_get_version_ret *objp)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!xdr_quad_t (xdrs, &objp->hv_ver))
|
if (!xdr_int64_t (xdrs, &objp->hv_ver))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -330,7 +330,7 @@ xdr_remote_node_get_info_ret (XDR *xdrs, remote_node_get_info_ret *objp)
|
|||||||
if (!xdr_vector (xdrs, (char *)objp->model, 32,
|
if (!xdr_vector (xdrs, (char *)objp->model, 32,
|
||||||
sizeof (char), (xdrproc_t) xdr_char))
|
sizeof (char), (xdrproc_t) xdr_char))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->memory))
|
if (!xdr_int64_t (xdrs, &objp->memory))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
buf = (int32_t*)XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
|
buf = (int32_t*)XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
@ -359,7 +359,7 @@ xdr_remote_node_get_info_ret (XDR *xdrs, remote_node_get_info_ret *objp)
|
|||||||
if (!xdr_vector (xdrs, (char *)objp->model, 32,
|
if (!xdr_vector (xdrs, (char *)objp->model, 32,
|
||||||
sizeof (char), (xdrproc_t) xdr_char))
|
sizeof (char), (xdrproc_t) xdr_char))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->memory))
|
if (!xdr_int64_t (xdrs, &objp->memory))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
buf = (int32_t*)XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
|
buf = (int32_t*)XDR_INLINE (xdrs, 6 * BYTES_PER_XDR_UNIT);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
@ -376,12 +376,12 @@ xdr_remote_node_get_info_ret (XDR *xdrs, remote_node_get_info_ret *objp)
|
|||||||
if (!xdr_int (xdrs, &objp->threads))
|
if (!xdr_int (xdrs, &objp->threads))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else {
|
} else {
|
||||||
objp->cpus = IXDR_GET_LONG(buf);
|
objp->cpus = IXDR_GET_INT32(buf);
|
||||||
objp->mhz = IXDR_GET_LONG(buf);
|
objp->mhz = IXDR_GET_INT32(buf);
|
||||||
objp->nodes = IXDR_GET_LONG(buf);
|
objp->nodes = IXDR_GET_INT32(buf);
|
||||||
objp->sockets = IXDR_GET_LONG(buf);
|
objp->sockets = IXDR_GET_INT32(buf);
|
||||||
objp->cores = IXDR_GET_LONG(buf);
|
objp->cores = IXDR_GET_INT32(buf);
|
||||||
objp->threads = IXDR_GET_LONG(buf);
|
objp->threads = IXDR_GET_INT32(buf);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -389,7 +389,7 @@ xdr_remote_node_get_info_ret (XDR *xdrs, remote_node_get_info_ret *objp)
|
|||||||
if (!xdr_vector (xdrs, (char *)objp->model, 32,
|
if (!xdr_vector (xdrs, (char *)objp->model, 32,
|
||||||
sizeof (char), (xdrproc_t) xdr_char))
|
sizeof (char), (xdrproc_t) xdr_char))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->memory))
|
if (!xdr_int64_t (xdrs, &objp->memory))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_int (xdrs, &objp->cpus))
|
if (!xdr_int (xdrs, &objp->cpus))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -432,7 +432,7 @@ xdr_remote_node_get_cells_free_memory_ret (XDR *xdrs, remote_node_get_cells_free
|
|||||||
char **objp_cpp0 = (char **) (void *) &objp->freeMems.freeMems_val;
|
char **objp_cpp0 = (char **) (void *) &objp->freeMems.freeMems_val;
|
||||||
|
|
||||||
if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->freeMems.freeMems_len, REMOTE_NODE_MAX_CELLS,
|
if (!xdr_array (xdrs, objp_cpp0, (u_int *) &objp->freeMems.freeMems_len, REMOTE_NODE_MAX_CELLS,
|
||||||
sizeof (quad_t), (xdrproc_t) xdr_quad_t))
|
sizeof (int64_t), (xdrproc_t) xdr_int64_t))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -441,7 +441,7 @@ bool_t
|
|||||||
xdr_remote_node_get_free_memory_ret (XDR *xdrs, remote_node_get_free_memory_ret *objp)
|
xdr_remote_node_get_free_memory_ret (XDR *xdrs, remote_node_get_free_memory_ret *objp)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!xdr_quad_t (xdrs, &objp->freeMem))
|
if (!xdr_int64_t (xdrs, &objp->freeMem))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -516,15 +516,15 @@ bool_t
|
|||||||
xdr_remote_domain_block_stats_ret (XDR *xdrs, remote_domain_block_stats_ret *objp)
|
xdr_remote_domain_block_stats_ret (XDR *xdrs, remote_domain_block_stats_ret *objp)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!xdr_quad_t (xdrs, &objp->rd_req))
|
if (!xdr_int64_t (xdrs, &objp->rd_req))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->rd_bytes))
|
if (!xdr_int64_t (xdrs, &objp->rd_bytes))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->wr_req))
|
if (!xdr_int64_t (xdrs, &objp->wr_req))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->wr_bytes))
|
if (!xdr_int64_t (xdrs, &objp->wr_bytes))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->errs))
|
if (!xdr_int64_t (xdrs, &objp->errs))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -544,21 +544,21 @@ bool_t
|
|||||||
xdr_remote_domain_interface_stats_ret (XDR *xdrs, remote_domain_interface_stats_ret *objp)
|
xdr_remote_domain_interface_stats_ret (XDR *xdrs, remote_domain_interface_stats_ret *objp)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!xdr_quad_t (xdrs, &objp->rx_bytes))
|
if (!xdr_int64_t (xdrs, &objp->rx_bytes))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->rx_packets))
|
if (!xdr_int64_t (xdrs, &objp->rx_packets))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->rx_errs))
|
if (!xdr_int64_t (xdrs, &objp->rx_errs))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->rx_drop))
|
if (!xdr_int64_t (xdrs, &objp->rx_drop))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->tx_bytes))
|
if (!xdr_int64_t (xdrs, &objp->tx_bytes))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->tx_packets))
|
if (!xdr_int64_t (xdrs, &objp->tx_packets))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->tx_errs))
|
if (!xdr_int64_t (xdrs, &objp->tx_errs))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_quad_t (xdrs, &objp->tx_drop))
|
if (!xdr_int64_t (xdrs, &objp->tx_drop))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -571,7 +571,7 @@ xdr_remote_domain_block_peek_args (XDR *xdrs, remote_domain_block_peek_args *obj
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_nonnull_string (xdrs, &objp->path))
|
if (!xdr_remote_nonnull_string (xdrs, &objp->path))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->offset))
|
if (!xdr_uint64_t (xdrs, &objp->offset))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_int (xdrs, &objp->size))
|
if (!xdr_u_int (xdrs, &objp->size))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -596,7 +596,7 @@ xdr_remote_domain_memory_peek_args (XDR *xdrs, remote_domain_memory_peek_args *o
|
|||||||
|
|
||||||
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->offset))
|
if (!xdr_uint64_t (xdrs, &objp->offset))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_int (xdrs, &objp->size))
|
if (!xdr_u_int (xdrs, &objp->size))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -796,7 +796,7 @@ bool_t
|
|||||||
xdr_remote_domain_get_max_memory_ret (XDR *xdrs, remote_domain_get_max_memory_ret *objp)
|
xdr_remote_domain_get_max_memory_ret (XDR *xdrs, remote_domain_get_max_memory_ret *objp)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->memory))
|
if (!xdr_uint64_t (xdrs, &objp->memory))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -807,7 +807,7 @@ xdr_remote_domain_set_max_memory_args (XDR *xdrs, remote_domain_set_max_memory_a
|
|||||||
|
|
||||||
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->memory))
|
if (!xdr_uint64_t (xdrs, &objp->memory))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -818,7 +818,7 @@ xdr_remote_domain_set_memory_args (XDR *xdrs, remote_domain_set_memory_args *obj
|
|||||||
|
|
||||||
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
if (!xdr_remote_nonnull_domain (xdrs, &objp->dom))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->memory))
|
if (!xdr_uint64_t (xdrs, &objp->memory))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -838,13 +838,13 @@ xdr_remote_domain_get_info_ret (XDR *xdrs, remote_domain_get_info_ret *objp)
|
|||||||
|
|
||||||
if (!xdr_u_char (xdrs, &objp->state))
|
if (!xdr_u_char (xdrs, &objp->state))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->max_mem))
|
if (!xdr_uint64_t (xdrs, &objp->max_mem))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->memory))
|
if (!xdr_uint64_t (xdrs, &objp->memory))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_short (xdrs, &objp->nr_virt_cpu))
|
if (!xdr_u_short (xdrs, &objp->nr_virt_cpu))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->cpu_time))
|
if (!xdr_uint64_t (xdrs, &objp->cpu_time))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -908,11 +908,11 @@ xdr_remote_domain_migrate_prepare_args (XDR *xdrs, remote_domain_migrate_prepare
|
|||||||
|
|
||||||
if (!xdr_remote_string (xdrs, &objp->uri_in))
|
if (!xdr_remote_string (xdrs, &objp->uri_in))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->flags))
|
if (!xdr_uint64_t (xdrs, &objp->flags))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_string (xdrs, &objp->dname))
|
if (!xdr_remote_string (xdrs, &objp->dname))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->resource))
|
if (!xdr_uint64_t (xdrs, &objp->resource))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -940,11 +940,11 @@ xdr_remote_domain_migrate_perform_args (XDR *xdrs, remote_domain_migrate_perform
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
|
if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->flags))
|
if (!xdr_uint64_t (xdrs, &objp->flags))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_string (xdrs, &objp->dname))
|
if (!xdr_remote_string (xdrs, &objp->dname))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->resource))
|
if (!xdr_uint64_t (xdrs, &objp->resource))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -960,7 +960,7 @@ xdr_remote_domain_migrate_finish_args (XDR *xdrs, remote_domain_migrate_finish_a
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
|
if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->flags))
|
if (!xdr_uint64_t (xdrs, &objp->flags))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -980,11 +980,11 @@ xdr_remote_domain_migrate_prepare2_args (XDR *xdrs, remote_domain_migrate_prepar
|
|||||||
|
|
||||||
if (!xdr_remote_string (xdrs, &objp->uri_in))
|
if (!xdr_remote_string (xdrs, &objp->uri_in))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->flags))
|
if (!xdr_uint64_t (xdrs, &objp->flags))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_string (xdrs, &objp->dname))
|
if (!xdr_remote_string (xdrs, &objp->dname))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->resource))
|
if (!xdr_uint64_t (xdrs, &objp->resource))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_nonnull_string (xdrs, &objp->dom_xml))
|
if (!xdr_remote_nonnull_string (xdrs, &objp->dom_xml))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1014,7 +1014,7 @@ xdr_remote_domain_migrate_finish2_args (XDR *xdrs, remote_domain_migrate_finish2
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
|
if (!xdr_remote_nonnull_string (xdrs, &objp->uri))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->flags))
|
if (!xdr_uint64_t (xdrs, &objp->flags))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_int (xdrs, &objp->retcode))
|
if (!xdr_int (xdrs, &objp->retcode))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@ -1798,11 +1798,11 @@ xdr_remote_storage_pool_get_info_ret (XDR *xdrs, remote_storage_pool_get_info_re
|
|||||||
|
|
||||||
if (!xdr_u_char (xdrs, &objp->state))
|
if (!xdr_u_char (xdrs, &objp->state))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->capacity))
|
if (!xdr_uint64_t (xdrs, &objp->capacity))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->allocation))
|
if (!xdr_uint64_t (xdrs, &objp->allocation))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->available))
|
if (!xdr_uint64_t (xdrs, &objp->available))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -2000,9 +2000,9 @@ xdr_remote_storage_vol_get_info_ret (XDR *xdrs, remote_storage_vol_get_info_ret
|
|||||||
|
|
||||||
if (!xdr_char (xdrs, &objp->type))
|
if (!xdr_char (xdrs, &objp->type))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->capacity))
|
if (!xdr_uint64_t (xdrs, &objp->capacity))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
if (!xdr_u_quad_t (xdrs, &objp->allocation))
|
if (!xdr_uint64_t (xdrs, &objp->allocation))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
* It was generated using rpcgen.
|
* It was generated using rpcgen.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _REMOTE_PROTOCOL_H_RPCGEN
|
#ifndef _RP_H_RPCGEN
|
||||||
#define _REMOTE_PROTOCOL_H_RPCGEN
|
#define _RP_H_RPCGEN
|
||||||
|
|
||||||
#include <rpc/rpc.h>
|
#include <rpc/rpc.h>
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ typedef enum remote_auth_type remote_auth_type;
|
|||||||
struct remote_vcpu_info {
|
struct remote_vcpu_info {
|
||||||
u_int number;
|
u_int number;
|
||||||
int state;
|
int state;
|
||||||
u_quad_t cpu_time;
|
uint64_t cpu_time;
|
||||||
int cpu;
|
int cpu;
|
||||||
};
|
};
|
||||||
typedef struct remote_vcpu_info remote_vcpu_info;
|
typedef struct remote_vcpu_info remote_vcpu_info;
|
||||||
@ -117,8 +117,8 @@ struct remote_sched_param_value {
|
|||||||
union {
|
union {
|
||||||
int i;
|
int i;
|
||||||
u_int ui;
|
u_int ui;
|
||||||
quad_t l;
|
int64_t l;
|
||||||
u_quad_t ul;
|
uint64_t ul;
|
||||||
double d;
|
double d;
|
||||||
int b;
|
int b;
|
||||||
} remote_sched_param_value_u;
|
} remote_sched_param_value_u;
|
||||||
@ -153,7 +153,7 @@ struct remote_get_type_ret {
|
|||||||
typedef struct remote_get_type_ret remote_get_type_ret;
|
typedef struct remote_get_type_ret remote_get_type_ret;
|
||||||
|
|
||||||
struct remote_get_version_ret {
|
struct remote_get_version_ret {
|
||||||
quad_t hv_ver;
|
int64_t hv_ver;
|
||||||
};
|
};
|
||||||
typedef struct remote_get_version_ret remote_get_version_ret;
|
typedef struct remote_get_version_ret remote_get_version_ret;
|
||||||
|
|
||||||
@ -179,7 +179,7 @@ typedef struct remote_get_max_vcpus_ret remote_get_max_vcpus_ret;
|
|||||||
|
|
||||||
struct remote_node_get_info_ret {
|
struct remote_node_get_info_ret {
|
||||||
char model[32];
|
char model[32];
|
||||||
quad_t memory;
|
int64_t memory;
|
||||||
int cpus;
|
int cpus;
|
||||||
int mhz;
|
int mhz;
|
||||||
int nodes;
|
int nodes;
|
||||||
@ -203,13 +203,13 @@ typedef struct remote_node_get_cells_free_memory_args remote_node_get_cells_free
|
|||||||
struct remote_node_get_cells_free_memory_ret {
|
struct remote_node_get_cells_free_memory_ret {
|
||||||
struct {
|
struct {
|
||||||
u_int freeMems_len;
|
u_int freeMems_len;
|
||||||
quad_t *freeMems_val;
|
int64_t *freeMems_val;
|
||||||
} freeMems;
|
} freeMems;
|
||||||
};
|
};
|
||||||
typedef struct remote_node_get_cells_free_memory_ret remote_node_get_cells_free_memory_ret;
|
typedef struct remote_node_get_cells_free_memory_ret remote_node_get_cells_free_memory_ret;
|
||||||
|
|
||||||
struct remote_node_get_free_memory_ret {
|
struct remote_node_get_free_memory_ret {
|
||||||
quad_t freeMem;
|
int64_t freeMem;
|
||||||
};
|
};
|
||||||
typedef struct remote_node_get_free_memory_ret remote_node_get_free_memory_ret;
|
typedef struct remote_node_get_free_memory_ret remote_node_get_free_memory_ret;
|
||||||
|
|
||||||
@ -254,11 +254,11 @@ struct remote_domain_block_stats_args {
|
|||||||
typedef struct remote_domain_block_stats_args remote_domain_block_stats_args;
|
typedef struct remote_domain_block_stats_args remote_domain_block_stats_args;
|
||||||
|
|
||||||
struct remote_domain_block_stats_ret {
|
struct remote_domain_block_stats_ret {
|
||||||
quad_t rd_req;
|
int64_t rd_req;
|
||||||
quad_t rd_bytes;
|
int64_t rd_bytes;
|
||||||
quad_t wr_req;
|
int64_t wr_req;
|
||||||
quad_t wr_bytes;
|
int64_t wr_bytes;
|
||||||
quad_t errs;
|
int64_t errs;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_block_stats_ret remote_domain_block_stats_ret;
|
typedef struct remote_domain_block_stats_ret remote_domain_block_stats_ret;
|
||||||
|
|
||||||
@ -269,21 +269,21 @@ struct remote_domain_interface_stats_args {
|
|||||||
typedef struct remote_domain_interface_stats_args remote_domain_interface_stats_args;
|
typedef struct remote_domain_interface_stats_args remote_domain_interface_stats_args;
|
||||||
|
|
||||||
struct remote_domain_interface_stats_ret {
|
struct remote_domain_interface_stats_ret {
|
||||||
quad_t rx_bytes;
|
int64_t rx_bytes;
|
||||||
quad_t rx_packets;
|
int64_t rx_packets;
|
||||||
quad_t rx_errs;
|
int64_t rx_errs;
|
||||||
quad_t rx_drop;
|
int64_t rx_drop;
|
||||||
quad_t tx_bytes;
|
int64_t tx_bytes;
|
||||||
quad_t tx_packets;
|
int64_t tx_packets;
|
||||||
quad_t tx_errs;
|
int64_t tx_errs;
|
||||||
quad_t tx_drop;
|
int64_t tx_drop;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_interface_stats_ret remote_domain_interface_stats_ret;
|
typedef struct remote_domain_interface_stats_ret remote_domain_interface_stats_ret;
|
||||||
|
|
||||||
struct remote_domain_block_peek_args {
|
struct remote_domain_block_peek_args {
|
||||||
remote_nonnull_domain dom;
|
remote_nonnull_domain dom;
|
||||||
remote_nonnull_string path;
|
remote_nonnull_string path;
|
||||||
u_quad_t offset;
|
uint64_t offset;
|
||||||
u_int size;
|
u_int size;
|
||||||
u_int flags;
|
u_int flags;
|
||||||
};
|
};
|
||||||
@ -299,7 +299,7 @@ typedef struct remote_domain_block_peek_ret remote_domain_block_peek_ret;
|
|||||||
|
|
||||||
struct remote_domain_memory_peek_args {
|
struct remote_domain_memory_peek_args {
|
||||||
remote_nonnull_domain dom;
|
remote_nonnull_domain dom;
|
||||||
u_quad_t offset;
|
uint64_t offset;
|
||||||
u_int size;
|
u_int size;
|
||||||
u_int flags;
|
u_int flags;
|
||||||
};
|
};
|
||||||
@ -414,19 +414,19 @@ struct remote_domain_get_max_memory_args {
|
|||||||
typedef struct remote_domain_get_max_memory_args remote_domain_get_max_memory_args;
|
typedef struct remote_domain_get_max_memory_args remote_domain_get_max_memory_args;
|
||||||
|
|
||||||
struct remote_domain_get_max_memory_ret {
|
struct remote_domain_get_max_memory_ret {
|
||||||
u_quad_t memory;
|
uint64_t memory;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_get_max_memory_ret remote_domain_get_max_memory_ret;
|
typedef struct remote_domain_get_max_memory_ret remote_domain_get_max_memory_ret;
|
||||||
|
|
||||||
struct remote_domain_set_max_memory_args {
|
struct remote_domain_set_max_memory_args {
|
||||||
remote_nonnull_domain dom;
|
remote_nonnull_domain dom;
|
||||||
u_quad_t memory;
|
uint64_t memory;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_set_max_memory_args remote_domain_set_max_memory_args;
|
typedef struct remote_domain_set_max_memory_args remote_domain_set_max_memory_args;
|
||||||
|
|
||||||
struct remote_domain_set_memory_args {
|
struct remote_domain_set_memory_args {
|
||||||
remote_nonnull_domain dom;
|
remote_nonnull_domain dom;
|
||||||
u_quad_t memory;
|
uint64_t memory;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_set_memory_args remote_domain_set_memory_args;
|
typedef struct remote_domain_set_memory_args remote_domain_set_memory_args;
|
||||||
|
|
||||||
@ -437,10 +437,10 @@ typedef struct remote_domain_get_info_args remote_domain_get_info_args;
|
|||||||
|
|
||||||
struct remote_domain_get_info_ret {
|
struct remote_domain_get_info_ret {
|
||||||
u_char state;
|
u_char state;
|
||||||
u_quad_t max_mem;
|
uint64_t max_mem;
|
||||||
u_quad_t memory;
|
uint64_t memory;
|
||||||
u_short nr_virt_cpu;
|
u_short nr_virt_cpu;
|
||||||
u_quad_t cpu_time;
|
uint64_t cpu_time;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_get_info_ret remote_domain_get_info_ret;
|
typedef struct remote_domain_get_info_ret remote_domain_get_info_ret;
|
||||||
|
|
||||||
@ -475,9 +475,9 @@ typedef struct remote_domain_dump_xml_ret remote_domain_dump_xml_ret;
|
|||||||
|
|
||||||
struct remote_domain_migrate_prepare_args {
|
struct remote_domain_migrate_prepare_args {
|
||||||
remote_string uri_in;
|
remote_string uri_in;
|
||||||
u_quad_t flags;
|
uint64_t flags;
|
||||||
remote_string dname;
|
remote_string dname;
|
||||||
u_quad_t resource;
|
uint64_t resource;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_migrate_prepare_args remote_domain_migrate_prepare_args;
|
typedef struct remote_domain_migrate_prepare_args remote_domain_migrate_prepare_args;
|
||||||
|
|
||||||
@ -497,9 +497,9 @@ struct remote_domain_migrate_perform_args {
|
|||||||
char *cookie_val;
|
char *cookie_val;
|
||||||
} cookie;
|
} cookie;
|
||||||
remote_nonnull_string uri;
|
remote_nonnull_string uri;
|
||||||
u_quad_t flags;
|
uint64_t flags;
|
||||||
remote_string dname;
|
remote_string dname;
|
||||||
u_quad_t resource;
|
uint64_t resource;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_migrate_perform_args remote_domain_migrate_perform_args;
|
typedef struct remote_domain_migrate_perform_args remote_domain_migrate_perform_args;
|
||||||
|
|
||||||
@ -510,7 +510,7 @@ struct remote_domain_migrate_finish_args {
|
|||||||
char *cookie_val;
|
char *cookie_val;
|
||||||
} cookie;
|
} cookie;
|
||||||
remote_nonnull_string uri;
|
remote_nonnull_string uri;
|
||||||
u_quad_t flags;
|
uint64_t flags;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_migrate_finish_args remote_domain_migrate_finish_args;
|
typedef struct remote_domain_migrate_finish_args remote_domain_migrate_finish_args;
|
||||||
|
|
||||||
@ -521,9 +521,9 @@ typedef struct remote_domain_migrate_finish_ret remote_domain_migrate_finish_ret
|
|||||||
|
|
||||||
struct remote_domain_migrate_prepare2_args {
|
struct remote_domain_migrate_prepare2_args {
|
||||||
remote_string uri_in;
|
remote_string uri_in;
|
||||||
u_quad_t flags;
|
uint64_t flags;
|
||||||
remote_string dname;
|
remote_string dname;
|
||||||
u_quad_t resource;
|
uint64_t resource;
|
||||||
remote_nonnull_string dom_xml;
|
remote_nonnull_string dom_xml;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_migrate_prepare2_args remote_domain_migrate_prepare2_args;
|
typedef struct remote_domain_migrate_prepare2_args remote_domain_migrate_prepare2_args;
|
||||||
@ -544,7 +544,7 @@ struct remote_domain_migrate_finish2_args {
|
|||||||
char *cookie_val;
|
char *cookie_val;
|
||||||
} cookie;
|
} cookie;
|
||||||
remote_nonnull_string uri;
|
remote_nonnull_string uri;
|
||||||
u_quad_t flags;
|
uint64_t flags;
|
||||||
int retcode;
|
int retcode;
|
||||||
};
|
};
|
||||||
typedef struct remote_domain_migrate_finish2_args remote_domain_migrate_finish2_args;
|
typedef struct remote_domain_migrate_finish2_args remote_domain_migrate_finish2_args;
|
||||||
@ -1002,9 +1002,9 @@ typedef struct remote_storage_pool_get_info_args remote_storage_pool_get_info_ar
|
|||||||
|
|
||||||
struct remote_storage_pool_get_info_ret {
|
struct remote_storage_pool_get_info_ret {
|
||||||
u_char state;
|
u_char state;
|
||||||
u_quad_t capacity;
|
uint64_t capacity;
|
||||||
u_quad_t allocation;
|
uint64_t allocation;
|
||||||
u_quad_t available;
|
uint64_t available;
|
||||||
};
|
};
|
||||||
typedef struct remote_storage_pool_get_info_ret remote_storage_pool_get_info_ret;
|
typedef struct remote_storage_pool_get_info_ret remote_storage_pool_get_info_ret;
|
||||||
|
|
||||||
@ -1115,8 +1115,8 @@ typedef struct remote_storage_vol_get_info_args remote_storage_vol_get_info_args
|
|||||||
|
|
||||||
struct remote_storage_vol_get_info_ret {
|
struct remote_storage_vol_get_info_ret {
|
||||||
char type;
|
char type;
|
||||||
u_quad_t capacity;
|
uint64_t capacity;
|
||||||
u_quad_t allocation;
|
uint64_t allocation;
|
||||||
};
|
};
|
||||||
typedef struct remote_storage_vol_get_info_ret remote_storage_vol_get_info_ret;
|
typedef struct remote_storage_vol_get_info_ret remote_storage_vol_get_info_ret;
|
||||||
|
|
||||||
@ -1793,4 +1793,4 @@ extern bool_t xdr_remote_message_header ();
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* !_REMOTE_PROTOCOL_H_RPCGEN */
|
#endif /* !_RP_H_RPCGEN */
|
||||||
|
@ -26,6 +26,14 @@ while (<>) {
|
|||||||
|
|
||||||
s/\t/ /g;
|
s/\t/ /g;
|
||||||
|
|
||||||
|
# Portability for Solaris RPC
|
||||||
|
s/u_quad_t/uint64_t/g;
|
||||||
|
s/quad_t/int64_t/g;
|
||||||
|
s/xdr_u_quad_t/xdr_uint64_t/g;
|
||||||
|
s/xdr_quad_t/xdr_int64_t/g;
|
||||||
|
s/IXDR_GET_LONG/IXDR_GET_INT32/g;
|
||||||
|
s,#include "\./remote_protocol\.h",#include "remote_protocol.h",;
|
||||||
|
|
||||||
if (m/^}/) {
|
if (m/^}/) {
|
||||||
$in_function = 0;
|
$in_function = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user