On Tue, May 09, 2017 at 11:30:22 -0400, John Ferlan wrote:
Create/Use API to "walk" the storage pool object volume
list.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
src/conf/virstorageobj.c | 10 ++++++++++
src/conf/virstorageobj.h | 4 ++++
src/libvirt_private.syms | 1 +
src/storage/storage_backend_disk.c | 26 +++++++++++++++-----------
4 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/src/conf/virstorageobj.c b/src/conf/virstorageobj.c
index cc3464e..14feecb 100644
--- a/src/conf/virstorageobj.c
+++ b/src/conf/virstorageobj.c
@@ -343,6 +343,16 @@ virStoragePoolObjGetVolumesCount(virStoragePoolObjPtr obj)
virStorageVolDefPtr
+virStoragePoolObjForEachVolume(virStoragePoolObjPtr obj,
+ size_t curidx)
All 'foreach' functions in libvirt take a callback and iterate the
objects calling the callback. This is just a generic accessor. Naming it
foreach is very confusing.