Re: [libvirt PATCH v2 01/12] nodedev: don't log error in nodeDeviceFindAddressByName()

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

 



On 4/13/21 4:39 PM, Jonathon Jongsma wrote:
The calling function will log the error. Just return NULL if a device
cannot be found.

Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>

Reviewed-by: Laine Stump <laine@xxxxxxxxxx>

---
  src/node_device/node_device_driver.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/src/node_device/node_device_driver.c b/src/node_device/node_device_driver.c
index 5f8995172d..4cf4e4214f 100644
--- a/src/node_device/node_device_driver.c
+++ b/src/node_device/node_device_driver.c
@@ -630,11 +630,8 @@ nodeDeviceFindAddressByName(const char *name)
      char *addr = NULL;
      virNodeDeviceObj *dev = virNodeDeviceObjListFindByName(driver->devs, name);
- if (!dev) {
-        virReportError(VIR_ERR_NO_NODE_DEVICE,
-                       _("could not find device '%s'"), name);
+    if (!dev)
          return NULL;
-    }
def = virNodeDeviceObjGetDef(dev);
      for (caps = def->caps; caps != NULL; caps = caps->next) {





[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