Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
2c4105f1
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,发现更多精彩内容 >>
提交
2c4105f1
编写于
4月 23, 2011
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remote generator: Reorder into prepare and print section
上级
6384104b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
31 addition
and
25 deletion
+31
-25
daemon/remote_generator.pl
daemon/remote_generator.pl
+31
-25
未找到文件。
daemon/remote_generator.pl
浏览文件 @
2c4105f1
...
...
@@ -293,31 +293,6 @@ elsif ($opt_b) {
next
;
}
print
"
\n
";
print
"
static int
\n
";
print
"
${structprefix}
Dispatch
$calls
{
$_
}->{ProcName}(
\n
";
print
"
struct qemud_server *server ATTRIBUTE_UNUSED,
\n
";
print
"
struct qemud_client *client ATTRIBUTE_UNUSED,
\n
";
print
"
virConnectPtr conn,
\n
";
print
"
remote_message_header *hdr ATTRIBUTE_UNUSED,
\n
";
print
"
remote_error *rerr,
\n
";
print
"
$calls
{
$_
}->{args} *args
";
if
(
$calls
{
$_
}
->
{
args
}
eq
"
void
")
{
print
"
ATTRIBUTE_UNUSED
"
}
print
"
,
\n
";
print
"
$calls
{
$_
}->{ret} *ret
";
if
(
$calls
{
$_
}
->
{
ret
}
eq
"
void
")
{
print
"
ATTRIBUTE_UNUSED
"
}
print
"
)
\n
";
print
"
{
\n
";
print
"
int rv = -1;
\n
";
my
$has_node_device
=
0
;
my
@vars_list
=
();
my
@optionals_list
=
();
...
...
@@ -327,6 +302,7 @@ elsif ($opt_b) {
my
@free_list
=
();
my
@free_list_on_error
=
("
remoteDispatchError(rerr);
");
# handle arguments to the function
if
(
$calls
{
$_
}
->
{
args
}
ne
"
void
")
{
# node device is special, as it's identified by name
if
(
$calls
{
$_
}
->
{
args
}
=~
m/^remote_node_device_/
and
...
...
@@ -409,6 +385,7 @@ elsif ($opt_b) {
}
}
# handle return values of the function
my
$single_ret_var
=
"
undefined
";
my
$single_ret_by_ref
=
0
;
my
$single_ret_check
=
"
== undefined
";
...
...
@@ -550,6 +527,7 @@ elsif ($opt_b) {
}
}
# select struct type for multi-return-value functions
if
(
$multi_ret
)
{
if
(
!
@args_list
)
{
push
(
@args_list
,
"
conn
");
...
...
@@ -577,6 +555,34 @@ elsif ($opt_b) {
push
(
@vars_list
,
"
vir
$struct_name
tmp
");
}
# print functions signature
print
"
\n
";
print
"
static int
\n
";
print
"
${structprefix}
Dispatch
$calls
{
$_
}->{ProcName}(
\n
";
print
"
struct qemud_server *server ATTRIBUTE_UNUSED,
\n
";
print
"
struct qemud_client *client ATTRIBUTE_UNUSED,
\n
";
print
"
virConnectPtr conn,
\n
";
print
"
remote_message_header *hdr ATTRIBUTE_UNUSED,
\n
";
print
"
remote_error *rerr,
\n
";
print
"
$calls
{
$_
}->{args} *args
";
if
(
$calls
{
$_
}
->
{
args
}
eq
"
void
")
{
print
"
ATTRIBUTE_UNUSED
"
}
print
"
,
\n
";
print
"
$calls
{
$_
}->{ret} *ret
";
if
(
$calls
{
$_
}
->
{
ret
}
eq
"
void
")
{
print
"
ATTRIBUTE_UNUSED
"
}
print
"
)
\n
";
# print function body
print
"
{
\n
";
print
"
int rv = -1;
\n
";
foreach
my
$var
(
@vars_list
)
{
print
"
$var
;
\n
";
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录