]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix an error when looking for devices in syspath
authorDaniel Veillard <veillard@redhat.com>
Thu, 21 Jan 2010 14:45:44 +0000 (15:45 +0100)
committerDaniel Veillard <veillard@redhat.com>
Thu, 21 Jan 2010 14:45:44 +0000 (15:45 +0100)
* src/node_device/node_device_udev.c: udevSetupSystemDev() only print the
  error message if lookup failed in both DMI_DEVPATH and DMI_DEVPATH_FALLBACK

src/node_device/node_device_udev.c

index 78d7ae39cbf18373af73d882ce4ef83883d299bf..2e459d1801395716c1c98c3a7c0df32fcd2c485f 100644 (file)
@@ -1454,11 +1454,10 @@ static int udevSetupSystemDev(void)
     udev = udev_monitor_get_udev(DRV_STATE_UDEV_MONITOR(driverState));
     device = udev_device_new_from_syspath(udev, DMI_DEVPATH);
     if (device == NULL) {
-        VIR_ERROR("Failed to get udev device for syspath '%s'", DMI_DEVPATH);
-
         device = udev_device_new_from_syspath(udev, DMI_DEVPATH_FALLBACK);
         if (device == NULL) {
-            VIR_ERROR("Failed to get udev device for syspath '%s'", DMI_DEVPATH_FALLBACK);
+            VIR_ERROR("Failed to get udev device for syspath '%s' or '%s'",
+                      DMI_DEVPATH, DMI_DEVPATH_FALLBACK);
             goto out;
         }
     }