Re: [PATCH 15/19] storage: Introduce virStoragePoolObjForEachVolume

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

 



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@xxxxxxxxxx>
> ---
>  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.

Attachment: signature.asc
Description: PGP signature

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