mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-13 11:15:08 +00:00
* src/xen_unified.[ch] src/proxy_internal.c src/xen_internal.c
src/xend_internal.c src/xm_internal.c src/xs_internal.c: cleanup the xen subdriver table, remove the type entry and always return "Xen" from the unified entry point. Daniel
This commit is contained in:
parent
2b3c49b6ab
commit
ed5e20baab
@ -1,3 +1,10 @@
|
|||||||
|
Mon Dec 3 10:32:10 CET 2007 Daniel Veillard <veillard@redhat.com>
|
||||||
|
|
||||||
|
* src/xen_unified.[ch] src/proxy_internal.c src/xen_internal.c
|
||||||
|
src/xend_internal.c src/xm_internal.c src/xs_internal.c:
|
||||||
|
cleanup the xen subdriver table, remove the type entry and
|
||||||
|
always return "Xen" from the unified entry point.
|
||||||
|
|
||||||
Sat Dec 1 10:42:34 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
Sat Dec 1 10:42:34 EST 2007 Daniel P. Berrange <berrange@redhat.com>
|
||||||
|
|
||||||
* src/hash.c: reset error object when releasing connection
|
* src/hash.c: reset error object when releasing connection
|
||||||
|
@ -42,7 +42,6 @@ static char *xenProxyDomainGetOSType(virDomainPtr domain);
|
|||||||
struct xenUnifiedDriver xenProxyDriver = {
|
struct xenUnifiedDriver xenProxyDriver = {
|
||||||
xenProxyOpen, /* open */
|
xenProxyOpen, /* open */
|
||||||
xenProxyClose, /* close */
|
xenProxyClose, /* close */
|
||||||
NULL, /* type */
|
|
||||||
xenProxyGetVersion, /* version */
|
xenProxyGetVersion, /* version */
|
||||||
NULL, /* hostname */
|
NULL, /* hostname */
|
||||||
NULL, /* URI */
|
NULL, /* URI */
|
||||||
|
@ -671,7 +671,6 @@ typedef struct xen_op_v2_dom xen_op_v2_dom;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef PROXY
|
#ifndef PROXY
|
||||||
static const char * xenHypervisorGetType(virConnectPtr conn);
|
|
||||||
static unsigned long xenHypervisorGetMaxMemory(virDomainPtr domain);
|
static unsigned long xenHypervisorGetMaxMemory(virDomainPtr domain);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -679,7 +678,6 @@ static unsigned long xenHypervisorGetMaxMemory(virDomainPtr domain);
|
|||||||
struct xenUnifiedDriver xenHypervisorDriver = {
|
struct xenUnifiedDriver xenHypervisorDriver = {
|
||||||
xenHypervisorOpen, /* open */
|
xenHypervisorOpen, /* open */
|
||||||
xenHypervisorClose, /* close */
|
xenHypervisorClose, /* close */
|
||||||
xenHypervisorGetType, /* type */
|
|
||||||
xenHypervisorGetVersion, /* version */
|
xenHypervisorGetVersion, /* version */
|
||||||
NULL, /* hostname */
|
NULL, /* hostname */
|
||||||
NULL, /* URI */
|
NULL, /* URI */
|
||||||
@ -2112,28 +2110,6 @@ xenHypervisorClose(virConnectPtr conn)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef PROXY
|
|
||||||
/**
|
|
||||||
* xenHypervisorGetType:
|
|
||||||
* @conn: pointer to the Xen Hypervisor block
|
|
||||||
*
|
|
||||||
* Get the version level of the Hypervisor running.
|
|
||||||
*
|
|
||||||
* Returns -1 in case of error, 0 otherwise. if the version can't be
|
|
||||||
* extracted by lack of capacities returns 0 and @hvVer is 0, otherwise
|
|
||||||
* @hvVer value is major * 1,000,000 + minor * 1,000 + release
|
|
||||||
*/
|
|
||||||
static const char *
|
|
||||||
xenHypervisorGetType(virConnectPtr conn)
|
|
||||||
{
|
|
||||||
if (!VIR_IS_CONNECT(conn)) {
|
|
||||||
virXenError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__, 0);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
return("Xen");
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xenHypervisorGetVersion:
|
* xenHypervisorGetVersion:
|
||||||
* @conn: pointer to the connection block
|
* @conn: pointer to the connection block
|
||||||
|
@ -321,13 +321,10 @@ xenUnifiedType (virConnectPtr conn)
|
|||||||
{
|
{
|
||||||
GET_PRIVATE(conn);
|
GET_PRIVATE(conn);
|
||||||
int i;
|
int i;
|
||||||
const char *ret;
|
|
||||||
|
|
||||||
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
|
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
|
||||||
if (priv->opened[i] && drivers[i]->type) {
|
if (priv->opened[i])
|
||||||
ret = drivers[i]->type (conn);
|
return "Xen";
|
||||||
if (ret) return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,6 @@ extern int xenUnifiedRegister (void);
|
|||||||
struct xenUnifiedDriver {
|
struct xenUnifiedDriver {
|
||||||
virDrvOpen open;
|
virDrvOpen open;
|
||||||
virDrvClose close;
|
virDrvClose close;
|
||||||
virDrvGetType type;
|
|
||||||
virDrvGetVersion version;
|
virDrvGetVersion version;
|
||||||
virDrvGetHostname getHostname;
|
virDrvGetHostname getHostname;
|
||||||
virDrvGetURI getURI;
|
virDrvGetURI getURI;
|
||||||
|
@ -49,7 +49,6 @@
|
|||||||
#include <xen/dom0_ops.h>
|
#include <xen/dom0_ops.h>
|
||||||
|
|
||||||
#ifndef PROXY
|
#ifndef PROXY
|
||||||
static const char * xenDaemonGetType(virConnectPtr conn);
|
|
||||||
static int xenDaemonListDomains(virConnectPtr conn, int *ids, int maxids);
|
static int xenDaemonListDomains(virConnectPtr conn, int *ids, int maxids);
|
||||||
static int xenDaemonNumOfDomains(virConnectPtr conn);
|
static int xenDaemonNumOfDomains(virConnectPtr conn);
|
||||||
static int xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames);
|
static int xenDaemonListDefinedDomains(virConnectPtr conn, char **const names, int maxnames);
|
||||||
@ -68,7 +67,6 @@ static int xenDaemonDomainCoreDump(virDomainPtr domain, const char *filename,
|
|||||||
struct xenUnifiedDriver xenDaemonDriver = {
|
struct xenUnifiedDriver xenDaemonDriver = {
|
||||||
xenDaemonOpen, /* open */
|
xenDaemonOpen, /* open */
|
||||||
xenDaemonClose, /* close */
|
xenDaemonClose, /* close */
|
||||||
xenDaemonGetType, /* type */
|
|
||||||
xenDaemonGetVersion, /* version */
|
xenDaemonGetVersion, /* version */
|
||||||
NULL, /* hostname */
|
NULL, /* hostname */
|
||||||
NULL, /* URI */
|
NULL, /* URI */
|
||||||
@ -2705,28 +2703,6 @@ xenDaemonNodeGetTopology(virConnectPtr conn, virBufferPtr xml) {
|
|||||||
return (ret);
|
return (ret);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef PROXY
|
|
||||||
/**
|
|
||||||
* xenDaemonGetType:
|
|
||||||
* @conn: pointer to the Xen Daemon block
|
|
||||||
*
|
|
||||||
* Get the version level of the Hypervisor running.
|
|
||||||
*
|
|
||||||
* Returns -1 in case of error, 0 otherwise. if the version can't be
|
|
||||||
* extracted by lack of capacities returns 0 and @hvVer is 0, otherwise
|
|
||||||
* @hvVer value is major * 1,000,000 + minor * 1,000 + release
|
|
||||||
*/
|
|
||||||
static const char *
|
|
||||||
xenDaemonGetType(virConnectPtr conn)
|
|
||||||
{
|
|
||||||
if (!VIR_IS_CONNECT(conn)) {
|
|
||||||
virXendError(conn, VIR_ERR_INVALID_CONN, __FUNCTION__);
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
return("XenDaemon");
|
|
||||||
}
|
|
||||||
#endif /* ! PROXY */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* xenDaemonGetVersion:
|
* xenDaemonGetVersion:
|
||||||
* @conn: pointer to the Xen Daemon block
|
* @conn: pointer to the Xen Daemon block
|
||||||
|
@ -81,7 +81,6 @@ static time_t lastRefresh = 0;
|
|||||||
struct xenUnifiedDriver xenXMDriver = {
|
struct xenUnifiedDriver xenXMDriver = {
|
||||||
xenXMOpen, /* open */
|
xenXMOpen, /* open */
|
||||||
xenXMClose, /* close */
|
xenXMClose, /* close */
|
||||||
xenXMGetType, /* type */
|
|
||||||
NULL, /* version */
|
NULL, /* version */
|
||||||
NULL, /* hostname */
|
NULL, /* hostname */
|
||||||
NULL, /* URI */
|
NULL, /* URI */
|
||||||
@ -510,13 +509,6 @@ int xenXMClose(virConnectPtr conn ATTRIBUTE_UNUSED) {
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Our backend type
|
|
||||||
*/
|
|
||||||
const char *xenXMGetType(virConnectPtr conn ATTRIBUTE_UNUSED) {
|
|
||||||
return ("XenXM");
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Since these are all offline domains, we only return info about
|
* Since these are all offline domains, we only return info about
|
||||||
* VCPUs and memory.
|
* VCPUs and memory.
|
||||||
|
@ -45,7 +45,6 @@ static char *xenStoreDomainGetOSType(virDomainPtr domain);
|
|||||||
struct xenUnifiedDriver xenStoreDriver = {
|
struct xenUnifiedDriver xenStoreDriver = {
|
||||||
xenStoreOpen, /* open */
|
xenStoreOpen, /* open */
|
||||||
xenStoreClose, /* close */
|
xenStoreClose, /* close */
|
||||||
NULL, /* type */
|
|
||||||
NULL, /* version */
|
NULL, /* version */
|
||||||
NULL, /* hostname */
|
NULL, /* hostname */
|
||||||
NULL, /* URI */
|
NULL, /* URI */
|
||||||
|
Loading…
Reference in New Issue
Block a user