mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
vbox: reformat multi-line error reports
Put the comma on the first line.
This commit is contained in:
parent
e26098a1f4
commit
ca773b2fe2
@ -4367,8 +4367,8 @@ static int vboxCloseDisksRecursively(virDomainPtr dom, char *location)
|
|||||||
}
|
}
|
||||||
rc = gVBoxAPI.UIMedium.GetChildren(medium, &childrenSize, &children);
|
rc = gVBoxAPI.UIMedium.GetChildren(medium, &childrenSize, &children);
|
||||||
if (NS_FAILED(rc)) {
|
if (NS_FAILED(rc)) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s"
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
, _("Unable to get disk children"));
|
_("Unable to get disk children"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
for (i = 0; i < childrenSize; i++) {
|
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_TO_UTF8(childLocationUtf, &childLocation);
|
||||||
VBOX_UTF16_FREE(childLocationUtf);
|
VBOX_UTF16_FREE(childLocationUtf);
|
||||||
if (vboxCloseDisksRecursively(dom, childLocation) < 0) {
|
if (vboxCloseDisksRecursively(dom, childLocation) < 0) {
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR, "%s"
|
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
|
||||||
, _("Unable to close disk children"));
|
_("Unable to close disk children"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
VIR_FREE(childLocation);
|
VIR_FREE(childLocation);
|
||||||
|
@ -70,8 +70,8 @@ virVBoxSnapshotConfCreateVBoxSnapshotConfHardDiskPtr(xmlNodePtr diskNode,
|
|||||||
1,
|
1,
|
||||||
&searchTabResult);
|
&searchTabResult);
|
||||||
if (resultSize != 1) {
|
if (resultSize != 1) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <HardDisk> 'uuid' attribute"));
|
_("Cannot parse <HardDisk> 'uuid' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (VIR_STRDUP(hardDisk->uuid, searchTabResult[0]) < 0)
|
if (VIR_STRDUP(hardDisk->uuid, searchTabResult[0]) < 0)
|
||||||
@ -79,8 +79,8 @@ virVBoxSnapshotConfCreateVBoxSnapshotConfHardDiskPtr(xmlNodePtr diskNode,
|
|||||||
|
|
||||||
location = virXMLPropString(diskNode, "location");
|
location = virXMLPropString(diskNode, "location");
|
||||||
if (location == NULL) {
|
if (location == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <HardDisk> 'location' attribute"));
|
_("Cannot parse <HardDisk> 'location' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (location[0] != '/') {
|
if (location[0] != '/') {
|
||||||
@ -95,8 +95,8 @@ virVBoxSnapshotConfCreateVBoxSnapshotConfHardDiskPtr(xmlNodePtr diskNode,
|
|||||||
}
|
}
|
||||||
hardDisk->format = virXMLPropString(diskNode, "format");
|
hardDisk->format = virXMLPropString(diskNode, "format");
|
||||||
if (hardDisk->format == NULL) {
|
if (hardDisk->format == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <HardDisk> 'format' attribute"));
|
_("Cannot parse <HardDisk> 'format' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
hardDisk->type = virXMLPropString(diskNode, "type");
|
hardDisk->type = virXMLPropString(diskNode, "type");
|
||||||
@ -204,8 +204,8 @@ virVBoxSnapshotConfRetrieveSnapshot(xmlNodePtr snapshotNode,
|
|||||||
1,
|
1,
|
||||||
&searchTabResult);
|
&searchTabResult);
|
||||||
if (resultSize != 1) {
|
if (resultSize != 1) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Snapshot> 'uuid' attribute"));
|
_("Cannot parse <Snapshot> 'uuid' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (VIR_STRDUP(snapshot->uuid, searchTabResult[0]) < 0)
|
if (VIR_STRDUP(snapshot->uuid, searchTabResult[0]) < 0)
|
||||||
@ -213,14 +213,14 @@ virVBoxSnapshotConfRetrieveSnapshot(xmlNodePtr snapshotNode,
|
|||||||
|
|
||||||
snapshot->name = virXMLPropString(snapshotNode, "name");
|
snapshot->name = virXMLPropString(snapshotNode, "name");
|
||||||
if (snapshot->name == NULL) {
|
if (snapshot->name == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Snapshot> 'name' attribute"));
|
_("Cannot parse <Snapshot> 'name' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
snapshot->timeStamp = virXMLPropString(snapshotNode, "timeStamp");
|
snapshot->timeStamp = virXMLPropString(snapshotNode, "timeStamp");
|
||||||
if (snapshot->timeStamp == NULL) {
|
if (snapshot->timeStamp == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Snapshot> 'timeStamp' attribute"));
|
_("Cannot parse <Snapshot> 'timeStamp' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -231,16 +231,16 @@ virVBoxSnapshotConfRetrieveSnapshot(xmlNodePtr snapshotNode,
|
|||||||
|
|
||||||
hardwareNode = virXPathNode("./vbox:Hardware", xPathContext);
|
hardwareNode = virXPathNode("./vbox:Hardware", xPathContext);
|
||||||
if (hardwareNode == NULL) {
|
if (hardwareNode == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Snapshot> <Hardware> node"));
|
_("Cannot parse <Snapshot> <Hardware> node"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
snapshot->hardware = virXMLNodeToString(snapshotNode->doc, hardwareNode);
|
snapshot->hardware = virXMLNodeToString(snapshotNode->doc, hardwareNode);
|
||||||
|
|
||||||
storageControllerNode = virXPathNode("./vbox:StorageControllers", xPathContext);
|
storageControllerNode = virXPathNode("./vbox:StorageControllers", xPathContext);
|
||||||
if (storageControllerNode == NULL) {
|
if (storageControllerNode == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Snapshot> <StorageControllers> node"));
|
_("Cannot parse <Snapshot> <StorageControllers> node"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
snapshot->storageController = virXMLNodeToString(snapshotNode->doc,
|
snapshot->storageController = virXMLNodeToString(snapshotNode->doc,
|
||||||
@ -633,21 +633,21 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
|
|||||||
xPathContext->node = cur;
|
xPathContext->node = cur;
|
||||||
machineNode = virXPathNode("./vbox:Machine", xPathContext);
|
machineNode = virXPathNode("./vbox:Machine", xPathContext);
|
||||||
if (machineNode == NULL) {
|
if (machineNode == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <VirtualBox> <Machine> node"));
|
_("Cannot parse <VirtualBox> <Machine> node"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
machineDescription->uuid = virXMLPropString(machineNode, "uuid");
|
machineDescription->uuid = virXMLPropString(machineNode, "uuid");
|
||||||
if (machineDescription->uuid == NULL) {
|
if (machineDescription->uuid == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> 'uuid' attribute"));
|
_("Cannot parse <Machine> 'uuid' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
machineDescription->name = virXMLPropString(machineNode, "name");
|
machineDescription->name = virXMLPropString(machineNode, "name");
|
||||||
if (machineDescription->name == NULL) {
|
if (machineDescription->name == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> 'name' attribute"));
|
_("Cannot parse <Machine> 'name' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -659,8 +659,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
|
|||||||
1,
|
1,
|
||||||
&searchResultTab);
|
&searchResultTab);
|
||||||
if (searchResultSize != 1) {
|
if (searchResultSize != 1) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> 'currentSnapshot' attribute"));
|
_("Cannot parse <Machine> 'currentSnapshot' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
if (VIR_STRDUP(machineDescription->currentSnapshot, searchResultTab[0]) < 0)
|
if (VIR_STRDUP(machineDescription->currentSnapshot, searchResultTab[0]) < 0)
|
||||||
@ -669,8 +669,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
|
|||||||
|
|
||||||
machineDescription->snapshotFolder = virXMLPropString(machineNode, "snapshotFolder");
|
machineDescription->snapshotFolder = virXMLPropString(machineNode, "snapshotFolder");
|
||||||
if (machineDescription->snapshotFolder == NULL) {
|
if (machineDescription->snapshotFolder == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> 'snapshotFolder' attribute"));
|
_("Cannot parse <Machine> 'snapshotFolder' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -682,16 +682,16 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
|
|||||||
}
|
}
|
||||||
machineDescription->lastStateChange = virXMLPropString(machineNode, "lastStateChange");
|
machineDescription->lastStateChange = virXMLPropString(machineNode, "lastStateChange");
|
||||||
if (machineDescription->lastStateChange == NULL) {
|
if (machineDescription->lastStateChange == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> 'lastStateChange' attribute"));
|
_("Cannot parse <Machine> 'lastStateChange' attribute"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
xPathContext->node = machineNode;
|
xPathContext->node = machineNode;
|
||||||
cur = virXPathNode("./vbox:Hardware", xPathContext);
|
cur = virXPathNode("./vbox:Hardware", xPathContext);
|
||||||
if (cur == NULL) {
|
if (cur == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> <Hardware> node"));
|
_("Cannot parse <Machine> <Hardware> node"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
machineDescription->hardware = virXMLNodeToString(xml, cur);
|
machineDescription->hardware = virXMLNodeToString(xml, cur);
|
||||||
@ -702,8 +702,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
|
|||||||
|
|
||||||
cur = virXPathNode("./vbox:StorageControllers", xPathContext);
|
cur = virXPathNode("./vbox:StorageControllers", xPathContext);
|
||||||
if (cur == NULL) {
|
if (cur == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> <StorageControllers> node"));
|
_("Cannot parse <Machine> <StorageControllers> node"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
machineDescription->storageController = virXMLNodeToString(xml, cur);
|
machineDescription->storageController = virXMLNodeToString(xml, cur);
|
||||||
@ -711,8 +711,8 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath,
|
|||||||
/*retrieve mediaRegistry*/
|
/*retrieve mediaRegistry*/
|
||||||
cur = virXPathNode("./vbox:MediaRegistry", xPathContext);
|
cur = virXPathNode("./vbox:MediaRegistry", xPathContext);
|
||||||
if (cur == NULL) {
|
if (cur == NULL) {
|
||||||
virReportError(VIR_ERR_XML_ERROR, "%s"
|
virReportError(VIR_ERR_XML_ERROR, "%s",
|
||||||
, _("Cannot parse <Machine> <MediaRegistry> node"));
|
_("Cannot parse <Machine> <MediaRegistry> node"));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
machineDescription->mediaRegistry = virVBoxSnapshotConfRetrieveMediaRegistry(cur, xPathContext, machineLocation);
|
machineDescription->mediaRegistry = virVBoxSnapshotConfRetrieveMediaRegistry(cur, xPathContext, machineLocation);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user