Re: [libvirt PATCH v2 1/5] nodedev: Remove useless device name from error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <jjongsma@xxxxxxxxxx>
Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
  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 <fiuczy@xxxxxxxxxxxxx>

--
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





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux