[libvirt] [PATCH 1/9] Add flags argument to virStorageVolDefParse*
Peter Krempa
pkrempa at redhat.com
Wed Feb 25 08:17:26 UTC 2015
On Thu, Feb 19, 2015 at 15:59:09 +0100, Ján Tomko wrote:
> Allow the callers to pass down libvirt-internal flags.
> ---
> src/conf/storage_conf.c | 25 ++++++++++++++++---------
> src/conf/storage_conf.h | 9 ++++++---
> src/esx/esx_storage_backend_vmfs.c | 4 ++--
> src/parallels/parallels_storage.c | 6 +++---
> src/phyp/phyp_driver.c | 2 +-
> src/storage/storage_driver.c | 4 ++--
> src/test/test_driver.c | 6 +++---
> src/vbox/vbox_storage.c | 2 +-
> tests/storagebackendsheepdogtest.c | 2 +-
> tests/storagevolxml2argvtest.c | 4 ++--
> tests/storagevolxml2xmltest.c | 13 ++++++++-----
> 11 files changed, 45 insertions(+), 32 deletions(-)
>
> diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c
> index e9aaa8a..c8a860b 100644
> --- a/src/conf/storage_conf.c
> +++ b/src/conf/storage_conf.c
> @@ -1245,7 +1245,8 @@ virStorageSize(const char *unit,
>
> static virStorageVolDefPtr
> virStorageVolDefParseXML(virStoragePoolDefPtr pool,
> - xmlXPathContextPtr ctxt)
> + xmlXPathContextPtr ctxt,
> + unsigned long flags)
Almost every other place in libvirt uses an integer for flags. Why did
you use a long?
> {
> virStorageVolDefPtr ret;
> virStorageVolOptionsPtr options;
> @@ -1259,6 +1260,8 @@ virStorageVolDefParseXML(virStoragePoolDefPtr pool,
> size_t i;
> int n;
>
> + virCheckFlags(0, NULL);
> +
> options = virStorageVolOptionsForPoolType(pool->type);
> if (options == NULL)
> return NULL;
...
ACK after the release if you explain why you used the "long" type or
change it to int.
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150225/8df3215b/attachment-0001.sig>
More information about the libvir-list
mailing list