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

[libvirt] [PATCH 01/20] vbox: Rewrite vboxStorageOpen



---
 src/vbox/vbox_common.c        |   25 +++++++++++++++++++++++++
 src/vbox/vbox_tmpl.c          |   21 ---------------------
 src/vbox/vbox_uniformed_api.h |    2 ++
 3 files changed, 27 insertions(+), 21 deletions(-)

diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
index 4bb01b0..15a331e 100644
--- a/src/vbox/vbox_common.c
+++ b/src/vbox/vbox_common.c
@@ -8289,6 +8289,31 @@ static char *vboxNetworkGetXMLDesc(virNetworkPtr network, unsigned int flags)
 }
 
 /**
+ * The Storage Functions here on
+ */
+
+virDrvOpenStatus vboxStorageOpen(virConnectPtr conn,
+                                 virConnectAuthPtr auth ATTRIBUTE_UNUSED,
+                                 unsigned int flags)
+{
+    vboxGlobalData *data = conn->privateData;
+
+    virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
+
+    if (STRNEQ(conn->driver->name, "VBOX"))
+        return VIR_DRV_OPEN_DECLINED;
+
+    if ((data->pFuncs      == NULL) ||
+        (data->vboxObj     == NULL) ||
+        (data->vboxSession == NULL))
+        return VIR_DRV_OPEN_ERROR;
+
+    VIR_DEBUG("vbox storage initialized");
+    /* conn->storagePrivateData = some storage specific data */
+    return VIR_DRV_OPEN_SUCCESS;
+}
+
+/**
  * Function Tables
  */
 
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 67bd408..d6d4dd7 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 virDrvOpenStatus vboxStorageOpen(virConnectPtr conn,
-                                        virConnectAuthPtr auth ATTRIBUTE_UNUSED,
-                                        unsigned int flags)
-{
-    vboxGlobalData *data = conn->privateData;
-
-    virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
-
-    if (STRNEQ(conn->driver->name, "VBOX"))
-        return VIR_DRV_OPEN_DECLINED;
-
-    if ((data->pFuncs      == NULL) ||
-        (data->vboxObj     == NULL) ||
-        (data->vboxSession == NULL))
-        return VIR_DRV_OPEN_ERROR;
-
-    VIR_DEBUG("vbox storage initialized");
-    /* conn->storagePrivateData = some storage specific data */
-    return VIR_DRV_OPEN_SUCCESS;
-}
-
 static int vboxStorageClose(virConnectPtr conn)
 {
     VIR_DEBUG("vbox storage uninitialized");
diff --git a/src/vbox/vbox_uniformed_api.h b/src/vbox/vbox_uniformed_api.h
index b92c932..696a86d 100644
--- a/src/vbox/vbox_uniformed_api.h
+++ b/src/vbox/vbox_uniformed_api.h
@@ -586,6 +586,8 @@ typedef struct {
 
 virDomainPtr vboxDomainLookupByUUID(virConnectPtr conn,
                                     const unsigned char *uuid);
+virDrvOpenStatus vboxStorageOpen(virConnectPtr conn, virConnectAuthPtr auth,
+                                 unsigned int flags);
 
 /* Version specified functions for installing uniformed API */
 void vbox22InstallUniformedAPI(vboxUniformedAPI *pVBoxAPI);
-- 
1.7.9.5


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