mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
maint: change "" in err ? err->message : "" to _("unknown error"), ...
These changes avoid false-positive syntax-check failure, and also make the resulting diagnostics more comprehensible.
This commit is contained in:
parent
cc21fd9a91
commit
5adbd9cb4c
@ -634,7 +634,7 @@ qemuAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaq
|
|||||||
virErrorPtr err = virGetLastError();
|
virErrorPtr err = virGetLastError();
|
||||||
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
|
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
|
||||||
vm->def->name,
|
vm->def->name,
|
||||||
err ? err->message : "");
|
err ? err->message : _("unknown error"));
|
||||||
} else {
|
} else {
|
||||||
virDomainEventPtr event =
|
virDomainEventPtr event =
|
||||||
virDomainEventNewFromObj(vm,
|
virDomainEventNewFromObj(vm,
|
||||||
@ -2895,7 +2895,7 @@ qemudReattachManagedDevice(pciDevice *dev)
|
|||||||
if (pciReAttachDevice(dev) < 0) {
|
if (pciReAttachDevice(dev) < 0) {
|
||||||
virErrorPtr err = virGetLastError();
|
virErrorPtr err = virGetLastError();
|
||||||
VIR_ERROR(_("Failed to re-attach PCI device: %s"),
|
VIR_ERROR(_("Failed to re-attach PCI device: %s"),
|
||||||
err ? err->message : "");
|
err ? err->message : _("unknown error"));
|
||||||
virResetError(err);
|
virResetError(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2914,7 +2914,7 @@ qemuDomainReAttachHostDevices(struct qemud_driver *driver,
|
|||||||
if (!(pcidevs = qemuGetPciHostDeviceList(def))) {
|
if (!(pcidevs = qemuGetPciHostDeviceList(def))) {
|
||||||
virErrorPtr err = virGetLastError();
|
virErrorPtr err = virGetLastError();
|
||||||
VIR_ERROR(_("Failed to allocate pciDeviceList: %s"),
|
VIR_ERROR(_("Failed to allocate pciDeviceList: %s"),
|
||||||
err ? err->message : "");
|
err ? err->message : _("unknown error"));
|
||||||
virResetError(err);
|
virResetError(err);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2932,7 +2932,7 @@ qemuDomainReAttachHostDevices(struct qemud_driver *driver,
|
|||||||
if (pciResetDevice(dev, driver->activePciHostdevs) < 0) {
|
if (pciResetDevice(dev, driver->activePciHostdevs) < 0) {
|
||||||
virErrorPtr err = virGetLastError();
|
virErrorPtr err = virGetLastError();
|
||||||
VIR_ERROR(_("Failed to reset PCI device: %s"),
|
VIR_ERROR(_("Failed to reset PCI device: %s"),
|
||||||
err ? err->message : "");
|
err ? err->message : _("unknown error"));
|
||||||
virResetError(err);
|
virResetError(err);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* secret_driver.c: local driver for secret manipulation API
|
* 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
|
* This library is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU Lesser General Public
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
@ -499,7 +499,7 @@ loadSecrets(virSecretDriverStatePtr driver,
|
|||||||
virErrorPtr err = virGetLastError();
|
virErrorPtr err = virGetLastError();
|
||||||
|
|
||||||
VIR_ERROR(_("Error reading secret: %s"),
|
VIR_ERROR(_("Error reading secret: %s"),
|
||||||
err != NULL ? err->message: "");
|
err != NULL ? err->message: _("unknown error"));
|
||||||
virResetError(err);
|
virResetError(err);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ umlAutostartDomain(void *payload, const char *name ATTRIBUTE_UNUSED, void *opaqu
|
|||||||
if (umlStartVMDaemon(data->conn, data->driver, vm) < 0) {
|
if (umlStartVMDaemon(data->conn, data->driver, vm) < 0) {
|
||||||
virErrorPtr err = virGetLastError();
|
virErrorPtr err = virGetLastError();
|
||||||
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
|
VIR_ERROR(_("Failed to autostart VM '%s': %s"),
|
||||||
vm->def->name, err ? err->message : "");
|
vm->def->name, err ? err->message : _("unknown error"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virDomainObjUnlock(vm);
|
virDomainObjUnlock(vm);
|
||||||
|
Loading…
Reference in New Issue
Block a user