Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
b0b85c45
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看板
提交
b0b85c45
编写于
7月 08, 2011
作者:
M
Michael Santos
提交者:
Eric Blake
7月 08, 2011
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: clean up OOM checks
上级
8e2e4780
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
21 addition
and
20 deletion
+21
-20
AUTHORS
AUTHORS
+1
-0
src/qemu/qemu_command.c
src/qemu/qemu_command.c
+20
-20
未找到文件。
AUTHORS
浏览文件 @
b0b85c45
...
@@ -182,6 +182,7 @@ Patches have also been contributed by:
...
@@ -182,6 +182,7 @@ Patches have also been contributed by:
Scott Moser <smoser@ubuntu.com>
Scott Moser <smoser@ubuntu.com>
Guannan Ren <gren@redhat.com>
Guannan Ren <gren@redhat.com>
John Williams <john.williams@petalogix.com>
John Williams <john.williams@petalogix.com>
Michael Santos <michael.santos@gmail.com>
[....send patches to get your name here....]
[....send patches to get your name here....]
...
...
src/qemu/qemu_command.c
浏览文件 @
b0b85c45
...
@@ -5712,6 +5712,9 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
...
@@ -5712,6 +5712,9 @@ qemuParseCommandLineCPU(virDomainDefPtr dom,
else
else
feature
=
strdup
(
p
);
feature
=
strdup
(
p
);
if
(
!
feature
)
goto
no_memory
;
ret
=
virCPUDefAddFeature
(
cpu
,
feature
,
policy
);
ret
=
virCPUDefAddFeature
(
cpu
,
feature
,
policy
);
VIR_FREE
(
feature
);
VIR_FREE
(
feature
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
@@ -6028,6 +6031,8 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
...
@@ -6028,6 +6031,8 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
if
(
STREQ
(
arg
,
"-cdrom"
))
{
if
(
STREQ
(
arg
,
"-cdrom"
))
{
disk
->
device
=
VIR_DOMAIN_DISK_DEVICE_CDROM
;
disk
->
device
=
VIR_DOMAIN_DISK_DEVICE_CDROM
;
disk
->
dst
=
strdup
(
"hdc"
);
disk
->
dst
=
strdup
(
"hdc"
);
if
(
!
disk
->
dst
)
goto
no_memory
;
disk
->
readonly
=
1
;
disk
->
readonly
=
1
;
}
else
{
}
else
{
if
(
STRPREFIX
(
arg
,
"-fd"
))
{
if
(
STRPREFIX
(
arg
,
"-fd"
))
{
...
@@ -6041,8 +6046,12 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
...
@@ -6041,8 +6046,12 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
disk
->
bus
=
VIR_DOMAIN_DISK_BUS_SCSI
;
disk
->
bus
=
VIR_DOMAIN_DISK_BUS_SCSI
;
}
}
disk
->
dst
=
strdup
(
arg
+
1
);
disk
->
dst
=
strdup
(
arg
+
1
);
if
(
!
disk
->
dst
)
goto
no_memory
;
}
}
disk
->
src
=
strdup
(
val
);
disk
->
src
=
strdup
(
val
);
if
(
!
disk
->
src
)
goto
no_memory
;
if
(
disk
->
type
==
VIR_DOMAIN_DISK_TYPE_NETWORK
)
{
if
(
disk
->
type
==
VIR_DOMAIN_DISK_TYPE_NETWORK
)
{
char
*
host
,
*
port
;
char
*
host
,
*
port
;
...
@@ -6058,17 +6067,14 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
...
@@ -6058,17 +6067,14 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
goto
error
;
goto
error
;
}
}
*
port
++
=
'\0'
;
*
port
++
=
'\0'
;
if
(
VIR_ALLOC
(
disk
->
hosts
)
<
0
)
{
if
(
VIR_ALLOC
(
disk
->
hosts
)
<
0
)
virReportOOMError
();
goto
no_memory
;
goto
error
;
}
disk
->
nhosts
=
1
;
disk
->
nhosts
=
1
;
disk
->
hosts
->
name
=
host
;
disk
->
hosts
->
name
=
host
;
disk
->
hosts
->
port
=
strdup
(
port
);
disk
->
hosts
->
port
=
strdup
(
port
);
if
(
!
disk
->
hosts
->
port
)
{
if
(
!
disk
->
hosts
->
port
)
virReportOOMError
();
goto
no_memory
;
goto
error
;
VIR_FREE
(
disk
->
src
);
}
disk
->
src
=
NULL
;
disk
->
src
=
NULL
;
break
;
break
;
case
VIR_DOMAIN_DISK_PROTOCOL_RBD
:
case
VIR_DOMAIN_DISK_PROTOCOL_RBD
:
...
@@ -6088,22 +6094,16 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
...
@@ -6088,22 +6094,16 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
goto
error
;
goto
error
;
}
}
*
vdi
++
=
'\0'
;
*
vdi
++
=
'\0'
;
if
(
VIR_ALLOC
(
disk
->
hosts
)
<
0
)
{
if
(
VIR_ALLOC
(
disk
->
hosts
)
<
0
)
virReportOOMError
();
goto
no_memory
;
goto
error
;
}
disk
->
nhosts
=
1
;
disk
->
nhosts
=
1
;
disk
->
hosts
->
name
=
disk
->
src
;
disk
->
hosts
->
name
=
disk
->
src
;
disk
->
hosts
->
port
=
strdup
(
port
);
disk
->
hosts
->
port
=
strdup
(
port
);
if
(
!
disk
->
hosts
->
port
)
{
if
(
!
disk
->
hosts
->
port
)
virReportOOMError
();
goto
no_memory
;
goto
error
;
}
disk
->
src
=
strdup
(
vdi
);
disk
->
src
=
strdup
(
vdi
);
if
(
!
disk
->
src
)
{
if
(
!
disk
->
src
)
virReportOOMError
();
goto
no_memory
;
goto
error
;
}
}
}
break
;
break
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录