Xen: remove xendConfigVersion from driver private struct

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

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Jim Fehlig 2015-12-14 19:53:16 -07:00
parent 60ac2aa821
commit be08842e47
3 changed files with 4 additions and 36 deletions

View File

@ -487,7 +487,6 @@ xenUnifiedConnectOpen(virConnectPtr conn, virConnectAuthPtr auth, unsigned int f
conn->privateData = priv; conn->privateData = priv;
priv->handle = -1; priv->handle = -1;
priv->xendConfigVersion = -1;
priv->xshandle = NULL; priv->xshandle = NULL;

View File

@ -126,8 +126,6 @@ struct _xenUnifiedPrivate {
virDomainXMLOptionPtr xmlopt; virDomainXMLOptionPtr xmlopt;
int handle; /* Xen hypervisor handle */ int handle; /* Xen hypervisor handle */
int xendConfigVersion; /* XenD config version */
/* connection to xend */ /* connection to xend */
struct sockaddr_storage addr; struct sockaddr_storage addr;
socklen_t addrlen; socklen_t addrlen;

View 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: * sexpr_to_xend_domain_state:
* @root: an S-Expression describing a domain * @root: an S-Expression describing a domain
@ -1186,22 +1161,19 @@ xenDaemonOpen(virConnectPtr conn,
virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__); virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__);
goto failed; goto failed;
} }
if (xenDaemonOpen_unix(conn, conn->uri->path) < 0 || if (xenDaemonOpen_unix(conn, conn->uri->path) < 0)
xend_detect_config_version(conn) == -1)
goto failed; goto failed;
} else if (STRCASEEQ(conn->uri->scheme, "xen")) { } else if (STRCASEEQ(conn->uri->scheme, "xen")) {
/* /*
* try first to open the unix socket * try first to open the unix socket
*/ */
if (xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket") == 0 && if (xenDaemonOpen_unix(conn, "/var/lib/xend/xend-socket") == 0)
xend_detect_config_version(conn) != -1)
goto done; goto done;
/* /*
* try though http on port 8000 * try though http on port 8000
*/ */
if (xenDaemonOpen_tcp(conn, "localhost", "8000") < 0 || if (xenDaemonOpen_tcp(conn, "localhost", "8000") < 0)
xend_detect_config_version(conn) == -1)
goto failed; goto failed;
} else if (STRCASEEQ(conn->uri->scheme, "http")) { } else if (STRCASEEQ(conn->uri->scheme, "http")) {
if (conn->uri->port && if (conn->uri->port &&
@ -1210,8 +1182,7 @@ xenDaemonOpen(virConnectPtr conn,
if (xenDaemonOpen_tcp(conn, if (xenDaemonOpen_tcp(conn,
conn->uri->server ? conn->uri->server : "localhost", conn->uri->server ? conn->uri->server : "localhost",
port ? port : "8000") < 0 || port ? port : "8000") < 0)
xend_detect_config_version(conn) == -1)
goto failed; goto failed;
} else { } else {
virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__); virReportError(VIR_ERR_NO_CONNECT, __FUNCTION__);