mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-26 18:41:17 +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>
|
||||
|
||||
* src/hash.c: reset error object when releasing connection
|
||||
|
@ -42,7 +42,6 @@ static char *xenProxyDomainGetOSType(virDomainPtr domain);
|
||||
struct xenUnifiedDriver xenProxyDriver = {
|
||||
xenProxyOpen, /* open */
|
||||
xenProxyClose, /* close */
|
||||
NULL, /* type */
|
||||
xenProxyGetVersion, /* version */
|
||||
NULL, /* hostname */
|
||||
NULL, /* URI */
|
||||
|
@ -671,7 +671,6 @@ typedef struct xen_op_v2_dom xen_op_v2_dom;
|
||||
#endif
|
||||
|
||||
#ifndef PROXY
|
||||
static const char * xenHypervisorGetType(virConnectPtr conn);
|
||||
static unsigned long xenHypervisorGetMaxMemory(virDomainPtr domain);
|
||||
#endif
|
||||
|
||||
@ -679,7 +678,6 @@ static unsigned long xenHypervisorGetMaxMemory(virDomainPtr domain);
|
||||
struct xenUnifiedDriver xenHypervisorDriver = {
|
||||
xenHypervisorOpen, /* open */
|
||||
xenHypervisorClose, /* close */
|
||||
xenHypervisorGetType, /* type */
|
||||
xenHypervisorGetVersion, /* version */
|
||||
NULL, /* hostname */
|
||||
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:
|
||||
* @conn: pointer to the connection block
|
||||
|
@ -321,13 +321,10 @@ xenUnifiedType (virConnectPtr conn)
|
||||
{
|
||||
GET_PRIVATE(conn);
|
||||
int i;
|
||||
const char *ret;
|
||||
|
||||
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
|
||||
if (priv->opened[i] && drivers[i]->type) {
|
||||
ret = drivers[i]->type (conn);
|
||||
if (ret) return ret;
|
||||
}
|
||||
if (priv->opened[i])
|
||||
return "Xen";
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
@ -39,7 +39,6 @@ extern int xenUnifiedRegister (void);
|
||||
struct xenUnifiedDriver {
|
||||
virDrvOpen open;
|
||||
virDrvClose close;
|
||||
virDrvGetType type;
|
||||
virDrvGetVersion version;
|
||||
virDrvGetHostname getHostname;
|
||||
virDrvGetURI getURI;
|
||||
|
@ -49,7 +49,6 @@
|
||||
#include <xen/dom0_ops.h>
|
||||
|
||||
#ifndef PROXY
|
||||
static const char * xenDaemonGetType(virConnectPtr conn);
|
||||
static int xenDaemonListDomains(virConnectPtr conn, int *ids, int maxids);
|
||||
static int xenDaemonNumOfDomains(virConnectPtr conn);
|
||||
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 = {
|
||||
xenDaemonOpen, /* open */
|
||||
xenDaemonClose, /* close */
|
||||
xenDaemonGetType, /* type */
|
||||
xenDaemonGetVersion, /* version */
|
||||
NULL, /* hostname */
|
||||
NULL, /* URI */
|
||||
@ -2705,28 +2703,6 @@ xenDaemonNodeGetTopology(virConnectPtr conn, virBufferPtr xml) {
|
||||
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:
|
||||
* @conn: pointer to the Xen Daemon block
|
||||
|
@ -81,7 +81,6 @@ static time_t lastRefresh = 0;
|
||||
struct xenUnifiedDriver xenXMDriver = {
|
||||
xenXMOpen, /* open */
|
||||
xenXMClose, /* close */
|
||||
xenXMGetType, /* type */
|
||||
NULL, /* version */
|
||||
NULL, /* hostname */
|
||||
NULL, /* URI */
|
||||
@ -510,13 +509,6 @@ int xenXMClose(virConnectPtr conn ATTRIBUTE_UNUSED) {
|
||||
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
|
||||
* VCPUs and memory.
|
||||
|
@ -45,7 +45,6 @@ static char *xenStoreDomainGetOSType(virDomainPtr domain);
|
||||
struct xenUnifiedDriver xenStoreDriver = {
|
||||
xenStoreOpen, /* open */
|
||||
xenStoreClose, /* close */
|
||||
NULL, /* type */
|
||||
NULL, /* version */
|
||||
NULL, /* hostname */
|
||||
NULL, /* URI */
|
||||
|
Loading…
Reference in New Issue
Block a user