[PATCH] Adjust some log levels in udev driver

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

 



Most of te VIR_INFO calls in the udev driver are only relevant
to developers so can switch to VIR_DEBUG. Failure to initialize
libpciaccess though is a fatal error

* src/node_device/node_device_udev.c: Adjust log levels
---
 src/node_device/node_device_udev.c |   44 ++++++++++++++++++------------------
 1 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
index 93390af..475cbb5 100644
--- a/src/node_device/node_device_udev.c
+++ b/src/node_device/node_device_udev.c
@@ -116,8 +116,8 @@ static int udevGetDeviceProperty(struct udev_device *udev_device,
 
     udev_value = udev_device_get_property_value(udev_device, property_key);
     if (udev_value == NULL) {
-        VIR_INFO(_("udev reports device '%s' does not have property '%s'"),
-                 udev_device_get_sysname(udev_device), property_key);
+        VIR_DEBUG("udev reports device '%s' does not have property '%s'",
+                  udev_device_get_sysname(udev_device), property_key);
         ret = PROPERTY_MISSING;
         goto out;
     }
@@ -205,8 +205,8 @@ static int udevGetDeviceSysfsAttr(struct udev_device *udev_device,
 
     udev_value = udev_device_get_sysattr_value(udev_device, attr_name);
     if (udev_value == NULL) {
-        VIR_INFO(_("udev reports device '%s' does not have sysfs attr '%s'"),
-                 udev_device_get_sysname(udev_device), attr_name);
+        VIR_DEBUG("udev reports device '%s' does not have sysfs attr '%s'",
+                  udev_device_get_sysname(udev_device), attr_name);
         ret = PROPERTY_MISSING;
         goto out;
     }
@@ -950,9 +950,9 @@ static int udevKludgeStorageType(virNodeDeviceDefPtr def)
 {
     int ret = -1;
 
-    VIR_INFO("Could not find definitive storage type for device "
-             "with sysfs path '%s', trying to guess it",
-             def->sysfs_path);
+    VIR_DEBUG("Could not find definitive storage type for device "
+              "with sysfs path '%s', trying to guess it",
+              def->sysfs_path);
 
     if (STRPREFIX(def->caps->data.storage.block, "/dev/vd")) {
         /* virtio disk */
@@ -963,8 +963,8 @@ static int udevKludgeStorageType(virNodeDeviceDefPtr def)
     }
 
     if (ret != 0) {
-        VIR_INFO("Could not determine storage type for device "
-                 "with sysfs path '%s'", def->sysfs_path);
+        VIR_DEBUG("Could not determine storage type for device "
+                  "with sysfs path '%s'", def->sysfs_path);
     } else {
         VIR_DEBUG("Found storage type '%s' for device "
                   "with sysfs path '%s'",
@@ -1062,8 +1062,8 @@ static int udevProcessStorage(struct udev_device *device,
     } else if (STREQ(def->caps->data.storage.drive_type, "floppy")) {
         ret = udevProcessFloppy(device, def);
     } else {
-        VIR_INFO("Unsupported storage type '%s'",
-                 def->caps->data.storage.drive_type);
+        VIR_DEBUG("Unsupported storage type '%s'",
+                  def->caps->data.storage.drive_type);
         goto out;
     }
 
@@ -1141,9 +1141,9 @@ static int udevGetDeviceType(struct udev_device *device,
         goto out;
     }
 
-    VIR_INFO("Could not determine device type for device "
-             "with sysfs path '%s'",
-             udev_device_get_sysname(device));
+    VIR_DEBUG("Could not determine device type for device "
+              "with sysfs path '%s'",
+              udev_device_get_sysname(device));
     ret = -1;
 
 out:
@@ -1209,8 +1209,8 @@ static int udevRemoveOneDevice(struct udev_device *device)
                   dev->def->name, name);
         virNodeDeviceObjRemove(&driverState->devs, dev);
     } else {
-        VIR_INFO("Failed to find device to remove that has udev name '%s'",
-                 name);
+        VIR_DEBUG("Failed to find device to remove that has udev name '%s'",
+                  name);
         ret = -1;
     }
     nodeDeviceUnlock(driverState);
@@ -1237,8 +1237,8 @@ static int udevSetParent(struct udev_device *device,
 
         parent_sysfs_path = udev_device_get_syspath(parent_device);
         if (parent_sysfs_path == NULL) {
-            VIR_INFO("Could not get syspath for parent of '%s'",
-                     udev_device_get_syspath(parent_device));
+            VIR_DEBUG("Could not get syspath for parent of '%s'",
+                      udev_device_get_syspath(parent_device));
         }
 
         dev = virNodeDeviceFindBySysfsPath(&driverState->devs,
@@ -1350,8 +1350,8 @@ static int udevProcessDeviceListEntry(struct udev *udev,
 
     if (device != NULL) {
         if (udevAddOneDevice(device) != 0) {
-            VIR_INFO("Failed to create node device for udev device '%s'",
-                     name);
+            VIR_DEBUG("Failed to create node device for udev device '%s'",
+                      name);
         }
         ret = 0;
     }
@@ -1598,8 +1598,8 @@ static int udevDeviceMonitorStartup(int privileged ATTRIBUTE_UNUSED)
 
     if ((pciret = pci_system_init()) != 0) {
         char ebuf[256];
-        VIR_INFO("Failed to initialize libpciaccess: %s",
-                 virStrerror(pciret, ebuf, sizeof ebuf));
+        VIR_ERROR("Failed to initialize libpciaccess: %s",
+                  virStrerror(pciret, ebuf, sizeof ebuf));
         ret = -1;
         goto out;
     }
-- 
1.7.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


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