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 <jjongsma@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
This commit is contained in:
Jonathon Jongsma 2021-06-22 14:53:32 -05:00 committed by Michal Privoznik
parent e9b534905f
commit a96df6424f

View 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;
}