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

[libvirt] [PATCH 03/11] vz: remove drivername field from vzConn structure



No need to remember connection name and have corresponding
domain type to keep backward compatibility with former
'parallels' driver. It is enough to be able to accept 'parallels'
uri and domain types.

Signed-off-by: Maxim Nestratov <mnestratov virtuozzo com>
---
 src/vz/vz_driver.c | 2 --
 src/vz/vz_utils.c  | 5 +----
 src/vz/vz_utils.h  | 1 -
 3 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
index 47a5060..9de88cd 100644
--- a/src/vz/vz_driver.c
+++ b/src/vz/vz_driver.c
@@ -228,8 +228,6 @@ vzOpenDefault(virConnectPtr conn)
         goto err_free;
     }
 
-    privconn->drivername = conn->driver->name;
-
     if (prlsdkInit()) {
         VIR_DEBUG("%s", _("Can't initialize Parallels SDK"));
         goto err_free;
diff --git a/src/vz/vz_utils.c b/src/vz/vz_utils.c
index fed48a5..64e469c 100644
--- a/src/vz/vz_utils.c
+++ b/src/vz/vz_utils.c
@@ -178,10 +178,7 @@ vzNewDomain(vzConnPtr privconn, char *name, const unsigned char *uuid)
     pdom->cache.stats = PRL_INVALID_HANDLE;
     pdom->cache.count = -1;
 
-    if (STREQ(privconn->drivername, "vz"))
-        def->virtType = VIR_DOMAIN_VIRT_VZ;
-    else
-        def->virtType = VIR_DOMAIN_VIRT_PARALLELS;
+    def->virtType = VIR_DOMAIN_VIRT_VZ;
 
     if (!(dom = virDomainObjListAdd(privconn->domains, def,
                                     privconn->xmlopt,
diff --git a/src/vz/vz_utils.h b/src/vz/vz_utils.h
index f373850..b415b0f 100644
--- a/src/vz/vz_utils.h
+++ b/src/vz/vz_utils.h
@@ -70,7 +70,6 @@ struct _vzConn {
     virCapsPtr caps;
     virDomainXMLOptionPtr xmlopt;
     virObjectEventStatePtr domainEventState;
-    const char *drivername;
     /* Immutable pointer, self-locking APIs */
     virConnectCloseCallbackDataPtr closeCallback;
     unsigned long vzVersion;
-- 
2.4.3


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