Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
7b2014a6
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看板
提交
7b2014a6
编写于
5月 21, 2013
作者:
O
Osier Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
src/xenxs: Remove the whitespace before ';'
上级
7fba1f7c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
18 deletion
+18
-18
src/xenxs/xen_sxpr.c
src/xenxs/xen_sxpr.c
+10
-10
src/xenxs/xen_xm.c
src/xenxs/xen_xm.c
+8
-8
未找到文件。
src/xenxs/xen_sxpr.c
浏览文件 @
7b2014a6
...
...
@@ -676,7 +676,7 @@ xenParseSxprSound(virDomainDefPtr def,
goto
no_memory
;
for
(
i
=
0
;
i
<
(
VIR_DOMAIN_SOUND_MODEL_ES1370
+
1
)
;
i
++
)
{
for
(
i
=
0
;
i
<
(
VIR_DOMAIN_SOUND_MODEL_ES1370
+
1
)
;
i
++
)
{
virDomainSoundDefPtr
sound
;
if
(
VIR_ALLOC
(
sound
)
<
0
)
goto
no_memory
;
...
...
@@ -1387,7 +1387,7 @@ xenParseSxpr(const struct sexpr *root,
if
(
hvm
)
{
const
char
*
const
fds
[]
=
{
"fda"
,
"fdb"
};
int
i
;
for
(
i
=
0
;
i
<
ARRAY_CARDINALITY
(
fds
)
;
i
++
)
{
for
(
i
=
0
;
i
<
ARRAY_CARDINALITY
(
fds
)
;
i
++
)
{
tmp
=
sexpr_fmt_node
(
root
,
"domain/image/hvm/%s"
,
fds
[
i
]);
if
((
tmp
!=
NULL
)
&&
(
tmp
[
0
]
!=
0
))
{
virDomainDiskDefPtr
disk
;
...
...
@@ -2101,7 +2101,7 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
int
hasPCI
=
0
;
int
i
;
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
if
(
def
->
hostdevs
[
i
]
->
mode
==
VIR_DOMAIN_HOSTDEV_MODE_SUBSYS
&&
def
->
hostdevs
[
i
]
->
source
.
subsys
.
type
==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI
)
hasPCI
=
1
;
...
...
@@ -2124,7 +2124,7 @@ xenFormatSxprAllPCI(virDomainDefPtr def,
*/
virBufferAddLit
(
buf
,
"(device (pci "
);
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
{
if
(
def
->
hostdevs
[
i
]
->
mode
==
VIR_DOMAIN_HOSTDEV_MODE_SUBSYS
&&
def
->
hostdevs
[
i
]
->
source
.
subsys
.
type
==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI
)
{
if
(
def
->
hostdevs
[
i
]
->
managed
)
{
...
...
@@ -2158,7 +2158,7 @@ xenFormatSxprSound(virDomainDefPtr def,
const
char
*
str
;
int
i
;
for
(
i
=
0
;
i
<
def
->
nsounds
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
nsounds
;
i
++
)
{
if
(
!
(
str
=
virDomainSoundModelTypeToString
(
def
->
sounds
[
i
]
->
model
)))
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
_
(
"unexpected sound model %d"
),
...
...
@@ -2333,7 +2333,7 @@ xenFormatSxpr(virConnectPtr conn,
virBufferAsprintf
(
&
buf
,
"(vcpu_avail %lu)"
,
(
1UL
<<
def
->
vcpus
)
-
1
);
for
(
i
=
0
;
i
<
def
->
os
.
nBootDevs
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
os
.
nBootDevs
;
i
++
)
{
switch
(
def
->
os
.
bootDevs
[
i
])
{
case
VIR_DOMAIN_BOOT_FLOPPY
:
bootorder
[
i
]
=
'a'
;
...
...
@@ -2359,7 +2359,7 @@ xenFormatSxpr(virConnectPtr conn,
virBufferAsprintf
(
&
buf
,
"(boot %s)"
,
bootorder
);
/* some disk devices are defined here */
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
{
switch
(
def
->
disks
[
i
]
->
device
)
{
case
VIR_DOMAIN_DISK_DEVICE_CDROM
:
/* Only xend <= 3.0.2 wants cdrom config here */
...
...
@@ -2397,7 +2397,7 @@ xenFormatSxpr(virConnectPtr conn,
virBufferAddLit
(
&
buf
,
"(usb 1)"
);
for
(
i
=
0
;
i
<
def
->
ninputs
;
i
++
)
for
(
i
=
0
;
i
<
def
->
ninputs
;
i
++
)
if
(
xenFormatSxprInput
(
def
->
inputs
[
i
],
&
buf
)
<
0
)
goto
error
;
...
...
@@ -2571,12 +2571,12 @@ xenFormatSxpr(virConnectPtr conn,
virBufferAsprintf
(
&
buf
,
"(localtime %d)"
,
vmlocaltime
);
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
if
(
xenFormatSxprDisk
(
def
->
disks
[
i
],
&
buf
,
hvm
,
xendConfigVersion
,
0
)
<
0
)
goto
error
;
for
(
i
=
0
;
i
<
def
->
nnets
;
i
++
)
for
(
i
=
0
;
i
<
def
->
nnets
;
i
++
)
if
(
xenFormatSxprNet
(
conn
,
def
->
nets
[
i
],
&
buf
,
hvm
,
xendConfigVersion
,
0
)
<
0
)
goto
error
;
...
...
src/xenxs/xen_xm.c
浏览文件 @
7b2014a6
...
...
@@ -319,7 +319,7 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
if
(
xenXMConfigGetString
(
conf
,
"boot"
,
&
boot
,
"c"
)
<
0
)
goto
cleanup
;
for
(
i
=
0
;
i
<
VIR_DOMAIN_BOOT_LAST
&&
boot
[
i
]
;
i
++
)
{
for
(
i
=
0
;
i
<
VIR_DOMAIN_BOOT_LAST
&&
boot
[
i
]
;
i
++
)
{
switch
(
*
boot
)
{
case
'a'
:
def
->
os
.
bootDevs
[
i
]
=
VIR_DOMAIN_BOOT_FLOPPY
;
...
...
@@ -1448,7 +1448,7 @@ xenFormatXMPCI(virConfPtr conf,
int
hasPCI
=
0
;
int
i
;
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
if
(
def
->
hostdevs
[
i
]
->
mode
==
VIR_DOMAIN_HOSTDEV_MODE_SUBSYS
&&
def
->
hostdevs
[
i
]
->
source
.
subsys
.
type
==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI
)
hasPCI
=
1
;
...
...
@@ -1464,7 +1464,7 @@ xenFormatXMPCI(virConfPtr conf,
pciVal
->
type
=
VIR_CONF_LIST
;
pciVal
->
list
=
NULL
;
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
nhostdevs
;
i
++
)
{
if
(
def
->
hostdevs
[
i
]
->
mode
==
VIR_DOMAIN_HOSTDEV_MODE_SUBSYS
&&
def
->
hostdevs
[
i
]
->
source
.
subsys
.
type
==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_PCI
)
{
virConfValuePtr
val
,
tmp
;
...
...
@@ -1575,7 +1575,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
xenXMConfigSetString
(
conf
,
"kernel"
,
def
->
os
.
loader
)
<
0
)
goto
no_memory
;
for
(
i
=
0
;
i
<
def
->
os
.
nBootDevs
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
os
.
nBootDevs
;
i
++
)
{
switch
(
def
->
os
.
bootDevs
[
i
])
{
case
VIR_DOMAIN_BOOT_FLOPPY
:
boot
[
i
]
=
'a'
;
...
...
@@ -1637,7 +1637,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
}
if
(
xendConfigVersion
==
XEND_CONFIG_VERSION_3_0_2
)
{
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
{
if
(
def
->
disks
[
i
]
->
device
==
VIR_DOMAIN_DISK_DEVICE_CDROM
&&
def
->
disks
[
i
]
->
dst
&&
STREQ
(
def
->
disks
[
i
]
->
dst
,
"hdc"
)
&&
...
...
@@ -1774,7 +1774,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
xenXMConfigSetString
(
conf
,
"device_model"
,
def
->
emulator
)
<
0
)
goto
no_memory
;
for
(
i
=
0
;
i
<
def
->
ninputs
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
ninputs
;
i
++
)
{
if
(
def
->
inputs
[
i
]
->
bus
==
VIR_DOMAIN_INPUT_BUS_USB
)
{
if
(
xenXMConfigSetInt
(
conf
,
"usb"
,
1
)
<
0
)
goto
no_memory
;
...
...
@@ -1894,7 +1894,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
diskVal
->
type
=
VIR_CONF_LIST
;
diskVal
->
list
=
NULL
;
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
ndisks
;
i
++
)
{
if
(
xendConfigVersion
==
XEND_CONFIG_VERSION_3_0_2
&&
def
->
disks
[
i
]
->
device
==
VIR_DOMAIN_DISK_DEVICE_CDROM
&&
def
->
disks
[
i
]
->
dst
&&
...
...
@@ -1921,7 +1921,7 @@ virConfPtr xenFormatXM(virConnectPtr conn,
netVal
->
type
=
VIR_CONF_LIST
;
netVal
->
list
=
NULL
;
for
(
i
=
0
;
i
<
def
->
nnets
;
i
++
)
{
for
(
i
=
0
;
i
<
def
->
nnets
;
i
++
)
{
if
(
xenFormatXMNet
(
conn
,
netVal
,
def
->
nets
[
i
],
hvm
,
xendConfigVersion
)
<
0
)
goto
cleanup
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录