Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
46971d5e
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看板
提交
46971d5e
编写于
1月 08, 2009
作者:
G
Guido Günther
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
pass flags argument to all virDomain*DefParse* functions
上级
88053456
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
113 addition
and
51 deletion
+113
-51
ChangeLog
ChangeLog
+21
-0
src/domain_conf.c
src/domain_conf.c
+49
-28
src/domain_conf.h
src/domain_conf.h
+4
-2
src/lxc_driver.c
src/lxc_driver.c
+4
-2
src/openvz_driver.c
src/openvz_driver.c
+4
-2
src/qemu_driver.c
src/qemu_driver.c
+12
-8
src/test.c
src/test.c
+9
-4
src/uml_driver.c
src/uml_driver.c
+4
-2
src/xend_internal.c
src/xend_internal.c
+4
-2
tests/qemuxml2xmltest.c
tests/qemuxml2xmltest.c
+2
-1
未找到文件。
ChangeLog
浏览文件 @
46971d5e
Thu Jan 8 14:41:55 CET 2009 Guido Günther <agx@sigxcpu.org>
pass flags argument to all virDomain*DefParse* functions
* src/domain_conf.c (virDomainDiskDefParseXML,
virDomainFSDefParseXML, virDomainNetDefParseXML,
virDomainChrDefParseXML, virDomainSoundDefParseXML,
virDomainHostdevSubsysUsbDefParseXML, virDomainHostdevDefParseXML,
virDomainDefParseString): Add and pass on flags argument
* src/domain_conf.h (virDomainDeviceDefParse,
virDomainDefParseString): Add flags argument
* src/lxc_driver.c (lxcDomainDefine): Pass VIR_DOMAIN_XML_INACTIVE
* src/openvz_driver.c (openvzDomainDefineXML): Likewise
* src/qemu_driver.c (qemudDomainCreate, qemudDomainRestore,
qemudDomainDefine, qemudDomainAttachDevice): Likewise
* src/test.c (testOpenDefault, testDomainCreateXML, testDomainRestore,
testDomainDefineXML): Likewise
* src/uml_driver.c (umlDomainCreate, umlDomainDefine): Likewise
* src/xend_internal.c (xenDaemonCreateXML, xenDaemonDomainCreateXML):
Likewise
* tests/qemuxml2xmltest.c (testCompareXMLToXMLFiles): Likewise
Thu Jan 8 09:48:04 CET 2009 Daniel P. Berrange <berrange@redhat.com>
poll: don't return uninitialized
...
...
src/domain_conf.c
浏览文件 @
46971d5e
...
...
@@ -534,7 +534,8 @@ int virDomainDiskCompare(virDomainDiskDefPtr a,
*/
static
virDomainDiskDefPtr
virDomainDiskDefParseXML
(
virConnectPtr
conn
,
xmlNodePtr
node
)
{
xmlNodePtr
node
,
int
flags
ATTRIBUTE_UNUSED
)
{
virDomainDiskDefPtr
def
;
xmlNodePtr
cur
;
char
*
type
=
NULL
;
...
...
@@ -721,7 +722,8 @@ cleanup:
*/
static
virDomainFSDefPtr
virDomainFSDefParseXML
(
virConnectPtr
conn
,
xmlNodePtr
node
)
{
xmlNodePtr
node
,
int
flags
ATTRIBUTE_UNUSED
)
{
virDomainFSDefPtr
def
;
xmlNodePtr
cur
;
char
*
type
=
NULL
;
...
...
@@ -807,7 +809,8 @@ cleanup:
static
virDomainNetDefPtr
virDomainNetDefParseXML
(
virConnectPtr
conn
,
virCapsPtr
caps
,
xmlNodePtr
node
)
{
xmlNodePtr
node
,
int
flags
ATTRIBUTE_UNUSED
)
{
virDomainNetDefPtr
def
;
xmlNodePtr
cur
;
char
*
macaddr
=
NULL
;
...
...
@@ -1038,7 +1041,8 @@ error:
*/
static
virDomainChrDefPtr
virDomainChrDefParseXML
(
virConnectPtr
conn
,
xmlNodePtr
node
)
{
xmlNodePtr
node
,
int
flags
ATTRIBUTE_UNUSED
)
{
xmlNodePtr
cur
;
char
*
type
=
NULL
;
char
*
bindHost
=
NULL
;
...
...
@@ -1257,7 +1261,8 @@ error:
static
virDomainInputDefPtr
virDomainInputDefParseXML
(
virConnectPtr
conn
,
const
char
*
ostype
,
xmlNodePtr
node
)
{
xmlNodePtr
node
,
int
flags
ATTRIBUTE_UNUSED
)
{
virDomainInputDefPtr
def
;
char
*
type
=
NULL
;
char
*
bus
=
NULL
;
...
...
@@ -1436,7 +1441,8 @@ error:
static
virDomainSoundDefPtr
virDomainSoundDefParseXML
(
virConnectPtr
conn
,
const
xmlNodePtr
node
)
{
const
xmlNodePtr
node
,
int
flags
ATTRIBUTE_UNUSED
)
{
char
*
model
;
virDomainSoundDefPtr
def
;
...
...
@@ -1467,7 +1473,8 @@ error:
static
int
virDomainHostdevSubsysUsbDefParseXML
(
virConnectPtr
conn
,
const
xmlNodePtr
node
,
virDomainHostdevDefPtr
def
)
{
virDomainHostdevDefPtr
def
,
int
flags
ATTRIBUTE_UNUSED
)
{
int
ret
=
-
1
;
xmlNodePtr
cur
;
...
...
@@ -1667,7 +1674,8 @@ out:
static
virDomainHostdevDefPtr
virDomainHostdevDefParseXML
(
virConnectPtr
conn
,
const
xmlNodePtr
node
)
{
const
xmlNodePtr
node
,
int
flags
)
{
xmlNodePtr
cur
;
virDomainHostdevDefPtr
def
;
...
...
@@ -1709,7 +1717,8 @@ virDomainHostdevDefParseXML(virConnectPtr conn,
if
(
xmlStrEqual
(
cur
->
name
,
BAD_CAST
"source"
))
{
if
(
def
->
mode
==
VIR_DOMAIN_HOSTDEV_MODE_SUBSYS
&&
def
->
source
.
subsys
.
type
==
VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_USB
)
{
if
(
virDomainHostdevSubsysUsbDefParseXML
(
conn
,
cur
,
def
)
<
0
)
if
(
virDomainHostdevSubsysUsbDefParseXML
(
conn
,
cur
,
def
,
flags
)
<
0
)
goto
error
;
}
if
(
def
->
mode
==
VIR_DOMAIN_HOSTDEV_MODE_SUBSYS
&&
...
...
@@ -1763,7 +1772,8 @@ static int virDomainLifecycleParseXML(virConnectPtr conn,
virDomainDeviceDefPtr
virDomainDeviceDefParse
(
virConnectPtr
conn
,
virCapsPtr
caps
,
const
virDomainDefPtr
def
,
const
char
*
xmlStr
)
const
char
*
xmlStr
,
int
flags
)
{
xmlDocPtr
xml
;
xmlNodePtr
node
;
...
...
@@ -1790,27 +1800,28 @@ virDomainDeviceDefPtr virDomainDeviceDefParse(virConnectPtr conn,
if
(
xmlStrEqual
(
node
->
name
,
BAD_CAST
"disk"
))
{
dev
->
type
=
VIR_DOMAIN_DEVICE_DISK
;
if
(
!
(
dev
->
data
.
disk
=
virDomainDiskDefParseXML
(
conn
,
node
)))
if
(
!
(
dev
->
data
.
disk
=
virDomainDiskDefParseXML
(
conn
,
node
,
flags
)))
goto
error
;
}
else
if
(
xmlStrEqual
(
node
->
name
,
BAD_CAST
"filesystem"
))
{
dev
->
type
=
VIR_DOMAIN_DEVICE_FS
;
if
(
!
(
dev
->
data
.
fs
=
virDomainFSDefParseXML
(
conn
,
node
)))
if
(
!
(
dev
->
data
.
fs
=
virDomainFSDefParseXML
(
conn
,
node
,
flags
)))
goto
error
;
}
else
if
(
xmlStrEqual
(
node
->
name
,
BAD_CAST
"interface"
))
{
dev
->
type
=
VIR_DOMAIN_DEVICE_NET
;
if
(
!
(
dev
->
data
.
net
=
virDomainNetDefParseXML
(
conn
,
caps
,
node
)))
if
(
!
(
dev
->
data
.
net
=
virDomainNetDefParseXML
(
conn
,
caps
,
node
,
flags
)))
goto
error
;
}
else
if
(
xmlStrEqual
(
node
->
name
,
BAD_CAST
"input"
))
{
dev
->
type
=
VIR_DOMAIN_DEVICE_INPUT
;
if
(
!
(
dev
->
data
.
input
=
virDomainInputDefParseXML
(
conn
,
def
->
os
.
type
,
node
)))
if
(
!
(
dev
->
data
.
input
=
virDomainInputDefParseXML
(
conn
,
def
->
os
.
type
,
node
,
flags
)))
goto
error
;
}
else
if
(
xmlStrEqual
(
node
->
name
,
BAD_CAST
"sound"
))
{
dev
->
type
=
VIR_DOMAIN_DEVICE_SOUND
;
if
(
!
(
dev
->
data
.
sound
=
virDomainSoundDefParseXML
(
conn
,
node
)))
if
(
!
(
dev
->
data
.
sound
=
virDomainSoundDefParseXML
(
conn
,
node
,
flags
)))
goto
error
;
}
else
if
(
xmlStrEqual
(
node
->
name
,
BAD_CAST
"hostdev"
))
{
dev
->
type
=
VIR_DOMAIN_DEVICE_HOSTDEV
;
if
(
!
(
dev
->
data
.
hostdev
=
virDomainHostdevDefParseXML
(
conn
,
node
)))
if
(
!
(
dev
->
data
.
hostdev
=
virDomainHostdevDefParseXML
(
conn
,
node
,
flags
)))
goto
error
;
}
else
{
virDomainReportError
(
conn
,
VIR_ERR_XML_ERROR
,
...
...
@@ -2090,7 +2101,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
goto
no_memory
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virDomainDiskDefPtr
disk
=
virDomainDiskDefParseXML
(
conn
,
nodes
[
i
]);
nodes
[
i
],
flags
);
if
(
!
disk
)
goto
error
;
...
...
@@ -2110,7 +2122,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
goto
no_memory
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virDomainFSDefPtr
fs
=
virDomainFSDefParseXML
(
conn
,
nodes
[
i
]);
nodes
[
i
],
flags
);
if
(
!
fs
)
goto
error
;
...
...
@@ -2129,7 +2142,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virDomainNetDefPtr
net
=
virDomainNetDefParseXML
(
conn
,
caps
,
nodes
[
i
]);
nodes
[
i
],
flags
);
if
(
!
net
)
goto
error
;
...
...
@@ -2149,7 +2163,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virDomainChrDefPtr
chr
=
virDomainChrDefParseXML
(
conn
,
nodes
[
i
]);
nodes
[
i
],
flags
);
if
(
!
chr
)
goto
error
;
...
...
@@ -2168,7 +2183,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virDomainChrDefPtr
chr
=
virDomainChrDefParseXML
(
conn
,
nodes
[
i
]);
nodes
[
i
],
flags
);
if
(
!
chr
)
goto
error
;
...
...
@@ -2179,7 +2195,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
if
((
node
=
virXPathNode
(
conn
,
"./devices/console[1]"
,
ctxt
))
!=
NULL
)
{
virDomainChrDefPtr
chr
=
virDomainChrDefParseXML
(
conn
,
node
);
node
,
flags
);
if
(
!
chr
)
goto
error
;
...
...
@@ -2217,7 +2234,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virDomainInputDefPtr
input
=
virDomainInputDefParseXML
(
conn
,
def
->
os
.
type
,
nodes
[
i
]);
nodes
[
i
],
flags
);
if
(
!
input
)
goto
error
;
...
...
@@ -2292,7 +2310,8 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
for
(
i
=
0
;
i
<
n
;
i
++
)
{
int
collision
=
0
,
j
;
virDomainSoundDefPtr
sound
=
virDomainSoundDefParseXML
(
conn
,
nodes
[
i
]);
nodes
[
i
],
flags
);
if
(
!
sound
)
goto
error
;
...
...
@@ -2319,7 +2338,9 @@ static virDomainDefPtr virDomainDefParseXML(virConnectPtr conn,
if
(
n
&&
VIR_ALLOC_N
(
def
->
hostdevs
,
n
)
<
0
)
goto
no_memory
;
for
(
i
=
0
;
i
<
n
;
i
++
)
{
virDomainHostdevDefPtr
hostdev
=
virDomainHostdevDefParseXML
(
conn
,
nodes
[
i
]);
virDomainHostdevDefPtr
hostdev
=
virDomainHostdevDefParseXML
(
conn
,
nodes
[
i
],
flags
);
if
(
!
hostdev
)
goto
error
;
...
...
@@ -2363,7 +2384,8 @@ catchXMLError (void *ctx, const char *msg ATTRIBUTE_UNUSED, ...)
virDomainDefPtr
virDomainDefParseString
(
virConnectPtr
conn
,
virCapsPtr
caps
,
const
char
*
xmlStr
)
const
char
*
xmlStr
,
int
flags
)
{
xmlParserCtxtPtr
pctxt
;
xmlDocPtr
xml
=
NULL
;
...
...
@@ -2394,8 +2416,7 @@ virDomainDefPtr virDomainDefParseString(virConnectPtr conn,
goto
cleanup
;
}
def
=
virDomainDefParseNode
(
conn
,
caps
,
xml
,
root
,
VIR_DOMAIN_XML_INACTIVE
);
def
=
virDomainDefParseNode
(
conn
,
caps
,
xml
,
root
,
flags
);
cleanup:
xmlFreeParserCtxt
(
pctxt
);
...
...
src/domain_conf.h
浏览文件 @
46971d5e
...
...
@@ -525,10 +525,12 @@ void virDomainRemoveInactive(virDomainObjListPtr doms,
virDomainDeviceDefPtr
virDomainDeviceDefParse
(
virConnectPtr
conn
,
virCapsPtr
caps
,
const
virDomainDefPtr
def
,
const
char
*
xmlStr
);
const
char
*
xmlStr
,
int
flags
);
virDomainDefPtr
virDomainDefParseString
(
virConnectPtr
conn
,
virCapsPtr
caps
,
const
char
*
xmlStr
);
const
char
*
xmlStr
,
int
flags
);
virDomainDefPtr
virDomainDefParseFile
(
virConnectPtr
conn
,
virCapsPtr
caps
,
const
char
*
filename
,
...
...
src/lxc_driver.c
浏览文件 @
46971d5e
...
...
@@ -275,7 +275,8 @@ static virDomainPtr lxcDomainDefine(virConnectPtr conn, const char *xml)
virDomainPtr
dom
=
NULL
;
lxcDriverLock
(
driver
);
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
)))
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
cleanup
;
if
((
def
->
nets
!=
NULL
)
&&
!
(
driver
->
have_netns
))
{
...
...
@@ -1002,7 +1003,8 @@ lxcDomainCreateAndStart(virConnectPtr conn,
virDomainPtr
dom
=
NULL
;
lxcDriverLock
(
driver
);
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
)))
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
cleanup
;
if
((
def
->
nets
!=
NULL
)
&&
!
(
driver
->
have_netns
))
{
...
...
src/openvz_driver.c
浏览文件 @
46971d5e
...
...
@@ -657,7 +657,8 @@ openvzDomainDefineXML(virConnectPtr conn, const char *xml)
prog
[
0
]
=
NULL
;
openvzDriverLock
(
driver
);
if
((
vmdef
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
))
==
NULL
)
if
((
vmdef
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
))
==
NULL
)
goto
cleanup
;
if
(
vmdef
->
os
.
init
==
NULL
&&
...
...
@@ -733,7 +734,8 @@ openvzDomainCreateXML(virConnectPtr conn, const char *xml,
progcreate
[
0
]
=
NULL
;
openvzDriverLock
(
driver
);
if
((
vmdef
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
))
==
NULL
)
if
((
vmdef
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
))
==
NULL
)
goto
cleanup
;
if
(
vmdef
->
os
.
init
==
NULL
&&
...
...
src/qemu_driver.c
浏览文件 @
46971d5e
...
...
@@ -1689,7 +1689,8 @@ static virDomainPtr qemudDomainCreate(virConnectPtr conn, const char *xml,
virDomainEventPtr
event
=
NULL
;
qemuDriverLock
(
driver
);
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
)))
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
cleanup
;
vm
=
virDomainFindByName
(
&
driver
->
domains
,
def
->
name
);
...
...
@@ -2574,7 +2575,8 @@ static int qemudDomainRestore(virConnectPtr conn,
}
/* Create a domain from this XML */
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
)))
{
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
)))
{
qemudReportError
(
conn
,
NULL
,
NULL
,
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"failed to parse XML"
));
goto
cleanup
;
...
...
@@ -2761,7 +2763,8 @@ static virDomainPtr qemudDomainDefine(virConnectPtr conn, const char *xml) {
int
newVM
=
1
;
qemuDriverLock
(
driver
);
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
)))
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
cleanup
;
vm
=
virDomainFindByName
(
&
driver
->
domains
,
def
->
name
);
...
...
@@ -3223,9 +3226,8 @@ static int qemudDomainAttachDevice(virDomainPtr dom,
goto
cleanup
;
}
dev
=
virDomainDeviceDefParse
(
dom
->
conn
,
driver
->
caps
,
vm
->
def
,
xml
);
dev
=
virDomainDeviceDefParse
(
dom
->
conn
,
driver
->
caps
,
vm
->
def
,
xml
,
VIR_DOMAIN_XML_INACTIVE
);
qemuDriverUnlock
(
driver
);
if
(
dev
==
NULL
)
goto
cleanup
;
...
...
@@ -3361,7 +3363,8 @@ static int qemudDomainDetachDevice(virDomainPtr dom,
goto
cleanup
;
}
dev
=
virDomainDeviceDefParse
(
dom
->
conn
,
driver
->
caps
,
vm
->
def
,
xml
);
dev
=
virDomainDeviceDefParse
(
dom
->
conn
,
driver
->
caps
,
vm
->
def
,
xml
,
VIR_DOMAIN_XML_INACTIVE
);
qemuDriverUnlock
(
driver
);
if
(
dev
==
NULL
)
goto
cleanup
;
...
...
@@ -3997,7 +4000,8 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn,
}
/* Parse the domain XML. */
if
(
!
(
def
=
virDomainDefParseString
(
dconn
,
driver
->
caps
,
dom_xml
)))
{
if
(
!
(
def
=
virDomainDefParseString
(
dconn
,
driver
->
caps
,
dom_xml
,
VIR_DOMAIN_XML_INACTIVE
)))
{
qemudReportError
(
dconn
,
NULL
,
NULL
,
VIR_ERR_OPERATION_FAILED
,
"%s"
,
_
(
"failed to parse XML"
));
goto
cleanup
;
...
...
src/test.c
浏览文件 @
46971d5e
...
...
@@ -242,7 +242,9 @@ static int testOpenDefault(virConnectPtr conn) {
privconn
->
nextDomID
=
1
;
if
(
!
(
domdef
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
defaultDomainXML
)))
if
(
!
(
domdef
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
defaultDomainXML
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
error
;
if
(
!
(
domobj
=
virDomainAssignDef
(
conn
,
&
privconn
->
domains
,
domdef
)))
{
virDomainDefFree
(
domdef
);
...
...
@@ -719,7 +721,8 @@ testDomainCreateXML(virConnectPtr conn, const char *xml,
virDomainObjPtr
dom
=
NULL
;
testDriverLock
(
privconn
);
if
((
def
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
xml
))
==
NULL
)
if
((
def
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
))
==
NULL
)
goto
cleanup
;
if
((
dom
=
virDomainAssignDef
(
conn
,
&
privconn
->
domains
,
...
...
@@ -1211,7 +1214,8 @@ static int testDomainRestore(virConnectPtr conn,
xml
[
len
]
=
'\0'
;
testDriverLock
(
privconn
);
def
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
xml
);
def
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
);
if
(
!
def
)
goto
cleanup
;
...
...
@@ -1491,7 +1495,8 @@ static virDomainPtr testDomainDefineXML(virConnectPtr conn,
virDomainObjPtr
dom
=
NULL
;
testDriverLock
(
privconn
);
if
((
def
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
xml
))
==
NULL
)
if
((
def
=
virDomainDefParseString
(
conn
,
privconn
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
))
==
NULL
)
goto
cleanup
;
if
((
dom
=
virDomainAssignDef
(
conn
,
&
privconn
->
domains
,
...
...
src/uml_driver.c
浏览文件 @
46971d5e
...
...
@@ -1199,7 +1199,8 @@ static virDomainPtr umlDomainCreate(virConnectPtr conn, const char *xml,
virDomainPtr
dom
=
NULL
;
umlDriverLock
(
driver
);
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
)))
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
cleanup
;
vm
=
virDomainFindByName
(
&
driver
->
domains
,
def
->
name
);
...
...
@@ -1574,7 +1575,8 @@ static virDomainPtr umlDomainDefine(virConnectPtr conn, const char *xml) {
virDomainPtr
dom
=
NULL
;
umlDriverLock
(
driver
);
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
)))
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
driver
->
caps
,
xml
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
cleanup
;
if
(
!
(
vm
=
virDomainAssignDef
(
conn
,
...
...
src/xend_internal.c
浏览文件 @
46971d5e
...
...
@@ -3772,7 +3772,8 @@ xenDaemonCreateXML(virConnectPtr conn, const char *xmlDesc,
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
priv
->
caps
,
xmlDesc
)))
xmlDesc
,
VIR_DOMAIN_XML_INACTIVE
)))
return
(
NULL
);
if
(
!
(
sexpr
=
xenDaemonFormatSxpr
(
conn
,
def
,
priv
->
xendConfigVersion
)))
{
...
...
@@ -4248,7 +4249,8 @@ virDomainPtr xenDaemonDomainDefineXML(virConnectPtr conn, const char *xmlDesc) {
if
(
priv
->
xendConfigVersion
<
3
)
return
(
NULL
);
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
priv
->
caps
,
xmlDesc
)))
{
if
(
!
(
def
=
virDomainDefParseString
(
conn
,
priv
->
caps
,
xmlDesc
,
VIR_DOMAIN_XML_INACTIVE
)))
{
virXendError
(
conn
,
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"failed to parse domain description"
));
return
(
NULL
);
...
...
tests/qemuxml2xmltest.c
浏览文件 @
46971d5e
...
...
@@ -32,7 +32,8 @@ static int testCompareXMLToXMLFiles(const char *xml) {
if
(
virtTestLoadFile
(
xml
,
&
xmlPtr
,
MAX_FILE
)
<
0
)
goto
fail
;
if
(
!
(
vmdef
=
virDomainDefParseString
(
NULL
,
driver
.
caps
,
xmlData
)))
if
(
!
(
vmdef
=
virDomainDefParseString
(
NULL
,
driver
.
caps
,
xmlData
,
VIR_DOMAIN_XML_INACTIVE
)))
goto
fail
;
if
(
!
(
actual
=
virDomainDefFormat
(
NULL
,
vmdef
,
0
)))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录