Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
1f2bf483
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,发现更多精彩内容 >>
提交
1f2bf483
编写于
7月 04, 2013
作者:
M
Michal Privoznik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adapt to VIR_ALLOC and virAsprintf in src/hyperv/*
上级
84c50347
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
24 deletion
+9
-24
src/hyperv/hyperv_driver.c
src/hyperv/hyperv_driver.c
+6
-15
src/hyperv/hyperv_util.c
src/hyperv/hyperv_util.c
+1
-3
src/hyperv/hyperv_wmi.c
src/hyperv/hyperv_wmi.c
+2
-6
未找到文件。
src/hyperv/hyperv_driver.c
浏览文件 @
1f2bf483
...
...
@@ -117,10 +117,8 @@ hypervConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int flags
}
/* Allocate per-connection private data */
if
(
VIR_ALLOC
(
priv
)
<
0
)
{
virReportOOMError
();
if
(
VIR_ALLOC
(
priv
)
<
0
)
goto
cleanup
;
}
if
(
hypervParseUri
(
&
priv
->
parsedUri
,
conn
->
uri
)
<
0
)
{
goto
cleanup
;
...
...
@@ -802,10 +800,8 @@ hypervDomainGetXMLDesc(virDomainPtr domain, unsigned int flags)
/* Flags checked by virDomainDefFormat */
if
(
VIR_ALLOC
(
def
)
<
0
)
{
virReportOOMError
();
if
(
VIR_ALLOC
(
def
)
<
0
)
goto
cleanup
;
}
virUUIDFormat
(
domain
->
uuid
,
uuid_string
);
...
...
@@ -1255,9 +1251,8 @@ hypervConnectListAllDomains(virConnectPtr conn,
!
MATCH
(
VIR_CONNECT_LIST_DOMAINS_NO_AUTOSTART
))
||
(
MATCH
(
VIR_CONNECT_LIST_DOMAINS_HAS_SNAPSHOT
)
&&
!
MATCH
(
VIR_CONNECT_LIST_DOMAINS_NO_SNAPSHOT
)))
{
if
(
domains
&&
VIR_ALLOC_N
(
*
domains
,
1
)
<
0
)
goto
no_memory
;
if
(
domains
&&
VIR_ALLOC_N
(
*
domains
,
1
)
<
0
)
goto
cleanup
;
ret
=
0
;
goto
cleanup
;
...
...
@@ -1287,7 +1282,7 @@ hypervConnectListAllDomains(virConnectPtr conn,
if
(
domains
)
{
if
(
VIR_ALLOC_N
(
doms
,
1
)
<
0
)
goto
no_memory
;
goto
cleanup
;
ndoms
=
1
;
}
...
...
@@ -1326,7 +1321,7 @@ hypervConnectListAllDomains(virConnectPtr conn,
}
if
(
VIR_RESIZE_N
(
doms
,
ndoms
,
count
,
2
)
<
0
)
goto
no_memory
;
goto
cleanup
;
domain
=
NULL
;
...
...
@@ -1354,10 +1349,6 @@ cleanup:
hypervFreeObject
(
priv
,
(
hypervObject
*
)
computerSystemList
);
return
ret
;
no_memory:
virReportOOMError
();
goto
cleanup
;
}
#undef MATCH
...
...
src/hyperv/hyperv_util.c
浏览文件 @
1f2bf483
...
...
@@ -46,10 +46,8 @@ hypervParseUri(hypervParsedUri **parsedUri, virURIPtr uri)
return
-
1
;
}
if
(
VIR_ALLOC
(
*
parsedUri
)
<
0
)
{
virReportOOMError
();
if
(
VIR_ALLOC
(
*
parsedUri
)
<
0
)
return
-
1
;
}
for
(
i
=
0
;
i
<
uri
->
paramsCount
;
i
++
)
{
virURIParamPtr
queryParam
=
&
uri
->
params
[
i
];
...
...
src/hyperv/hyperv_wmi.c
浏览文件 @
1f2bf483
...
...
@@ -210,10 +210,8 @@ hypervEnumAndPull(hypervPrivate *priv, virBufferPtr query, const char *root,
goto
cleanup
;
}
if
(
VIR_ALLOC
(
object
)
<
0
)
{
virReportOOMError
();
if
(
VIR_ALLOC
(
object
)
<
0
)
goto
cleanup
;
}
object
->
serializerInfo
=
serializerInfo
;
object
->
data
=
data
;
...
...
@@ -414,10 +412,8 @@ hypervInvokeMsvmComputerSystemRequestStateChange(virDomainPtr domain,
if
(
virAsprintf
(
&
selector
,
"Name=%s&CreationClassName=Msvm_ComputerSystem"
,
uuid_string
)
<
0
||
virAsprintf
(
&
properties
,
"RequestedState=%d"
,
requestedState
)
<
0
)
{
virReportOOMError
();
virAsprintf
(
&
properties
,
"RequestedState=%d"
,
requestedState
)
<
0
)
goto
cleanup
;
}
options
=
wsmc_options_init
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录