File 4039e22e-VIR_WARN-in-detect_scsi_host.patch of Package libvirt.11695

From 4039e22e460b25cd853bc5dc83b70dbd91ea3a19 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Bosdonnat?= <cbosdonnat@suse.com>
Date: Tue, 4 Nov 2014 15:12:39 +0100
Subject: [PATCH] Transform VIR_ERROR into VIR_WARN in detect_scsi_host_caps

If detect_scsi_host_caps reports errors but keeps libvirtd going on
startup, the user is misled by the error messages. Transforming them
into warning still shows the problems, but indicates this is not fatal.
---
 po/POTFILES.in                            |  1 -
 src/node_device/node_device_linux_sysfs.c | 22 +++++++++++-----------
 2 files changed, 11 insertions(+), 12 deletions(-)

Index: libvirt-1.2.5/po/POTFILES.in
===================================================================
--- libvirt-1.2.5.orig/po/POTFILES.in
+++ libvirt-1.2.5/po/POTFILES.in
@@ -79,7 +79,6 @@ src/network/bridge_driver.c
 src/network/bridge_driver_linux.c
 src/node_device/node_device_driver.c
 src/node_device/node_device_hal.c
-src/node_device/node_device_linux_sysfs.c
 src/node_device/node_device_udev.c
 src/nodeinfo.c
 src/nwfilter/nwfilter_dhcpsnoop.c
Index: libvirt-1.2.5/src/node_device/node_device_linux_sysfs.c
===================================================================
--- libvirt-1.2.5.orig/src/node_device/node_device_linux_sysfs.c
+++ libvirt-1.2.5/src/node_device/node_device_linux_sysfs.c
@@ -56,7 +56,7 @@ detect_scsi_host_caps(union _virNodeDevC
                           d->scsi_host.host,
                           "port_name",
                           &d->scsi_host.wwpn) < 0) {
-            VIR_ERROR(_("Failed to read WWPN for host%d"), d->scsi_host.host);
+            VIR_WARN("Failed to read WWPN for host%d", d->scsi_host.host);
             goto cleanup;
         }
 
@@ -64,7 +64,7 @@ detect_scsi_host_caps(union _virNodeDevC
                           d->scsi_host.host,
                           "node_name",
                           &d->scsi_host.wwnn) < 0) {
-            VIR_ERROR(_("Failed to read WWNN for host%d"), d->scsi_host.host);
+            VIR_WARN("Failed to read WWNN for host%d", d->scsi_host.host);
             goto cleanup;
         }
 
@@ -72,8 +72,8 @@ detect_scsi_host_caps(union _virNodeDevC
                           d->scsi_host.host,
                           "fabric_name",
                           &d->scsi_host.fabric_wwn) < 0) {
-            VIR_ERROR(_("Failed to read fabric WWN for host%d"),
-                      d->scsi_host.host);
+            VIR_WARN("Failed to read fabric WWN for host%d",
+                     d->scsi_host.host);
             goto cleanup;
         }
     }
@@ -85,8 +85,8 @@ detect_scsi_host_caps(union _virNodeDevC
                           d->scsi_host.host,
                           "max_npiv_vports",
                           &max_vports) < 0) {
-            VIR_ERROR(_("Failed to read max_npiv_vports for host%d"),
-                      d->scsi_host.host);
+            VIR_WARN("Failed to read max_npiv_vports for host%d",
+                     d->scsi_host.host);
             goto cleanup;
         }
 
@@ -94,22 +94,22 @@ detect_scsi_host_caps(union _virNodeDevC
                           d->scsi_host.host,
                           "npiv_vports_inuse",
                           &vports) < 0) {
-            VIR_ERROR(_("Failed to read npiv_vports_inuse for host%d"),
-                      d->scsi_host.host);
+            VIR_WARN("Failed to read npiv_vports_inuse for host%d",
+                     d->scsi_host.host);
             goto cleanup;
         }
 
         if (virStrToLong_i(max_vports, NULL, 10,
                            &d->scsi_host.max_vports) < 0) {
-            VIR_ERROR(_("Failed to parse value of max_npiv_vports '%s'"),
+            VIR_WARN("Failed to parse value of max_npiv_vports '%s'",
                       max_vports);
             goto cleanup;
         }
 
         if (virStrToLong_i(vports, NULL, 10,
                            &d->scsi_host.vports) < 0) {
-            VIR_ERROR(_("Failed to parse value of npiv_vports_inuse '%s'"),
-                      vports);
+            VIR_WARN("Failed to parse value of npiv_vports_inuse '%s'",
+                     vports);
             goto cleanup;
         }
     }