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

[libvirt] [PATCH 1/2] storage: Alter check for default managed setting



Only alter the managed setting if it wasn't provided. If someone provided
'no', then honor that rather than overwriting.

Signed-off-by: John Ferlan <jferlan redhat com>
---
 src/storage/storage_backend_scsi.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/storage/storage_backend_scsi.c b/src/storage/storage_backend_scsi.c
index f7378d3..f3e62fb 100644
--- a/src/storage/storage_backend_scsi.c
+++ b/src/storage/storage_backend_scsi.c
@@ -227,12 +227,12 @@ createVport(virConnectPtr conn,
               fchost->wwnn, fchost->wwpn);
 
 
-    /* Since we're creating the vHBA, then we need to manage removing it
+    /* Since we're creating the vHBA, then we may need to manage removing it
      * as well. Since we need this setting to "live" through a libvirtd
      * restart, we need to save the persistent configuration. So if not
-     * already defined as YES, then force the issue.
+     * already defined as YES or NO, then force the issue.
      */
-    if (fchost->managed != VIR_TRISTATE_BOOL_YES) {
+    if (fchost->managed == VIR_TRISTATE_BOOL_ABSENT) {
         fchost->managed = VIR_TRISTATE_BOOL_YES;
         if (configFile) {
             if (virStoragePoolSaveConfig(configFile, def) < 0)
-- 
2.9.4


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