]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nodedev: Remove useless device name from error message
authorJonathon Jongsma <jjongsma@redhat.com>
Tue, 22 Jun 2021 19:53:32 +0000 (14:53 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 1 Jul 2021 14:34:03 +0000 (16:34 +0200)
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 <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
src/node_device/node_device_driver.c

index cb2c3ceaa46e201974ecce1b57c18a1468328185..607a3478a357043e07ddee012e8ad9b5d5757bf2 100644 (file)
@@ -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;
     }