use virReportOOMError rather than more verbose equivalent

* src/qemu_driver.c (qemudDomainSave, qemudDomainRestore)
(qemudDomainAttachPciDiskDevice)
(qemudDomainAttachUsbMassstorageDevice):
This commit is contained in:
Jim Meyering 2009-02-05 16:27:40 +00:00
parent e60430be53
commit dcfa920aff
2 changed files with 13 additions and 12 deletions

View File

@ -1,3 +1,10 @@
Thu Feb 5 17:03:35 +0100 2009 Jim Meyering <meyering@redhat.com>
use virReportOOMError rather than more verbose equivalent
* src/qemu_driver.c (qemudDomainSave, qemudDomainRestore)
(qemudDomainAttachPciDiskDevice)
(qemudDomainAttachUsbMassstorageDevice):
Thu Feb 5 17:03:35 +0100 2009 Jim Meyering <meyering@redhat.com> Thu Feb 5 17:03:35 +0100 2009 Jim Meyering <meyering@redhat.com>
qemu_driver.c: s/strerror/virStrerror.../ qemu_driver.c: s/strerror/virStrerror.../

View File

@ -462,8 +462,7 @@ qemudStartup(void) {
return 0; return 0;
out_of_memory: out_of_memory:
qemudLog (QEMUD_ERROR, virReportOOMError(NULL);
"%s", _("qemudStartup: out of memory\n"));
error: error:
if (qemu_driver) if (qemu_driver)
qemuDriverUnlock(qemu_driver); qemuDriverUnlock(qemu_driver);
@ -2419,15 +2418,13 @@ static int qemudDomainSave(virDomainPtr dom,
/* Migrate to file */ /* Migrate to file */
safe_path = qemudEscapeShellArg(path); safe_path = qemudEscapeShellArg(path);
if (!safe_path) { if (!safe_path) {
qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, virReportOOMError(dom->conn);
"%s", _("out of memory"));
goto cleanup; goto cleanup;
} }
if (virAsprintf(&command, "migrate \"exec:" if (virAsprintf(&command, "migrate \"exec:"
"dd of='%s' oflag=append conv=notrunc 2>/dev/null" "dd of='%s' oflag=append conv=notrunc 2>/dev/null"
"\"", safe_path) == -1) { "\"", safe_path) == -1) {
qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED, virReportOOMError(dom->conn);
"%s", _("out of memory"));
command = NULL; command = NULL;
goto cleanup; goto cleanup;
} }
@ -2741,8 +2738,7 @@ static int qemudDomainRestore(virConnectPtr conn,
} }
if (VIR_ALLOC_N(xml, header.xml_len) < 0) { if (VIR_ALLOC_N(xml, header.xml_len) < 0) {
qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED, virReportOOMError(conn);
"%s", _("out of memory"));
goto cleanup; goto cleanup;
} }
@ -3220,8 +3216,7 @@ static int qemudDomainAttachPciDiskDevice(virConnectPtr conn,
safe_path = qemudEscapeMonitorArg(dev->data.disk->src); safe_path = qemudEscapeMonitorArg(dev->data.disk->src);
if (!safe_path) { if (!safe_path) {
qemudReportError(conn, dom, NULL, VIR_ERR_OPERATION_FAILED, virReportOOMError(conn);
"%s", _("out of memory"));
return -1; return -1;
} }
@ -3290,8 +3285,7 @@ static int qemudDomainAttachUsbMassstorageDevice(virConnectPtr conn,
safe_path = qemudEscapeMonitorArg(dev->data.disk->src); safe_path = qemudEscapeMonitorArg(dev->data.disk->src);
if (!safe_path) { if (!safe_path) {
qemudReportError(conn, dom, NULL, VIR_ERR_OPERATION_FAILED, virReportOOMError(conn);
"%s", _("out of memory"));
return -1; return -1;
} }