[PATCH] storage: Fix build due to recent storage backend code movement

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

 



Commit id '5f07c3c07' broke the freebsd build in the libvirt CI test
environment because the UMOUNT was not defined unless WITH_STORAGE_FS
is defined.

So remove the virStorageBackendUmountLocal from storage_util.c,h and
restore the code back in the storage_backend_fs.c and _vstorage.c
modules.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---

 This is a build breaker - I'll push shortly...

 src/storage/storage_backend_fs.c       | 11 ++++++++++-
 src/storage/storage_backend_vstorage.c | 11 ++++++++++-
 src/storage/storage_util.c             | 18 ------------------
 src/storage/storage_util.h             |  2 --
 4 files changed, 20 insertions(+), 22 deletions(-)

diff --git a/src/storage/storage_backend_fs.c b/src/storage/storage_backend_fs.c
index 9710648..54bcc57 100644
--- a/src/storage/storage_backend_fs.c
+++ b/src/storage/storage_backend_fs.c
@@ -452,6 +452,8 @@ static int
 virStorageBackendFileSystemStop(virConnectPtr conn ATTRIBUTE_UNUSED,
                                 virStoragePoolObjPtr pool)
 {
+    virCommandPtr cmd = NULL;
+    int ret = -1;
     int rc;
 
     if (virStorageBackendFileSystemIsValid(pool) < 0)
@@ -461,7 +463,14 @@ virStorageBackendFileSystemStop(virConnectPtr conn ATTRIBUTE_UNUSED,
     if ((rc = virStorageBackendFileSystemIsMounted(pool)) != 1)
         return rc;
 
-    return virStorageBackendUmountLocal(pool);
+    cmd = virCommandNewArgList(UMOUNT, pool->def->target.path, NULL);
+    if (virCommandRun(cmd, NULL) < 0)
+        goto cleanup;
+
+    ret = 0;
+ cleanup:
+    virCommandFree(cmd);
+    return ret;
 }
 #endif /* WITH_STORAGE_FS */
 
diff --git a/src/storage/storage_backend_vstorage.c b/src/storage/storage_backend_vstorage.c
index d3a12fb..0e945af 100644
--- a/src/storage/storage_backend_vstorage.c
+++ b/src/storage/storage_backend_vstorage.c
@@ -125,13 +125,22 @@ static int
 virStorageBackendVzPoolStop(virConnectPtr conn ATTRIBUTE_UNUSED,
                             virStoragePoolObjPtr pool)
 {
+    virCommandPtr cmd = NULL;
+    int ret = -1;
     int rc;
 
     /* Short-circuit if already unmounted */
     if ((rc = virStorageBackendVzIsMounted(pool)) != 1)
         return rc;
 
-    return virStorageBackendUnmountLocal(pool);
+    cmd = virCommandNewArgList(UMOUNT, pool->def->target.path, NULL);
+    if (virCommandRun(cmd, NULL) < 0)
+        goto cleanup;
+
+    ret = 0;
+ cleanup:
+    virCommandFree(cmd);
+    return ret;
 }
 
 
diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c
index fbe1844..a665bac 100644
--- a/src/storage/storage_util.c
+++ b/src/storage/storage_util.c
@@ -2803,24 +2803,6 @@ virStorageBackendBuildLocal(virStoragePoolObjPtr pool)
 }
 
 
-int
-virStorageBackendUmountLocal(virStoragePoolObjPtr pool)
-{
-    int ret = -1;
-    virCommandPtr cmd = virCommandNewArgList(UMOUNT, pool->def->target.path,
-                                             NULL);
-
-    if (virCommandRun(cmd, NULL) < 0)
-        goto cleanup;
-
-    ret = 0;
-
- cleanup:
-    virCommandFree(cmd);
-    return ret;
-}
-
-
 /**
  * @conn connection to report errors against
  * @pool storage pool to delete
diff --git a/src/storage/storage_util.h b/src/storage/storage_util.h
index 49df530..326d555 100644
--- a/src/storage/storage_util.h
+++ b/src/storage/storage_util.h
@@ -87,8 +87,6 @@ int virStorageBackendVolWipeLocal(virConnectPtr conn,
 /* Local/Common Storage Pool Backend APIs */
 int virStorageBackendBuildLocal(virStoragePoolObjPtr pool);
 
-int virStorageBackendUmountLocal(virStoragePoolObjPtr pool);
-
 int virStorageBackendDeleteLocal(virConnectPtr conn,
                                  virStoragePoolObjPtr pool,
                                  unsigned int flags);
-- 
2.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]
  Powered by Linux