[PATCH 04/10] list: Implement listAllStoragePools for storage driver

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

 



src/storage/storage_driver.c: Implement listAllStoragePools.
---
 src/storage/storage_driver.c |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c
index 3dc66db..4f99eb9 100644
--- a/src/storage/storage_driver.c
+++ b/src/storage/storage_driver.c
@@ -2285,6 +2285,23 @@ cleanup:
     return ret;
 }
 
+static int
+storageListAllPools(virConnectPtr conn,
+                    virStoragePoolPtr **pools,
+                    unsigned int flags)
+{
+    virStorageDriverStatePtr driver = conn->storagePrivateData;
+    int ret = -1;
+
+    virCheckFlags(VIR_CONNECT_LIST_STORAGE_POOLS_FILTERS_ALL, -1);
+
+    storageDriverLock(driver);
+    ret = virStoragePoolList(conn, driver->pools, pools, flags);
+    storageDriverUnlock(driver);
+
+    return ret;
+}
+
 static virStorageDriver storageDriver = {
     .name = "storage",
     .open = storageOpen, /* 0.4.0 */
@@ -2293,6 +2310,7 @@ static virStorageDriver storageDriver = {
     .listPools = storageListPools, /* 0.4.0 */
     .numOfDefinedPools = storageNumDefinedPools, /* 0.4.0 */
     .listDefinedPools = storageListDefinedPools, /* 0.4.0 */
+    .listAllPools = storageListAllPools, /* 0.10.0 */
     .findPoolSources = storageFindPoolSources, /* 0.4.0 */
     .poolLookupByName = storagePoolLookupByName, /* 0.4.0 */
     .poolLookupByUUID = storagePoolLookupByUUID, /* 0.4.0 */
-- 
1.7.7.3

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