Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
9322b2e8
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
9322b2e8
编写于
1月 28, 2009
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Solaris portability for RPC code data types
上级
e730de6f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
141 addition
and
121 deletion
+141
-121
ChangeLog
ChangeLog
+12
-0
configure.in
configure.in
+2
-2
qemud/Makefile.am
qemud/Makefile.am
+26
-26
qemud/remote_protocol.c
qemud/remote_protocol.c
+49
-49
qemud/remote_protocol.h
qemud/remote_protocol.h
+44
-44
qemud/rpcgen_fix.pl
qemud/rpcgen_fix.pl
+8
-0
未找到文件。
ChangeLog
浏览文件 @
9322b2e8
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>
remote_internal.c: fix typo that would mistakenly report OOM
...
...
configure.in
浏览文件 @
9322b2e8
...
...
@@ -92,9 +92,9 @@ AC_CHECK_LIB([intl],[gettext],[])
dnl Do we have rpcgen?
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?
AM_CONDITIONAL([GLIBC_RPCGEN],
AM_CONDITIONAL([
HAVE_
GLIBC_RPCGEN],
[test "x$ac_cv_path_RPCGEN" != "xno" &&
$ac_cv_path_RPCGEN -t </dev/null >/dev/null 2>&1])
...
...
qemud/Makefile.am
浏览文件 @
9322b2e8
## Process this file with automake to produce Makefile.in
RPCGEN
=
$(RPCGEN)
DAEMON_SOURCES
=
\
event.c event.h
\
qemud.c qemud.h
\
...
...
@@ -33,32 +31,34 @@ EXTRA_DIST = \
$(AVAHI_SOURCES)
\
$(DAEMON_SOURCES)
if
RPCGEN
SUFFIXES
=
.x
# The subshell ensures that remote_protocol.c ends up
# including <config.h> before "remote_protocol.h".
.x.c
:
rm
-f
$@
$@
-t
$@
-t1
$@
-t2
$(RPCGEN)
-c
-o
$@
-t
$<
(
echo
'#include <config.h>'
;
cat
$@
-t
)
>
$@
-t1
if
GLIBC_RPCGEN
perl
-w
rpcgen_fix.pl
$@-t1
>
$@-t2
rm
$@-t1
chmod
444
$@-t2
mv
$@-t2
$@
if
HAVE_RPCGEN
#
# Maintainer-only target for re-generating the derived .c/.h source
# files, which are actually derived from the .x file.
#
# For committing protocol changes to CVS, the GLIBC rpcgen *must*
# be used.
#
# Support for non-GLIB rpcgen is here as a convenience for
# non-Linux people needing to test changes during dev.
#
rpcgen
:
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
chmod
444
$@-t1
mv
$@-t1
$@
endif
.x.h
:
rm
-f
$@
$@
-t
$(RPCGEN)
-h
-o
$@
-t
$<
if
GLIBC_RPCGEN
perl
-pi
-e
's/\t/ /g'
$@-t
chmod
0444
rp.c-t
rp.h-t
mv
-f
rp.h-t
$(srcdir)/remote_protocol.h
mv
-f
rp.c-t
$(srcdir)/remote_protocol.c
endif
chmod
444
$@-t
mv
$@-t
$@
endif
remote_protocol.c
:
remote_protocol.h
...
...
qemud/remote_protocol.c
浏览文件 @
9322b2e8
...
...
@@ -183,7 +183,7 @@ xdr_remote_vcpu_info (XDR *xdrs, remote_vcpu_info *objp)
return
FALSE
;
if
(
!
xdr_int
(
xdrs
,
&
objp
->
state
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
cpu_time
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
cpu_time
))
return
FALSE
;
if
(
!
xdr_int
(
xdrs
,
&
objp
->
cpu
))
return
FALSE
;
...
...
@@ -205,11 +205,11 @@ xdr_remote_sched_param_value (XDR *xdrs, remote_sched_param_value *objp)
return
FALSE
;
break
;
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
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_ULLONG
:
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
remote_sched_param_value_u
.
ul
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
remote_sched_param_value_u
.
ul
))
return
FALSE
;
break
;
case
VIR_DOMAIN_SCHED_FIELD_DOUBLE
:
...
...
@@ -279,7 +279,7 @@ bool_t
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
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
,
sizeof
(
char
),
(
xdrproc_t
)
xdr_char
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
memory
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
memory
))
return
FALSE
;
buf
=
(
int32_t
*
)
XDR_INLINE
(
xdrs
,
6
*
BYTES_PER_XDR_UNIT
);
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
,
sizeof
(
char
),
(
xdrproc_t
)
xdr_char
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
memory
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
memory
))
return
FALSE
;
buf
=
(
int32_t
*
)
XDR_INLINE
(
xdrs
,
6
*
BYTES_PER_XDR_UNIT
);
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
))
return
FALSE
;
}
else
{
objp
->
cpus
=
IXDR_GET_
LONG
(
buf
);
objp
->
mhz
=
IXDR_GET_
LONG
(
buf
);
objp
->
nodes
=
IXDR_GET_
LONG
(
buf
);
objp
->
sockets
=
IXDR_GET_
LONG
(
buf
);
objp
->
cores
=
IXDR_GET_
LONG
(
buf
);
objp
->
threads
=
IXDR_GET_
LONG
(
buf
);
objp
->
cpus
=
IXDR_GET_
INT32
(
buf
);
objp
->
mhz
=
IXDR_GET_
INT32
(
buf
);
objp
->
nodes
=
IXDR_GET_
INT32
(
buf
);
objp
->
sockets
=
IXDR_GET_
INT32
(
buf
);
objp
->
cores
=
IXDR_GET_
INT32
(
buf
);
objp
->
threads
=
IXDR_GET_
INT32
(
buf
);
}
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
,
sizeof
(
char
),
(
xdrproc_t
)
xdr_char
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
memory
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
memory
))
return
FALSE
;
if
(
!
xdr_int
(
xdrs
,
&
objp
->
cpus
))
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
;
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
TRUE
;
}
...
...
@@ -441,7 +441,7 @@ bool_t
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
TRUE
;
}
...
...
@@ -516,15 +516,15 @@ bool_t
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
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
rd_bytes
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
rd_bytes
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
wr_req
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
wr_req
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
wr_bytes
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
wr_bytes
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
errs
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
errs
))
return
FALSE
;
return
TRUE
;
}
...
...
@@ -544,21 +544,21 @@ bool_t
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
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
rx_packets
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
rx_packets
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
rx_errs
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
rx_errs
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
rx_drop
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
rx_drop
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
tx_bytes
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
tx_bytes
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
tx_packets
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
tx_packets
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
tx_errs
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
tx_errs
))
return
FALSE
;
if
(
!
xdr_
quad
_t
(
xdrs
,
&
objp
->
tx_drop
))
if
(
!
xdr_
int64
_t
(
xdrs
,
&
objp
->
tx_drop
))
return
FALSE
;
return
TRUE
;
}
...
...
@@ -571,7 +571,7 @@ xdr_remote_domain_block_peek_args (XDR *xdrs, remote_domain_block_peek_args *obj
return
FALSE
;
if
(
!
xdr_remote_nonnull_string
(
xdrs
,
&
objp
->
path
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
offset
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
offset
))
return
FALSE
;
if
(
!
xdr_u_int
(
xdrs
,
&
objp
->
size
))
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
offset
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
offset
))
return
FALSE
;
if
(
!
xdr_u_int
(
xdrs
,
&
objp
->
size
))
return
FALSE
;
...
...
@@ -796,7 +796,7 @@ bool_t
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_u
int64
_t
(
xdrs
,
&
objp
->
memory
))
return
FALSE
;
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
memory
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
memory
))
return
FALSE
;
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
memory
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
memory
))
return
FALSE
;
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
max_mem
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
max_mem
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
memory
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
memory
))
return
FALSE
;
if
(
!
xdr_u_short
(
xdrs
,
&
objp
->
nr_virt_cpu
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
cpu_time
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
cpu_time
))
return
FALSE
;
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
flags
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
flags
))
return
FALSE
;
if
(
!
xdr_remote_string
(
xdrs
,
&
objp
->
dname
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
resource
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
resource
))
return
FALSE
;
return
TRUE
;
}
...
...
@@ -940,11 +940,11 @@ xdr_remote_domain_migrate_perform_args (XDR *xdrs, remote_domain_migrate_perform
return
FALSE
;
if
(
!
xdr_remote_nonnull_string
(
xdrs
,
&
objp
->
uri
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
flags
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
flags
))
return
FALSE
;
if
(
!
xdr_remote_string
(
xdrs
,
&
objp
->
dname
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
resource
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
resource
))
return
FALSE
;
return
TRUE
;
}
...
...
@@ -960,7 +960,7 @@ xdr_remote_domain_migrate_finish_args (XDR *xdrs, remote_domain_migrate_finish_a
return
FALSE
;
if
(
!
xdr_remote_nonnull_string
(
xdrs
,
&
objp
->
uri
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
flags
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
flags
))
return
FALSE
;
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
flags
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
flags
))
return
FALSE
;
if
(
!
xdr_remote_string
(
xdrs
,
&
objp
->
dname
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
resource
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
resource
))
return
FALSE
;
if
(
!
xdr_remote_nonnull_string
(
xdrs
,
&
objp
->
dom_xml
))
return
FALSE
;
...
...
@@ -1014,7 +1014,7 @@ xdr_remote_domain_migrate_finish2_args (XDR *xdrs, remote_domain_migrate_finish2
return
FALSE
;
if
(
!
xdr_remote_nonnull_string
(
xdrs
,
&
objp
->
uri
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
flags
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
flags
))
return
FALSE
;
if
(
!
xdr_int
(
xdrs
,
&
objp
->
retcode
))
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
capacity
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
capacity
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
allocation
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
allocation
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
available
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
available
))
return
FALSE
;
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
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
capacity
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
capacity
))
return
FALSE
;
if
(
!
xdr_u
_quad
_t
(
xdrs
,
&
objp
->
allocation
))
if
(
!
xdr_u
int64
_t
(
xdrs
,
&
objp
->
allocation
))
return
FALSE
;
return
TRUE
;
}
...
...
qemud/remote_protocol.h
浏览文件 @
9322b2e8
...
...
@@ -3,8 +3,8 @@
* It was generated using rpcgen.
*/
#ifndef _R
EMOTE_PROTOCOL
_H_RPCGEN
#define _R
EMOTE_PROTOCOL
_H_RPCGEN
#ifndef _R
P
_H_RPCGEN
#define _R
P
_H_RPCGEN
#include <rpc/rpc.h>
...
...
@@ -107,7 +107,7 @@ typedef enum remote_auth_type remote_auth_type;
struct
remote_vcpu_info
{
u_int
number
;
int
state
;
u
_quad
_t
cpu_time
;
u
int64
_t
cpu_time
;
int
cpu
;
};
typedef
struct
remote_vcpu_info
remote_vcpu_info
;
...
...
@@ -117,8 +117,8 @@ struct remote_sched_param_value {
union
{
int
i
;
u_int
ui
;
quad
_t
l
;
u
_quad
_t
ul
;
int64
_t
l
;
u
int64
_t
ul
;
double
d
;
int
b
;
}
remote_sched_param_value_u
;
...
...
@@ -153,7 +153,7 @@ struct remote_get_type_ret {
typedef
struct
remote_get_type_ret
remote_get_type_ret
;
struct
remote_get_version_ret
{
quad
_t
hv_ver
;
int64
_t
hv_ver
;
};
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
{
char
model
[
32
];
quad
_t
memory
;
int64
_t
memory
;
int
cpus
;
int
mhz
;
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
{
u_int
freeMems_len
;
quad
_t
*
freeMems_val
;
int64
_t
*
freeMems_val
;
}
freeMems
;
};
typedef
struct
remote_node_get_cells_free_memory_ret
remote_node_get_cells_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
;
...
...
@@ -254,11 +254,11 @@ struct remote_domain_block_stats_args {
typedef
struct
remote_domain_block_stats_args
remote_domain_block_stats_args
;
struct
remote_domain_block_stats_ret
{
quad
_t
rd_req
;
quad
_t
rd_bytes
;
quad
_t
wr_req
;
quad
_t
wr_bytes
;
quad
_t
errs
;
int64
_t
rd_req
;
int64
_t
rd_bytes
;
int64
_t
wr_req
;
int64
_t
wr_bytes
;
int64
_t
errs
;
};
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
;
struct
remote_domain_interface_stats_ret
{
quad
_t
rx_bytes
;
quad
_t
rx_packets
;
quad
_t
rx_errs
;
quad
_t
rx_drop
;
quad
_t
tx_bytes
;
quad
_t
tx_packets
;
quad
_t
tx_errs
;
quad
_t
tx_drop
;
int64
_t
rx_bytes
;
int64
_t
rx_packets
;
int64
_t
rx_errs
;
int64
_t
rx_drop
;
int64
_t
tx_bytes
;
int64
_t
tx_packets
;
int64
_t
tx_errs
;
int64
_t
tx_drop
;
};
typedef
struct
remote_domain_interface_stats_ret
remote_domain_interface_stats_ret
;
struct
remote_domain_block_peek_args
{
remote_nonnull_domain
dom
;
remote_nonnull_string
path
;
u
_quad
_t
offset
;
u
int64
_t
offset
;
u_int
size
;
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
{
remote_nonnull_domain
dom
;
u
_quad
_t
offset
;
u
int64
_t
offset
;
u_int
size
;
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
;
struct
remote_domain_get_max_memory_ret
{
u
_quad
_t
memory
;
u
int64
_t
memory
;
};
typedef
struct
remote_domain_get_max_memory_ret
remote_domain_get_max_memory_ret
;
struct
remote_domain_set_max_memory_args
{
remote_nonnull_domain
dom
;
u
_quad
_t
memory
;
u
int64
_t
memory
;
};
typedef
struct
remote_domain_set_max_memory_args
remote_domain_set_max_memory_args
;
struct
remote_domain_set_memory_args
{
remote_nonnull_domain
dom
;
u
_quad
_t
memory
;
u
int64
_t
memory
;
};
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
{
u_char
state
;
u
_quad
_t
max_mem
;
u
_quad
_t
memory
;
u
int64
_t
max_mem
;
u
int64
_t
memory
;
u_short
nr_virt_cpu
;
u
_quad
_t
cpu_time
;
u
int64
_t
cpu_time
;
};
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
{
remote_string
uri_in
;
u
_quad
_t
flags
;
u
int64
_t
flags
;
remote_string
dname
;
u
_quad
_t
resource
;
u
int64
_t
resource
;
};
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
;
}
cookie
;
remote_nonnull_string
uri
;
u
_quad
_t
flags
;
u
int64
_t
flags
;
remote_string
dname
;
u
_quad
_t
resource
;
u
int64
_t
resource
;
};
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
;
}
cookie
;
remote_nonnull_string
uri
;
u
_quad
_t
flags
;
u
int64
_t
flags
;
};
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
{
remote_string
uri_in
;
u
_quad
_t
flags
;
u
int64
_t
flags
;
remote_string
dname
;
u
_quad
_t
resource
;
u
int64
_t
resource
;
remote_nonnull_string
dom_xml
;
};
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
;
}
cookie
;
remote_nonnull_string
uri
;
u
_quad
_t
flags
;
u
int64
_t
flags
;
int
retcode
;
};
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
{
u_char
state
;
u
_quad
_t
capacity
;
u
_quad
_t
allocation
;
u
_quad
_t
available
;
u
int64
_t
capacity
;
u
int64
_t
allocation
;
u
int64
_t
available
;
};
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
{
char
type
;
u
_quad
_t
capacity
;
u
_quad
_t
allocation
;
u
int64
_t
capacity
;
u
int64
_t
allocation
;
};
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
/* !_R
EMOTE_PROTOCOL
_H_RPCGEN */
#endif
/* !_R
P
_H_RPCGEN */
qemud/rpcgen_fix.pl
浏览文件 @
9322b2e8
...
...
@@ -26,6 +26,14 @@ while (<>) {
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/^}/
)
{
$in_function
=
0
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录