[PATCH 2/6] virNodeGetCpuTime: Define internal driver API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



virNodeGetCpuTime: Define internal driver API

---
 src/driver.h               |    4 ++++
 src/esx/esx_driver.c       |    1 +
 src/libxl/libxl_driver.c   |    1 +
 src/lxc/lxc_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/vmware/vmware_driver.c |    1 +
 src/xen/xen_driver.c       |    1 +
 src/xenapi/xenapi_driver.c |    1 +
 14 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/driver.h b/src/driver.h
index e5f91ca..f64fe31 100644
--- a/src/driver.h
+++ b/src/driver.h
@@ -347,6 +347,9 @@ typedef struct _virDriver virDriver;
 typedef virDriver *virDriverPtr;
 
 typedef int
+    (*virDrvNodeGetCpuTime)
+                    (virConnectPtr conn, virNodeCpuTimePtr cpu_time);
+typedef int
     (*virDrvNodeGetCellsFreeMemory)
                     (virConnectPtr conn,
                      unsigned long long *freeMems,
@@ -602,6 +605,7 @@ struct _virDriver {
     virDrvDomainBlockPeek	domainBlockPeek;
     virDrvDomainMemoryPeek      domainMemoryPeek;
     virDrvDomainGetBlockInfo    domainGetBlockInfo;
+    virDrvNodeGetCpuTime	nodeGetCpuTime;
     virDrvNodeGetCellsFreeMemory	nodeGetCellsFreeMemory;
     virDrvNodeGetFreeMemory		getFreeMemory;
     virDrvDomainEventRegister         domainEventRegister;
diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c
index deda372..6e55949 100644
--- a/src/esx/esx_driver.c
+++ b/src/esx/esx_driver.c
@@ -4638,6 +4638,7 @@ static virDriver esxDriver = {
     NULL,                            /* domainBlockPeek */
     NULL,                            /* domainMemoryPeek */
     NULL,                            /* domainGetBlockInfo */
+    NULL,                            /* nodeGetCpuTime */
     NULL,                            /* nodeGetCellsFreeMemory */
     esxNodeGetFreeMemory,            /* nodeGetFreeMemory */
     NULL,                            /* domainEventRegister */
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index e996ff6..9b5a70e 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2316,6 +2316,7 @@ static virDriver libxlDriver = {
     NULL,                       /* domainBlockPeek */
     NULL,                       /* domainMemoryPeek */
     NULL,                       /* domainGetBlockInfo */
+    NULL,                       /* nodeGetCpuTime */
     NULL,                       /* nodeGetCellsFreeMemory */
     libxlNodeGetFreeMemory,     /* getFreeMemory */
     libxlDomainEventRegister,   /* domainEventRegister */
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index e905302..0e0c325 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -2869,6 +2869,7 @@ static virDriver lxcDriver = {
     NULL, /* domainBlockPeek */
     NULL, /* domainMemoryPeek */
     NULL, /* domainGetBlockInfo */
+    nodeGetCpuTime, /* nodeGetCpuTime */
     nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     nodeGetFreeMemory,  /* getFreeMemory */
     lxcDomainEventRegister, /* domainEventRegister */
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
index fb30c37..7335c8d 100644
--- a/src/openvz/openvz_driver.c
+++ b/src/openvz/openvz_driver.c
@@ -1617,6 +1617,7 @@ static virDriver openvzDriver = {
     NULL, /* domainBlockPeek */
     NULL, /* domainMemoryPeek */
     NULL, /* domainGetBlockInfo */
+    NULL, /* nodeGetCpuTime */
     NULL, /* nodeGetCellsFreeMemory */
     NULL, /* getFreeMemory */
     NULL, /* domainEventRegister */
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
index 51f9ff6..839649f 100644
--- a/src/phyp/phyp_driver.c
+++ b/src/phyp/phyp_driver.c
@@ -4018,6 +4018,7 @@ static virDriver phypDriver = {
     NULL,                       /* domainBlockPeek */
     NULL,                       /* domainMemoryPeek */
     NULL,                       /* domainGetBlockInfo */
+    NULL,                       /* nodeGetCpuTime */
     NULL,                       /* nodeGetCellsFreeMemory */
     NULL,                       /* getFreeMemory */
     NULL,                       /* domainEventRegister */
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index dd12dc8..20bf4eb 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -6886,6 +6886,7 @@ static virDriver qemuDriver = {
     qemudDomainBlockPeek, /* domainBlockPeek */
     qemudDomainMemoryPeek, /* domainMemoryPeek */
     qemuDomainGetBlockInfo, /* domainGetBlockInfo */
+    nodeGetCpuTime, /* nodeGetCpuTime */
     nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     nodeGetFreeMemory,  /* getFreeMemory */
     qemuDomainEventRegister, /* domainEventRegister */
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index bf94e70..2393055 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -11259,6 +11259,7 @@ static virDriver remote_driver = {
     remoteDomainBlockPeek, /* domainBlockPeek */
     remoteDomainMemoryPeek, /* domainMemoryPeek */
     remoteDomainGetBlockInfo, /* domainGetBlockInfo */
+    remoteNodeGetCpuTime, /* nodeGetCpuTime */
     remoteNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     remoteNodeGetFreeMemory, /* getFreeMemory */
     remoteDomainEventRegister, /* domainEventRegister */
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 17f5ad9..f122935 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -5410,6 +5410,7 @@ static virDriver testDriver = {
     NULL, /* domainBlockPeek */
     NULL, /* domainMemoryPeek */
     NULL, /* domainGetBlockInfo */
+    NULL, /* nodeGetCpuTime */
     testNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     NULL, /* getFreeMemory */
     testDomainEventRegister, /* domainEventRegister */
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
index e2bd5f2..93fb59e 100644
--- a/src/uml/uml_driver.c
+++ b/src/uml/uml_driver.c
@@ -2212,6 +2212,7 @@ static virDriver umlDriver = {
     umlDomainBlockPeek, /* domainBlockPeek */
     NULL, /* domainMemoryPeek */
     NULL, /* domainGetBlockInfo */
+    nodeGetCpuTime, /* nodeGetCpuTime */
     nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     nodeGetFreeMemory,  /* getFreeMemory */
     NULL, /* domainEventRegister */
diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c
index 8bd27dd..6f2d4fe 100644
--- a/src/vbox/vbox_tmpl.c
+++ b/src/vbox/vbox_tmpl.c
@@ -8600,6 +8600,7 @@ virDriver NAME(Driver) = {
     NULL, /* domainBlockPeek */
     NULL, /* domainMemoryPeek */
     NULL, /* domainGetBlockInfo */
+    NULL, /* nodeGetCpuTime */
     nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     nodeGetFreeMemory,  /* getFreeMemory */
 #if VBOX_API_VERSION == 2002 || VBOX_API_VERSION == 4000
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
index b5e416b..635aa59 100644
--- a/src/vmware/vmware_driver.c
+++ b/src/vmware/vmware_driver.c
@@ -970,6 +970,7 @@ static virDriver vmwareDriver = {
     NULL,                       /* domainBlockPeek */
     NULL,                       /* domainMemoryPeek */
     NULL,                       /* domainGetBlockInfo */
+    NULL,                       /* nodeGetCpuTime */
     NULL,                       /* nodeGetCellsFreeMemory */
     NULL,                       /* getFreeMemory */
     NULL,                       /* domainEventRegister */
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
index 9f47722..af18baa 100644
--- a/src/xen/xen_driver.c
+++ b/src/xen/xen_driver.c
@@ -2104,6 +2104,7 @@ static virDriver xenUnifiedDriver = {
     xenUnifiedDomainBlockPeek, /* domainBlockPeek */
     NULL, /* domainMemoryPeek */
     NULL, /* domainGetBlockInfo */
+    NULL, /* nodeGetCpuTime */
     xenUnifiedNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     xenUnifiedNodeGetFreeMemory, /* getFreeMemory */
     xenUnifiedDomainEventRegister, /* domainEventRegister */
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index 27206a0..7800dd1 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1848,6 +1848,7 @@ static virDriver xenapiDriver = {
     NULL, /* domainBlockPeek */
     NULL, /* domainMemoryPeek */
     NULL, /* domainGetBlockInfo */
+    NULL, /* nodeGetCpuTime */
     xenapiNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */
     xenapiNodeGetFreeMemory, /* getFreeMemory */
     NULL, /* domainEventRegister */
-- 
1.7.1


-- 
Minoru Usui <usui@xxxxxxxxxxxxxxxxx>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]