On Tue, Apr 28, 2009 at 11:31:57AM -0400, Cole Robinson wrote: > --- > src/qemu_driver.c | 10 +++++++--- > 1 files changed, 7 insertions(+), 3 deletions(-) > > diff --git a/src/qemu_driver.c b/src/qemu_driver.c > index 04df8ae..b293f72 100644 > --- a/src/qemu_driver.c > +++ b/src/qemu_driver.c > @@ -225,7 +225,7 @@ qemudAutostartConfigs(struct qemud_driver *driver) { > virErrorPtr err = virGetLastError(); > VIR_ERROR(_("Failed to autostart VM '%s': %s\n"), > vm->def->name, > - err ? err->message : NULL); > + err ? err->message : ""); > } else { > virDomainEventPtr event = > virDomainEventNewFromObj(vm, > @@ -3293,8 +3293,10 @@ static int qemudDomainRestore(virConnectPtr conn, > close(fd); > fd = -1; > if (ret < 0) { > + virErrorPtr err = virGetLastError(); > qemudReportError(conn, NULL, NULL, VIR_ERR_OPERATION_FAILED, > - "%s", _("failed to start VM")); > + _("failed to start VM: %s"), > + err ? err->message : ""); > if (!vm->persistent) { > virDomainRemoveInactive(&driver->domains, > vm); > @@ -4790,8 +4792,10 @@ qemudDomainMigratePrepare2 (virConnectPtr dconn, > */ > snprintf (migrateFrom, sizeof (migrateFrom), "tcp:0.0.0.0:%d", this_port); > if (qemudStartVMDaemon (dconn, driver, vm, migrateFrom, -1) < 0) { > + virErrorPtr err = virGetLastError(); > qemudReportError (dconn, NULL, NULL, VIR_ERR_OPERATION_FAILED, > - "%s", _("failed to start listening VM")); > + _("failed to start listening VM: %s"), > + err ? err->message : ""); > if (!vm->persistent) { > virDomainRemoveInactive(&driver->domains, vm); > vm = NULL; It think we should just be removing the qemudReportError() calls completely in both these places & let qemudStartVMDaemon take care of reporting errors, since there is no need to have different error messages in each caller. Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :| -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list