Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
e9e37538
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看板
提交
e9e37538
编写于
4月 10, 2013
作者:
O
Osier Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cleanup: Change datatype of disk->readonly to boolean
上级
71dae03f
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
16 deletion
+16
-16
src/conf/domain_conf.c
src/conf/domain_conf.c
+2
-2
src/conf/domain_conf.h
src/conf/domain_conf.h
+1
-1
src/qemu/qemu_command.c
src/qemu/qemu_command.c
+3
-3
src/vbox/vbox_tmpl.c
src/vbox/vbox_tmpl.c
+6
-6
src/xenxs/xen_sxpr.c
src/xenxs/xen_sxpr.c
+2
-2
src/xenxs/xen_xm.c
src/xenxs/xen_xm.c
+2
-2
未找到文件。
src/conf/domain_conf.c
浏览文件 @
e9e37538
...
...
@@ -4637,7 +4637,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
goto error;
}
} else if (xmlStrEqual(cur->name, BAD_CAST "readonly")) {
def->readonly =
1
;
def->readonly =
true
;
} else if (xmlStrEqual(cur->name, BAD_CAST "shareable")) {
def->shared = true;
} else if (xmlStrEqual(cur->name, BAD_CAST "transient")) {
...
...
@@ -4765,7 +4765,7 @@ virDomainDiskDefParseXML(virDomainXMLOptionPtr xmlopt,
/* Force CDROM to be listed as read only */
if (def->device == VIR_DOMAIN_DISK_DEVICE_CDROM)
def->readonly =
1
;
def->readonly =
true
;
if ((def->device == VIR_DOMAIN_DISK_DEVICE_DISK ||
def->device == VIR_DOMAIN_DISK_DEVICE_LUN) &&
...
...
src/conf/domain_conf.h
浏览文件 @
e9e37538
...
...
@@ -674,7 +674,7 @@ struct _virDomainDiskDef {
int
copy_on_read
;
int
snapshot
;
/* enum virDomainSnapshotLocation, snapshot_conf.h */
int
startupPolicy
;
/* enum virDomainStartupPolicy */
unsigned
int
readonly
:
1
;
bool
readonly
;
bool
shared
;
bool
transient
;
virDomainDeviceInfo
info
;
...
...
src/qemu/qemu_command.c
浏览文件 @
e9e37538
...
...
@@ -8137,7 +8137,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
}
else
if
(
STREQ
(
keywords
[
i
],
"media"
))
{
if
(
STREQ
(
values
[
i
],
"cdrom"
))
{
def
->
device
=
VIR_DOMAIN_DISK_DEVICE_CDROM
;
def
->
readonly
=
1
;
def
->
readonly
=
true
;
}
else
if
(
STREQ
(
values
[
i
],
"floppy"
))
def
->
device
=
VIR_DOMAIN_DISK_DEVICE_FLOPPY
;
}
else
if
(
STREQ
(
keywords
[
i
],
"format"
))
{
...
...
@@ -8196,7 +8196,7 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
}
}
else
if
(
STREQ
(
keywords
[
i
],
"readonly"
))
{
if
((
values
[
i
]
==
NULL
)
||
STREQ
(
values
[
i
],
"on"
))
def
->
readonly
=
1
;
def
->
readonly
=
true
;
}
else
if
(
STREQ
(
keywords
[
i
],
"aio"
))
{
if
((
def
->
iomode
=
virDomainDiskIoTypeFromString
(
values
[
i
]))
<
0
)
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
...
...
@@ -9303,7 +9303,7 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr qemuCaps,
disk
->
dst
=
strdup
(
"hdc"
);
if
(
!
disk
->
dst
)
goto
no_memory
;
disk
->
readonly
=
1
;
disk
->
readonly
=
true
;
}
else
{
if
(
STRPREFIX
(
arg
,
"-fd"
))
{
disk
->
device
=
VIR_DOMAIN_DISK_DEVICE_FLOPPY
;
...
...
src/vbox/vbox_tmpl.c
浏览文件 @
e9e37538
...
...
@@ -2647,7 +2647,7 @@ static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) {
hardDiskPM
->
vtbl
->
GetType
(
hardDiskPM
,
&
hddType
);
if
(
hddType
==
HardDiskType_Immutable
)
def
->
disks
[
hddNum
]
->
readonly
=
1
;
def
->
disks
[
hddNum
]
->
readonly
=
true
;
def
->
disks
[
hddNum
]
->
src
=
strdup
(
hddlocation
);
def
->
disks
[
hddNum
]
->
dst
=
strdup
(
"hda"
);
hddNum
++
;
...
...
@@ -2668,7 +2668,7 @@ static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) {
hardDiskPS
->
vtbl
->
GetType
(
hardDiskPS
,
&
hddType
);
if
(
hddType
==
HardDiskType_Immutable
)
def
->
disks
[
hddNum
]
->
readonly
=
1
;
def
->
disks
[
hddNum
]
->
readonly
=
true
;
def
->
disks
[
hddNum
]
->
src
=
strdup
(
hddlocation
);
def
->
disks
[
hddNum
]
->
dst
=
strdup
(
"hdb"
);
hddNum
++
;
...
...
@@ -2689,7 +2689,7 @@ static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) {
hardDiskSS
->
vtbl
->
GetType
(
hardDiskSS
,
&
hddType
);
if
(
hddType
==
HardDiskType_Immutable
)
def
->
disks
[
hddNum
]
->
readonly
=
1
;
def
->
disks
[
hddNum
]
->
readonly
=
true
;
def
->
disks
[
hddNum
]
->
src
=
strdup
(
hddlocation
);
def
->
disks
[
hddNum
]
->
dst
=
strdup
(
"hdd"
);
hddNum
++
;
...
...
@@ -2830,7 +2830,7 @@ static char *vboxDomainGetXMLDesc(virDomainPtr dom, unsigned int flags) {
medium
->
vtbl
->
GetReadOnly
(
medium
,
&
readOnly
);
if
(
readOnly
==
PR_TRUE
)
def
->
disks
[
diskCount
]
->
readonly
=
1
;
def
->
disks
[
diskCount
]
->
readonly
=
true
;
def
->
disks
[
diskCount
]
->
type
=
VIR_DOMAIN_DISK_TYPE_FILE
;
...
...
@@ -3118,7 +3118,7 @@ sharedFoldersCleanup:
def
->
disks
[
def
->
ndisks
-
1
]
->
device
=
VIR_DOMAIN_DISK_DEVICE_CDROM
;
def
->
disks
[
def
->
ndisks
-
1
]
->
bus
=
VIR_DOMAIN_DISK_BUS_IDE
;
def
->
disks
[
def
->
ndisks
-
1
]
->
type
=
VIR_DOMAIN_DISK_TYPE_FILE
;
def
->
disks
[
def
->
ndisks
-
1
]
->
readonly
=
1
;
def
->
disks
[
def
->
ndisks
-
1
]
->
readonly
=
true
;
def
->
disks
[
def
->
ndisks
-
1
]
->
src
=
strdup
(
location
);
def
->
disks
[
def
->
ndisks
-
1
]
->
dst
=
strdup
(
"hdc"
);
}
else
{
...
...
@@ -3165,7 +3165,7 @@ sharedFoldersCleanup:
def
->
disks
[
def
->
ndisks
-
1
]
->
device
=
VIR_DOMAIN_DISK_DEVICE_FLOPPY
;
def
->
disks
[
def
->
ndisks
-
1
]
->
bus
=
VIR_DOMAIN_DISK_BUS_FDC
;
def
->
disks
[
def
->
ndisks
-
1
]
->
type
=
VIR_DOMAIN_DISK_TYPE_FILE
;
def
->
disks
[
def
->
ndisks
-
1
]
->
readonly
=
0
;
def
->
disks
[
def
->
ndisks
-
1
]
->
readonly
=
false
;
def
->
disks
[
def
->
ndisks
-
1
]
->
src
=
strdup
(
location
);
def
->
disks
[
def
->
ndisks
-
1
]
->
dst
=
strdup
(
"fda"
);
}
else
{
...
...
src/xenxs/xen_sxpr.c
浏览文件 @
e9e37538
...
...
@@ -506,7 +506,7 @@ xenParseSxprDisks(virDomainDefPtr def,
if
(
mode
&&
strchr
(
mode
,
'r'
))
disk
->
readonly
=
1
;
disk
->
readonly
=
true
;
if
(
mode
&&
strchr
(
mode
,
'!'
))
disk
->
shared
=
true
;
...
...
@@ -1371,7 +1371,7 @@ xenParseSxpr(const struct sexpr *root,
goto
no_memory
;
}
disk
->
bus
=
VIR_DOMAIN_DISK_BUS_IDE
;
disk
->
readonly
=
1
;
disk
->
readonly
=
true
;
if
(
VIR_REALLOC_N
(
def
->
disks
,
def
->
ndisks
+
1
)
<
0
)
{
virDomainDiskDefFree
(
disk
);
...
...
src/xenxs/xen_xm.c
浏览文件 @
e9e37538
...
...
@@ -610,7 +610,7 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
if
(
STREQ
(
head
,
"r"
)
||
STREQ
(
head
,
"ro"
))
disk
->
readonly
=
1
;
disk
->
readonly
=
true
;
else
if
((
STREQ
(
head
,
"w!"
))
||
(
STREQ
(
head
,
"!"
)))
disk
->
shared
=
true
;
...
...
@@ -643,7 +643,7 @@ xenParseXM(virConfPtr conf, int xendConfigVersion,
if
(
!
(
disk
->
dst
=
strdup
(
"hdc"
)))
goto
no_memory
;
disk
->
bus
=
VIR_DOMAIN_DISK_BUS_IDE
;
disk
->
readonly
=
1
;
disk
->
readonly
=
true
;
if
(
VIR_REALLOC_N
(
def
->
disks
,
def
->
ndisks
+
1
)
<
0
)
goto
no_memory
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录