Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
55cb8f5b
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看板
提交
55cb8f5b
编写于
5月 14, 2011
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remote generator, client: Add more special case handling
For virDomainDestroy and virDrvSupportsFeature.
上级
0882f7a2
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
16 addition
and
57 deletion
+16
-57
daemon/remote_generator.pl
daemon/remote_generator.pl
+14
-0
src/remote/remote_driver.c
src/remote/remote_driver.c
+0
-55
src/remote/remote_protocol.x
src/remote/remote_protocol.x
+2
-2
未找到文件。
daemon/remote_generator.pl
浏览文件 @
55cb8f5b
...
...
@@ -1065,6 +1065,15 @@ elsif ($opt_k) {
print
"
\n
";
print
"
remoteDriverLock(priv);
\n
";
if
(
$call
->
{
ProcName
}
eq
"
SupportsFeature
")
{
# SPECIAL: VIR_DRV_FEATURE_REMOTE feature is handled directly
print
"
\n
";
print
"
if (feature == VIR_DRV_FEATURE_REMOTE) {
\n
";
print
"
rv = 1;
\n
";
print
"
goto done;
\n
";
print
"
}
\n
";
}
foreach
my
$args_check
(
@args_check_list
)
{
print
"
\n
";
print
"
if (
$args_check
->{arg} >
$args_check
->{limit}) {
\n
";
...
...
@@ -1140,6 +1149,11 @@ elsif ($opt_k) {
print
"
\n
";
}
if
(
$call
->
{
ProcName
}
eq
"
DomainDestroy
")
{
# SPECIAL: virDomainDestroy needs to reset the domain id explicitly
print
"
dom->id = -1;
\n
";
}
if
(
$multi_ret
or
!
@ret_list
)
{
print
"
rv = 0;
\n
";
}
...
...
src/remote/remote_driver.c
浏览文件 @
55cb8f5b
...
...
@@ -1591,37 +1591,6 @@ remoteClose (virConnectPtr conn)
return
ret
;
}
static
int
remoteSupportsFeature
(
virConnectPtr
conn
,
int
feature
)
{
int
rv
=
-
1
;
remote_supports_feature_args
args
;
remote_supports_feature_ret
ret
;
struct
private_data
*
priv
=
conn
->
privateData
;
remoteDriverLock
(
priv
);
/* VIR_DRV_FEATURE_REMOTE* features are handled directly. */
if
(
feature
==
VIR_DRV_FEATURE_REMOTE
)
{
rv
=
1
;
goto
done
;
}
args
.
feature
=
feature
;
memset
(
&
ret
,
0
,
sizeof
ret
);
if
(
call
(
conn
,
priv
,
0
,
REMOTE_PROC_SUPPORTS_FEATURE
,
(
xdrproc_t
)
xdr_remote_supports_feature_args
,
(
char
*
)
&
args
,
(
xdrproc_t
)
xdr_remote_supports_feature_ret
,
(
char
*
)
&
ret
)
==
-
1
)
goto
done
;
rv
=
ret
.
supported
;
done:
remoteDriverUnlock
(
priv
);
return
rv
;
}
/* Unfortunately this function is defined to return a static string.
* Since the remote end always answers with the same type (for a
* single connection anyway) we cache the type in the connection's
...
...
@@ -1811,30 +1780,6 @@ done:
return
rv
;
}
static
int
remoteDomainDestroy
(
virDomainPtr
domain
)
{
int
rv
=
-
1
;
remote_domain_destroy_args
args
;
struct
private_data
*
priv
=
domain
->
conn
->
privateData
;
remoteDriverLock
(
priv
);
make_nonnull_domain
(
&
args
.
dom
,
domain
);
if
(
call
(
domain
->
conn
,
priv
,
0
,
REMOTE_PROC_DOMAIN_DESTROY
,
(
xdrproc_t
)
xdr_remote_domain_destroy_args
,
(
char
*
)
&
args
,
(
xdrproc_t
)
xdr_void
,
(
char
*
)
NULL
)
==
-
1
)
goto
done
;
rv
=
0
;
domain
->
id
=
-
1
;
done:
remoteDriverUnlock
(
priv
);
return
rv
;
}
static
int
remoteDomainSetMemoryParameters
(
virDomainPtr
domain
,
virMemoryParameterPtr
params
,
...
...
src/remote/remote_protocol.x
浏览文件 @
55cb8f5b
...
...
@@ -2058,7 +2058,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_CREATE_XML
=
10
,
/* autogen autogen */
REMOTE_PROC_DOMAIN_DEFINE_XML
=
11
,
/* autogen autogen */
REMOTE_PROC_DOMAIN_DESTROY
=
12
,
/* autogen
skip
gen */
REMOTE_PROC_DOMAIN_DESTROY
=
12
,
/* autogen
auto
gen */
REMOTE_PROC_DOMAIN_DETACH_DEVICE
=
13
,
/* autogen autogen */
REMOTE_PROC_DOMAIN_GET_XML_DESC
=
14
,
/* autogen autogen */
REMOTE_PROC_DOMAIN_GET_AUTOSTART
=
15
,
/* autogen autogen */
...
...
@@ -2110,7 +2110,7 @@ enum remote_procedure {
REMOTE_PROC_DOMAIN_GET_SCHEDULER_PARAMETERS
=
57
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_SET_SCHEDULER_PARAMETERS
=
58
,
/* skipgen skipgen */
REMOTE_PROC_GET_HOSTNAME
=
59
,
/* autogen autogen */
REMOTE_PROC_SUPPORTS_FEATURE
=
60
,
/* autogen
skip
gen */
REMOTE_PROC_SUPPORTS_FEATURE
=
60
,
/* autogen
auto
gen */
REMOTE_PROC_DOMAIN_MIGRATE_PREPARE
=
61
,
/* skipgen skipgen */
REMOTE_PROC_DOMAIN_MIGRATE_PERFORM
=
62
,
/* autogen autogen */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录