From: Jonathon Jongsma Date: Tue, 22 Jun 2021 19:53:32 +0000 (-0500) Subject: nodedev: Remove useless device name from error message X-Git-Tag: v7.6.0-rc1~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a96df6424fba66c25be996ca624f3e5660f25821;p=thirdparty%2Flibvirt.git nodedev: Remove useless device name from error message 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 Reviewed-by: Peter Krempa Reviewed-by: Boris Fiuczynski --- diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c index cb2c3ceaa4..607a3478a3 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; }