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