[libvirt] [PATCH v1 06/11] virStoragePoolObjListAdd: Turn boolean arg into flags

Ján Tomko jtomko at redhat.com
Mon Aug 19 14:24:34 UTC 2019


On Fri, May 24, 2019 at 04:35:42PM +0200, Michal Privoznik wrote:
>There will be more boolean information that we want to pass to
>this function. Instead of having them in separate arguments per
>each one, use @flags.
>
>Signed-off-by: Michal Privoznik <mprivozn at redhat.com>
>---
> src/conf/virstorageobj.c     | 16 +++++++++++-----
> src/conf/virstorageobj.h     |  6 +++++-
> src/storage/storage_driver.c |  5 +++--
> src/test/test_driver.c       |  7 ++++---
> 4 files changed, 23 insertions(+), 11 deletions(-)
>
>diff --git a/src/conf/virstorageobj.h b/src/conf/virstorageobj.h
>index 090dd6a7e6..fe62515b50 100644
>--- a/src/conf/virstorageobj.h
>+++ b/src/conf/virstorageobj.h
>@@ -192,10 +192,14 @@ virStoragePoolObjVolumeListExport(virConnectPtr conn,
>                                   virStorageVolPtr **vols,
>                                   virStoragePoolVolumeACLFilter filter);
>
>+enum {
>+    VIR_STORAGE_POOL_OBJ_LIST_ADD_CHECK_LIVE = (1 << 1),
>+};
>+


typedef enum {
} virStoragePoolObjListFlags;

even though it will not be used, it is nice to name it.

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190819/969daf8d/attachment-0001.sig>


More information about the libvir-list mailing list