From 16e4084a1072e1b0086fc7f2dcc969bc553a9431 Mon Sep 17 00:00:00 2001 From: Jiri Denemark Date: Fri, 18 Dec 2009 14:59:39 +0100 Subject: [PATCH] Adds the internal driver API * src/driver.h: add an extra entry point in the structure * src/esx/esx_driver.c src/lxc/lxc_driver.c src/opennebula/one_driver.c src/openvz/openvz_driver.c src/phyp/phyp_driver.c src/qemu/qemu_driver.c src/remote/remote_driver.c src/test/test_driver.c src/uml/uml_driver.c src/vbox/vbox_tmpl.c src/xen/xen_driver.c: add NULL entry points for all drivers --- src/driver.h | 6 ++++++ src/esx/esx_driver.c | 1 + src/lxc/lxc_driver.c | 1 + src/opennebula/one_driver.c | 1 + src/openvz/openvz_driver.c | 1 + src/phyp/phyp_driver.c | 1 + src/qemu/qemu_driver.c | 1 + src/remote/remote_driver.c | 1 + src/test/test_driver.c | 1 + src/uml/uml_driver.c | 1 + src/vbox/vbox_tmpl.c | 1 + src/xen/xen_driver.c | 1 + 12 files changed, 17 insertions(+) diff --git a/src/driver.h b/src/driver.h index 09ce8e2387..5a9ae4b24e 100644 --- a/src/driver.h +++ b/src/driver.h @@ -349,6 +349,11 @@ typedef int typedef int (*virDrvDomainIsPersistent)(virDomainPtr dom); +typedef int + (*virDrvCPUCompare)(virConnectPtr conn, + const char *cpu, + unsigned int flags); + /** * _virDriver: * @@ -435,6 +440,7 @@ struct _virDriver { virDrvConnectIsSecure isSecure; virDrvDomainIsActive domainIsActive; virDrvDomainIsPersistent domainIsPersistent; + virDrvCPUCompare cpuCompare; }; typedef int diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index ea464a37e9..c7b9e06f1a 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -3428,6 +3428,7 @@ static virDriver esxDriver = { esxIsSecure, /* isSecure */ esxDomainIsActive, /* domainIsActive */ esxDomainIsPersistent, /* domainIsPersistent */ + NULL, /* cpuCompare */ }; diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index c8e2dcab5b..1ce7ad6b6e 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -2454,6 +2454,7 @@ static virDriver lxcDriver = { lxcIsSecure, lxcDomainIsActive, lxcDomainIsPersistent, + NULL, /* cpuCompare */ }; static virStateDriver lxcStateDriver = { diff --git a/src/opennebula/one_driver.c b/src/opennebula/one_driver.c index a30c110338..3de97b0d3f 100644 --- a/src/opennebula/one_driver.c +++ b/src/opennebula/one_driver.c @@ -781,6 +781,7 @@ static virDriver oneDriver = { oneIsSecure, NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ + NULL, /* cpuCompare */ }; static virStateDriver oneStateDriver = { diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 1c0fccc4fb..b62070f1a9 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -1533,6 +1533,7 @@ static virDriver openvzDriver = { openvzIsSecure, openvzDomainIsActive, openvzDomainIsPersistent, + NULL, /* cpuCompare */ }; int openvzRegister(void) { diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index c4fcfedb7a..1863425bba 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -1649,6 +1649,7 @@ virDriver phypDriver = { phypIsSecure, NULL, /* domainIsActive */ NULL, /* domainIsPersistent */ + NULL, /* cpuCompare */ }; int diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9ef6c35d3e..80ffce6d5c 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7923,6 +7923,7 @@ static virDriver qemuDriver = { qemuIsSecure, qemuDomainIsActive, qemuDomainIsPersistent, + NULL, /* cpuCompare */ }; diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 77962feae3..e7799bf983 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -8830,6 +8830,7 @@ static virDriver remote_driver = { remoteIsSecure, /* isSecure */ remoteDomainIsActive, /* domainIsActive */ remoteDomainIsPersistent, /* domainIsPersistent */ + NULL, /* cpuCompare */ }; static virNetworkDriver network_driver = { diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 7db9a4c08f..5c61f24621 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5236,6 +5236,7 @@ static virDriver testDriver = { testIsSecure, /* isEncrypted */ testDomainIsActive, /* domainIsActive */ testDomainIsPersistent, /* domainIsPersistent */ + NULL, /* cpuCompare */ }; static virNetworkDriver testNetworkDriver = { diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 48ef103969..e6ba773c2e 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -1922,6 +1922,7 @@ static virDriver umlDriver = { umlIsSecure, umlDomainIsActive, umlDomainIsPersistent, + NULL, /* cpuCompare */ }; diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c index d6b681c038..bede574dbb 100644 --- a/src/vbox/vbox_tmpl.c +++ b/src/vbox/vbox_tmpl.c @@ -7049,6 +7049,7 @@ virDriver NAME(Driver) = { vboxIsSecure, vboxDomainIsActive, vboxDomainIsPersistent, + NULL, /* cpuCompare */ }; virNetworkDriver NAME(NetworkDriver) = { diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index ed94bede7e..066436591a 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -1860,6 +1860,7 @@ static virDriver xenUnifiedDriver = { xenUnifiedIsSecure, xenUnifiedDomainIsActive, xenUnifiedDomainisPersistent, + NULL, /* cpuCompare */ }; /** -- 2.47.2