--- src/vbox/vbox_common.c | 20 ++++++++++++++++++++ src/vbox/vbox_tmpl.c | 21 --------------------- src/vbox/vbox_uniformed_api.h | 1 + 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c index e245fd0..6996e7a 100644 --- a/src/vbox/vbox_common.c +++ b/src/vbox/vbox_common.c @@ -8341,6 +8341,26 @@ int vboxConnectListStoragePools(virConnectPtr conn ATTRIBUTE_UNUSED, return numActive; } +virStoragePoolPtr vboxStoragePoolLookupByName(virConnectPtr conn, const char *name) +{ + virStoragePoolPtr ret = NULL; + + /** Current limitation of the function: since + * the default pool doesn't have UUID just assign + * one till vbox can handle pools + */ + if (STREQ("default-pool", name)) { + unsigned char uuid[VIR_UUID_BUFLEN]; + const char *uuidstr = "1deff1ff-1481-464f-967f-a50fe8936cc4"; + + ignore_value(virUUIDParse(uuidstr, uuid)); + + ret = virGetStoragePool(conn, name, uuid, NULL, NULL); + } + + return ret; +} + /** * Function Tables */ diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index 37108cf..3cca406 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -2021,27 +2021,6 @@ _registerDomainEvent(virDriverPtr driver) * The Storage Functions here on */ -static virStoragePoolPtr -vboxStoragePoolLookupByName(virConnectPtr conn, const char *name) -{ - virStoragePoolPtr ret = NULL; - - /** Current limitation of the function: since - * the default pool doesn't have UUID just assign - * one till vbox can handle pools - */ - if (STREQ("default-pool", name)) { - unsigned char uuid[VIR_UUID_BUFLEN]; - const char *uuidstr = "1deff1ff-1481-464f-967f-a50fe8936cc4"; - - ignore_value(virUUIDParse(uuidstr, uuid)); - - ret = virGetStoragePool(conn, name, uuid, NULL, NULL); - } - - return ret; -} - static int vboxStoragePoolNumOfVolumes(virStoragePoolPtr pool) { VBOX_OBJECT_CHECK(pool->conn, int, -1); diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h index aa7d4af..cffb7f7 100644 --- a/src/vbox/vbox_uniformed_api.h +++ b/src/vbox/vbox_uniformed_api.h @@ -591,6 +591,7 @@ virDrvOpenStatus vboxStorageOpen(virConnectPtr conn, virConnectAuthPtr auth, int vboxStorageClose(virConnectPtr conn); int vboxConnectNumOfStoragePools(virConnectPtr conn); int vboxConnectListStoragePools(virConnectPtr conn, char **const names, int nnames); +virStoragePoolPtr vboxStoragePoolLookupByName(virConnectPtr conn, const char *name); /* Version specified functions for installing uniformed API */ void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI); -- 1.7.9.5 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list