]> xenbits.xensource.com Git - libvirt.git/commitdiff
Xen: remove xendConfigVersion from driver private struct
authorJim Fehlig <jfehlig@suse.com>
Tue, 15 Dec 2015 02:53:16 +0000 (19:53 -0700)
committerJim Fehlig <jfehlig@suse.com>
Fri, 18 Dec 2015 04:28:48 +0000 (21:28 -0700)
xendConfigVersion is no longer used, so remove it from the
xenUnifiedPrivate struct.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
src/xen/xen_driver.c
src/xen/xen_driver.h
src/xen/xend_internal.c

index 55df3d62dbd496a90ddb15b45dfabfaefce59343..2eec31cf6543f7e3075d4ad5a2162f02acade2ef 100644 (file)
@@ -487,7 +487,6 @@ xenUnifiedConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int f
     conn->privateData = priv;
 
     priv->handle = -1;
-    priv->xendConfigVersion = -1;
     priv->xshandle = NULL;
 
 
index b5582a1e2f4a8b259332fdb70115192171c91000..5d50a9068cfd6b2e706ac2d2f69c4a06a846828b 100644 (file)
@@ -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;
index cd783a1033d3c6f801c01467ac8f8dd8e60b3ff1..db3820d9651bb3b088d89cd7747faf0b2073975d 100644 (file)
@@ -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__);