Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
ca773b2f
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,发现更多精彩内容 >>
提交
ca773b2f
编写于
6月 14, 2016
作者:
J
Ján Tomko
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
vbox: reformat multi-line error reports
Put the comma on the first line.
上级
e26098a1
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
38 addition
and
38 deletion
+38
-38
src/vbox/vbox_common.c
src/vbox/vbox_common.c
+4
-4
src/vbox/vbox_snapshot_conf.c
src/vbox/vbox_snapshot_conf.c
+34
-34
未找到文件。
src/vbox/vbox_common.c
浏览文件 @
ca773b2f
...
...
@@ -4367,8 +4367,8 @@ static int vboxCloseDisksRecursively(virDomainPtr dom, char *location)
}
rc
=
gVBoxAPI
.
UIMedium
.
GetChildren
(
medium
,
&
childrenSize
,
&
children
);
if
(
NS_FAILED
(
rc
))
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to get disk children"
));
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to get disk children"
));
goto
cleanup
;
}
for
(
i
=
0
;
i
<
childrenSize
;
i
++
)
{
...
...
@@ -4385,8 +4385,8 @@ static int vboxCloseDisksRecursively(virDomainPtr dom, char *location)
VBOX_UTF16_TO_UTF8
(
childLocationUtf
,
&
childLocation
);
VBOX_UTF16_FREE
(
childLocationUtf
);
if
(
vboxCloseDisksRecursively
(
dom
,
childLocation
)
<
0
)
{
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to close disk children"
));
virReportError
(
VIR_ERR_INTERNAL_ERROR
,
"%s"
,
_
(
"Unable to close disk children"
));
goto
cleanup
;
}
VIR_FREE
(
childLocation
);
...
...
src/vbox/vbox_snapshot_conf.c
浏览文件 @
ca773b2f
...
...
@@ -70,8 +70,8 @@ virVBoxSnapshotConfCreateVBoxSnapshotConfHardDiskPtr(xmlNodePtr diskNode,
1
,
&
searchTabResult
);
if
(
resultSize
!=
1
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <HardDisk> 'uuid' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <HardDisk> 'uuid' attribute"
));
goto
cleanup
;
}
if
(
VIR_STRDUP
(
hardDisk
->
uuid
,
searchTabResult
[
0
])
<
0
)
...
...
@@ -79,8 +79,8 @@ virVBoxSnapshotConfCreateVBoxSnapshotConfHardDiskPtr(xmlNodePtr diskNode,
location
=
virXMLPropString
(
diskNode
,
"location"
);
if
(
location
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <HardDisk> 'location' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <HardDisk> 'location' attribute"
));
goto
cleanup
;
}
if
(
location
[
0
]
!=
'/'
)
{
...
...
@@ -95,8 +95,8 @@ virVBoxSnapshotConfCreateVBoxSnapshotConfHardDiskPtr(xmlNodePtr diskNode,
}
hardDisk
->
format
=
virXMLPropString
(
diskNode
,
"format"
);
if
(
hardDisk
->
format
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <HardDisk> 'format' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <HardDisk> 'format' attribute"
));
goto
cleanup
;
}
hardDisk
->
type
=
virXMLPropString
(
diskNode
,
"type"
);
...
...
@@ -204,8 +204,8 @@ virVBoxSnapshotConfRetrieveSnapshot(xmlNodePtr snapshotNode,
1
,
&
searchTabResult
);
if
(
resultSize
!=
1
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> 'uuid' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> 'uuid' attribute"
));
goto
cleanup
;
}
if
(
VIR_STRDUP
(
snapshot
->
uuid
,
searchTabResult
[
0
])
<
0
)
...
...
@@ -213,14 +213,14 @@ virVBoxSnapshotConfRetrieveSnapshot(xmlNodePtr snapshotNode,
snapshot
->
name
=
virXMLPropString
(
snapshotNode
,
"name"
);
if
(
snapshot
->
name
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> 'name' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> 'name' attribute"
));
goto
cleanup
;
}
snapshot
->
timeStamp
=
virXMLPropString
(
snapshotNode
,
"timeStamp"
);
if
(
snapshot
->
timeStamp
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> 'timeStamp' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> 'timeStamp' attribute"
));
goto
cleanup
;
}
...
...
@@ -231,16 +231,16 @@ virVBoxSnapshotConfRetrieveSnapshot(xmlNodePtr snapshotNode,
hardwareNode
=
virXPathNode
(
"./vbox:Hardware"
,
xPathContext
);
if
(
hardwareNode
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> <Hardware> node"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> <Hardware> node"
));
goto
cleanup
;
}
snapshot
->
hardware
=
virXMLNodeToString
(
snapshotNode
->
doc
,
hardwareNode
);
storageControllerNode
=
virXPathNode
(
"./vbox:StorageControllers"
,
xPathContext
);
if
(
storageControllerNode
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> <StorageControllers> node"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Snapshot> <StorageControllers> node"
));
goto
cleanup
;
}
snapshot
->
storageController
=
virXMLNodeToString
(
snapshotNode
->
doc
,
...
...
@@ -633,21 +633,21 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
xPathContext
->
node
=
cur
;
machineNode
=
virXPathNode
(
"./vbox:Machine"
,
xPathContext
);
if
(
machineNode
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <VirtualBox> <Machine> node"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <VirtualBox> <Machine> node"
));
goto
cleanup
;
}
machineDescription
->
uuid
=
virXMLPropString
(
machineNode
,
"uuid"
);
if
(
machineDescription
->
uuid
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'uuid' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'uuid' attribute"
));
goto
cleanup
;
}
machineDescription
->
name
=
virXMLPropString
(
machineNode
,
"name"
);
if
(
machineDescription
->
name
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'name' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'name' attribute"
));
goto
cleanup
;
}
...
...
@@ -659,8 +659,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
1
,
&
searchResultTab
);
if
(
searchResultSize
!=
1
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'currentSnapshot' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'currentSnapshot' attribute"
));
goto
cleanup
;
}
if
(
VIR_STRDUP
(
machineDescription
->
currentSnapshot
,
searchResultTab
[
0
])
<
0
)
...
...
@@ -669,8 +669,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
machineDescription
->
snapshotFolder
=
virXMLPropString
(
machineNode
,
"snapshotFolder"
);
if
(
machineDescription
->
snapshotFolder
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'snapshotFolder' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'snapshotFolder' attribute"
));
goto
cleanup
;
}
...
...
@@ -682,16 +682,16 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
}
machineDescription
->
lastStateChange
=
virXMLPropString
(
machineNode
,
"lastStateChange"
);
if
(
machineDescription
->
lastStateChange
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'lastStateChange' attribute"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> 'lastStateChange' attribute"
));
goto
cleanup
;
}
xPathContext
->
node
=
machineNode
;
cur
=
virXPathNode
(
"./vbox:Hardware"
,
xPathContext
);
if
(
cur
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> <Hardware> node"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> <Hardware> node"
));
goto
cleanup
;
}
machineDescription
->
hardware
=
virXMLNodeToString
(
xml
,
cur
);
...
...
@@ -702,8 +702,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
cur
=
virXPathNode
(
"./vbox:StorageControllers"
,
xPathContext
);
if
(
cur
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> <StorageControllers> node"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> <StorageControllers> node"
));
goto
cleanup
;
}
machineDescription
->
storageController
=
virXMLNodeToString
(
xml
,
cur
);
...
...
@@ -711,8 +711,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
/*retrieve mediaRegistry*/
cur
=
virXPathNode
(
"./vbox:MediaRegistry"
,
xPathContext
);
if
(
cur
==
NULL
)
{
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> <MediaRegistry> node"
));
virReportError
(
VIR_ERR_XML_ERROR
,
"%s"
,
_
(
"Cannot parse <Machine> <MediaRegistry> node"
));
goto
cleanup
;
}
machineDescription
->
mediaRegistry
=
virVBoxSnapshotConfRetrieveMediaRegistry
(
cur
,
xPathContext
,
machineLocation
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录