From: Jim Meyering <meyering(a)redhat.com>
These changes avoid false-positive syntax-check failure,
and also make the resulting diagnostics more comprehensible.
---
src/qemu/qemu_driver.c | 8 ++++----
src/secret/secret_driver.c | 4 ++--
src/uml/uml_driver.c | 2 +-
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 0f9acb2..97991d7 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -634,7 +634,7 @@ qemuAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED,
void *opaq
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
vm->def->name,
- err ? err->message : "");
+ err ? err->message : _("unknown error"));
} else {
virDomainEventPtr event =
virDomainEventNewFromObj(vm,
@@ -2895,7 +2895,7 @@ qemudReattachManagedDevice(pciDevice *dev)
if (pciReAttachDevice(dev) < 0) {
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to re-attach PCI device: %s"),
- err ? err->message : "");
+ err ? err->message : _("unknown error"));
virResetError(err);
}
}
@@ -2914,7 +2914,7 @@ qemuDomainReAttachHostDevices(struct qemud_driver *driver,
if (!(pcidevs = qemuGetPciHostDeviceList(def))) {
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to allocate pciDeviceList: %s"),
- err ? err->message : "");
+ err ? err->message : _("unknown error"));
virResetError(err);
return;
}
@@ -2932,7 +2932,7 @@ qemuDomainReAttachHostDevices(struct qemud_driver *driver,
if (pciResetDevice(dev, driver->activePciHostdevs) < 0) {
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to reset PCI device: %s"),
- err ? err->message : "");
+ err ? err->message : _("unknown error"));
virResetError(err);
}
}
diff --git a/src/secret/secret_driver.c b/src/secret/secret_driver.c
index 22852a1..01c0034 100644
--- a/src/secret/secret_driver.c
+++ b/src/secret/secret_driver.c
@@ -1,7 +1,7 @@
/*
* secret_driver.c: local driver for secret manipulation API
*
- * Copyright (C) 2009 Red Hat, Inc.
+ * Copyright (C) 2009-2010 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -499,7 +499,7 @@ loadSecrets(virSecretDriverStatePtr driver,
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Error reading secret: %s"),
- err != NULL ? err->message: "");
+ err != NULL ? err->message: _("unknown error"));
virResetError(err);
continue;
}
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index da8fd47..c6d8b65 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -157,7 +157,7 @@ umlAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED,
void *opaqu
if (umlStartVMDaemon(data->conn, data->driver, vm) < 0) {
virErrorPtr err = virGetLastError();
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
- vm->def->name, err ? err->message : "");
+ vm->def->name, err ? err->message : _("unknown
error"));
}
}
virDomainObjUnlock(vm);
--
1.7.1.259.g3aef8