Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
4a22990d
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,发现更多精彩内容 >>
提交
4a22990d
编写于
5月 03, 2013
作者:
M
Michal Privoznik
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Adapt to VIR_STRDUP and VIR_STRNDUP in src/uml/*
上级
296d319f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
8 addition
and
12 deletion
+8
-12
src/uml/uml_conf.c
src/uml/uml_conf.c
+4
-6
src/uml/uml_driver.c
src/uml/uml_driver.c
+4
-6
未找到文件。
src/uml/uml_conf.c
浏览文件 @
4a22990d
...
...
@@ -114,8 +114,8 @@ umlConnectTapDevice(virConnectPtr conn,
STRPREFIX
(
net
->
ifname
,
VIR_NET_GENERATED_PREFIX
)
||
strchr
(
net
->
ifname
,
'%'
))
{
VIR_FREE
(
net
->
ifname
);
if
(
!
(
net
->
ifname
=
strdup
(
VIR_NET_GENERATED_PREFIX
"%d"
))
)
goto
no_memory
;
if
(
VIR_STRDUP
(
net
->
ifname
,
VIR_NET_GENERATED_PREFIX
"%d"
)
<
0
)
goto
error
;
/* avoid exposing vnet%d in getXMLDesc or error outputs */
template_ifname
=
true
;
}
...
...
@@ -141,8 +141,6 @@ umlConnectTapDevice(virConnectPtr conn,
return
0
;
no_memory:
virReportOOMError
();
error:
return
-
1
;
}
...
...
@@ -463,8 +461,8 @@ virCommandPtr umlBuildCommandLine(virConnectPtr conn,
if
(
vm
->
def
->
os
.
cmdline
)
{
char
*
args
,
*
next_arg
;
char
*
cmdline
;
if
(
(
cmdline
=
strdup
(
vm
->
def
->
os
.
cmdline
))
==
NULL
)
goto
no_memory
;
if
(
VIR_STRDUP
(
cmdline
,
vm
->
def
->
os
.
cmdline
)
<
0
)
goto
error
;
args
=
cmdline
;
while
(
*
args
==
' '
)
...
...
src/uml/uml_driver.c
浏览文件 @
4a22990d
...
...
@@ -248,8 +248,7 @@ requery:
if
(
res
&&
STRPREFIX
(
res
,
"pts:"
))
{
VIR_FREE
(
def
->
source
.
data
.
file
.
path
);
if
((
def
->
source
.
data
.
file
.
path
=
strdup
(
res
+
4
))
==
NULL
)
{
virReportOOMError
();
if
(
VIR_STRDUP
(
def
->
source
.
data
.
file
.
path
,
res
+
4
)
<
0
)
{
VIR_FREE
(
res
);
VIR_FREE
(
cmd
);
return
-
1
;
...
...
@@ -491,8 +490,8 @@ umlStateInitialize(bool privileged,
"%s/log/libvirt/uml"
,
LOCALSTATEDIR
)
==
-
1
)
goto
out_of_memory
;
if
(
(
base
=
strdup
(
SYSCONFDIR
"/libvirt"
))
==
NULL
)
goto
out_of_memory
;
if
(
VIR_STRDUP
(
base
,
SYSCONFDIR
"/libvirt"
)
<
0
)
goto
error
;
if
(
virAsprintf
(
&
uml_driver
->
monitorDir
,
"%s/run/libvirt/uml-guest"
,
LOCALSTATEDIR
)
==
-
1
)
...
...
@@ -1672,8 +1671,7 @@ static char *umlDomainGetOSType(virDomainPtr dom) {
goto
cleanup
;
}
if
(
!
(
type
=
strdup
(
vm
->
def
->
os
.
type
)))
virReportOOMError
();
ignore_value
(
VIR_STRDUP
(
type
,
vm
->
def
->
os
.
type
));
cleanup:
if
(
vm
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录