[PATCH 16/16] Xen: remove xendConfigVersion from driver private struct

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

 



xendConfigVersion is no longer used, so remove it from the
xenUnifiedPrivate struct.

Signed-off-by: Jim Fehlig <jfehlig@xxxxxxxx>
---
 src/xen/xen_driver.c    |  1 -
 src/xen/xen_driver.h    |  2 --
 src/xen/xend_internal.c | 37 ++++---------------------------------
 3 files changed, 4 insertions(+), 36 deletions(-)

diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 6f25625..b40650f 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -487,7 +487,6 @@ xenUnifiedConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int f
     conn->privateData = priv;
 
     priv->handle = -1;
-    priv->xendConfigVersion = -1;
     priv->xshandle = NULL;
 
 
diff --git a/src/xen/xen_driver.h b/src/xen/xen_driver.h
index b5582a1..5d50a90 100644
--- a/src/xen/xen_driver.h
+++ b/src/xen/xen_driver.h
@@ -126,8 +126,6 @@ struct _xenUnifiedPrivate {
     virDomainXMLOptionPtr xmlopt;
     int handle;			/* Xen hypervisor handle */
 
-    int xendConfigVersion;      /* XenD config version */
-
     /* connection to xend */
     struct sockaddr_storage addr;
     socklen_t addrlen;
diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c
index cd783a1..db3820d 100644
--- a/src/xen/xend_internal.c
+++ b/src/xen/xend_internal.c
@@ -864,31 +864,6 @@ xenDaemonDomainLookupByName_ids(virConnectPtr xend,
 }
 
 
-static int
-xend_detect_config_version(virConnectPtr conn)
-{
-    struct sexpr *root;
-    const char *value;
-    xenUnifiedPrivatePtr priv = conn->privateData;
-    int ret = -1;
-
-    root = sexpr_get(conn, "/xend/node/");
-    if (root == NULL)
-        return ret;
-
-    value = sexpr_node(root, "node/xend_config_format");
-
-    if (value) {
-        if (virStrToLong_i(value, NULL, 10, &priv->xendConfigVersion) < 0)
-            goto cleanup;
-    }
-    ret = 0;
- cleanup:
-    sexpr_free(root);
-    return ret;
-}
-
-
 /**
  * sexpr_to_xend_domain_state:
  * @root: an S-Expression describing a domain
@@ -1186,22 +1161,19 @@ xenDaemonOpen(virConnectPtr conn,
             virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__);
             goto failed;
         }
-        if (xenDaemonOpen_unix(conn, conn->uri->path) < 0 ||
-            xend_detect_config_version(conn) == -1)
+        if (xenDaemonOpen_unix(conn, conn->uri->path) < 0)
             goto failed;
     } else if (STRCASEEQ(conn->uri->scheme, "xen")) {
         /*
          * try first to open the unix socket
          */
-        if (xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket") == 0 &&
-            xend_detect_config_version(conn) != -1)
+        if (xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket") == 0)
             goto done;
 
         /*
          * try though http on port 8000
          */
-        if (xenDaemonOpen_tcp(conn, "localhost", "8000") < 0 ||
-            xend_detect_config_version(conn) == -1)
+        if (xenDaemonOpen_tcp(conn, "localhost", "8000") < 0)
             goto failed;
     } else if (STRCASEEQ(conn->uri->scheme, "http")) {
         if (conn->uri->port &&
@@ -1210,8 +1182,7 @@ xenDaemonOpen(virConnectPtr conn,
 
         if (xenDaemonOpen_tcp(conn,
                               conn->uri->server ? conn->uri->server : "localhost",
-                              port ? port : "8000") < 0 ||
-            xend_detect_config_version(conn) == -1)
+                              port ? port : "8000") < 0)
             goto failed;
     } else {
         virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__);
-- 
2.1.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]