On 6/22/21 9:53 PM, Jonathon Jongsma wrote:
At the point where the error message is emitted, the field def->name is
still set to "new device", so the error message becomes:
Unable to start mediated device 'new device': ...
Since the name doesn't contain anything useful, just omit it from the
error message altogether.
Signed-off-by: Jonathon Jongsma <jjong...@redhat.com>
Reviewed-by: Peter Krempa <pkre...@redhat.com>
---
src/node_device/node_device_driver.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/node_device/node_device_driver.c
b/src/node_device/node_device_driver.c
index 8a0a2c3847..0f13cb4849 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -847,8 +847,8 @@ nodeDeviceCreateXMLMdev(virConnectPtr conn,
if (virMdevctlCreate(def, &uuid, &errmsg) < 0) {
if (errmsg)
virReportError(VIR_ERR_INTERNAL_ERROR,
- _("Unable to start mediated device '%s': %s"),
- def->name, errmsg);
+ _("Unable to start mediated device: %s"),
+ errmsg);
return NULL;
}
Reviewed-by: Boris Fiuczynski <fiu...@linux.ibm.com>
--
Mit freundlichen Grüßen/Kind regards
Boris Fiuczynski
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294