From 360df0199ef7fcefab5a3c669e27748c5251a059 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 11 May 2011 18:01:23 +0100 Subject: [PATCH] Tweak driver naming for consistency with public API Fix some driver names: s/virDrvCPUCompare/virDrvCompareCPU/ s/virDrvCPUBaseline/virDrvBaselineCPU/ s/virDrvQemuDomainMonitorCommand/virDrvDomainQemuMonitorCommand/ s/virDrvSecretNumOfSecrets/virDrvNumOfSecrets/ s/virDrvSecretListSecrets/virDrvListSecrets/ And some driver struct field names: s/getFreeMemory/nodeGetFreeMemory/ --- src/driver.h | 22 +++++++++++----------- src/esx/esx_driver.c | 2 +- src/interface/netcf_driver.c | 2 +- src/libvirt.c | 4 ++-- src/libxl/libxl_driver.c | 14 +++++++------- src/lxc/lxc_driver.c | 6 +++--- src/openvz/openvz_driver.c | 6 +++--- src/phyp/phyp_driver.c | 4 ++-- src/qemu/qemu_driver.c | 4 ++-- src/remote/remote_driver.c | 4 ++-- src/test/test_driver.c | 2 +- src/uml/uml_driver.c | 2 +- src/vmware/vmware_driver.c | 14 +++++++------- src/xen/xen_driver.c | 2 +- src/xenapi/xenapi_driver.c | 8 ++++---- 15 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/driver.h b/src/driver.h index ed99445ce6..5f9ec55e69 100644 --- a/src/driver.h +++ b/src/driver.h @@ -432,11 +432,11 @@ typedef int (*virDrvDomainIsUpdated)(virDomainPtr dom); typedef int - (*virDrvCPUCompare)(virConnectPtr conn, + (*virDrvCompareCPU)(virConnectPtr conn, const char *cpu, unsigned int flags); typedef char * - (*virDrvCPUBaseline)(virConnectPtr conn, + (*virDrvBaselineCPU)(virConnectPtr conn, const char **xmlCPUs, unsigned int ncpus, unsigned int flags); @@ -516,7 +516,7 @@ typedef int unsigned int flags); typedef int - (*virDrvQemuDomainMonitorCommand)(virDomainPtr domain, const char *cmd, + (*virDrvDomainQemuMonitorCommand)(virDomainPtr domain, const char *cmd, char **result, unsigned int flags); typedef int @@ -618,7 +618,7 @@ struct _virDriver { virDrvDomainMemoryPeek domainMemoryPeek; virDrvDomainGetBlockInfo domainGetBlockInfo; virDrvNodeGetCellsFreeMemory nodeGetCellsFreeMemory; - virDrvNodeGetFreeMemory getFreeMemory; + virDrvNodeGetFreeMemory nodeGetFreeMemory; virDrvDomainEventRegister domainEventRegister; virDrvDomainEventDeregister domainEventDeregister; virDrvDomainMigratePrepare2 domainMigratePrepare2; @@ -632,8 +632,8 @@ struct _virDriver { virDrvDomainIsActive domainIsActive; virDrvDomainIsPersistent domainIsPersistent; virDrvDomainIsUpdated domainIsUpdated; - virDrvCPUCompare cpuCompare; - virDrvCPUBaseline cpuBaseline; + virDrvCompareCPU cpuCompare; + virDrvBaselineCPU cpuBaseline; virDrvDomainGetJobInfo domainGetJobInfo; virDrvDomainAbortJob domainAbortJob; virDrvDomainMigrateSetMaxDowntime domainMigrateSetMaxDowntime; @@ -652,7 +652,7 @@ struct _virDriver { virDrvDomainSnapshotCurrent domainSnapshotCurrent; virDrvDomainRevertToSnapshot domainRevertToSnapshot; virDrvDomainSnapshotDelete domainSnapshotDelete; - virDrvQemuDomainMonitorCommand qemuDomainMonitorCommand; + virDrvDomainQemuMonitorCommand qemuDomainMonitorCommand; virDrvDomainOpenConsole domainOpenConsole; virDrvDomainInjectNMI domainInjectNMI; }; @@ -1109,9 +1109,9 @@ typedef unsigned char * typedef int (*virDrvSecretUndefine) (virSecretPtr secret); typedef int - (*virDrvSecretNumOfSecrets) (virConnectPtr conn); + (*virDrvNumOfSecrets) (virConnectPtr conn); typedef int - (*virDrvSecretListSecrets) (virConnectPtr conn, + (*virDrvListSecrets) (virConnectPtr conn, char **uuids, int maxuuids); @@ -1133,8 +1133,8 @@ struct _virSecretDriver { virDrvOpen open; virDrvClose close; - virDrvSecretNumOfSecrets numOfSecrets; - virDrvSecretListSecrets listSecrets; + virDrvNumOfSecrets numOfSecrets; + virDrvListSecrets listSecrets; virDrvSecretLookupByUUID lookupByUUID; virDrvSecretLookupByUsage lookupByUsage; virDrvSecretDefineXML defineXML; diff --git a/src/esx/esx_driver.c b/src/esx/esx_driver.c index f994d3c9f7..043722d833 100644 --- a/src/esx/esx_driver.c +++ b/src/esx/esx_driver.c @@ -4640,7 +4640,7 @@ static virDriver esxDriver = { esxGetType, /* type */ esxGetVersion, /* version */ NULL, /* libvirtVersion (impl. in libvirt.c) */ - esxGetHostname, /* hostname */ + esxGetHostname, /* getHostname */ NULL, /* getSysinfo */ NULL, /* getMaxVcpus */ esxNodeGetInfo, /* nodeGetInfo */ diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c index 709f09b0db..cf0efb75ef 100644 --- a/src/interface/netcf_driver.c +++ b/src/interface/netcf_driver.c @@ -549,7 +549,7 @@ static virInterfaceDriver interfaceDriver = { interfaceNumOfDefinedInterfaces, /* numOfInterfaces */ interfaceListDefinedInterfaces, /* listInterfaces */ interfaceLookupByName, /* interfaceLookupByName */ - interfaceLookupByMACString, /* interfaceLookupByMACSTring */ + interfaceLookupByMACString, /* interfaceLookupByMACString */ interfaceGetXMLDesc, /* interfaceGetXMLDesc */ interfaceDefineXML, /* interfaceDefineXML */ interfaceUndefine, /* interfaceUndefine */ diff --git a/src/libvirt.c b/src/libvirt.c index 22a9b564ca..afabcac83e 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -4402,9 +4402,9 @@ virNodeGetFreeMemory(virConnectPtr conn) return 0; } - if (conn->driver->getFreeMemory) { + if (conn->driver->nodeGetFreeMemory) { unsigned long long ret; - ret = conn->driver->getFreeMemory (conn); + ret = conn->driver->nodeGetFreeMemory (conn); if (ret == 0) goto error; return ret; diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c index 1d7d1550b3..bbcc9af555 100644 --- a/src/libxl/libxl_driver.c +++ b/src/libxl/libxl_driver.c @@ -2736,8 +2736,8 @@ static virDriver libxlDriver = { NULL, /* domainGetSecurityLabel */ NULL, /* nodeGetSecurityModel */ libxlDomainGetXMLDesc, /* domainGetXMLDesc */ - libxlDomainXMLFromNative, /* domainXmlFromNative */ - libxlDomainXMLToNative, /* domainXmlToNative */ + libxlDomainXMLFromNative, /* domainXMLFromNative */ + libxlDomainXMLToNative, /* domainXMLToNative */ libxlListDefinedDomains, /* listDefinedDomains */ libxlNumDefinedDomains, /* numOfDefinedDomains */ libxlDomainCreate, /* domainCreate */ @@ -2764,7 +2764,7 @@ static virDriver libxlDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ NULL, /* nodeGetCellsFreeMemory */ - libxlNodeGetFreeMemory, /* getFreeMemory */ + libxlNodeGetFreeMemory, /* nodeGetFreeMemory */ libxlDomainEventRegister, /* domainEventRegister */ libxlDomainEventDeregister, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ @@ -2773,10 +2773,10 @@ static virDriver libxlDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ NULL, /* domainMigratePrepareTunnel */ - NULL, /* IsEncrypted */ - NULL, /* IsSecure */ - libxlDomainIsActive, /* DomainIsActive */ - libxlDomainIsPersistent, /* DomainIsPersistent */ + NULL, /* isEncrypted */ + NULL, /* isSecure */ + libxlDomainIsActive, /* domainIsActive */ + libxlDomainIsPersistent, /* domainIsPersistent */ libxlDomainIsUpdated, /* domainIsUpdated */ NULL, /* cpuCompare */ NULL, /* cpuBaseline */ diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index 1c55aee5c4..2012eda68e 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -2714,8 +2714,8 @@ cleanup: /* Function Tables */ static virDriver lxcDriver = { - VIR_DRV_LXC, /* the number virDrvNo */ - "LXC", /* the name of the driver */ + VIR_DRV_LXC, + "LXC", lxcOpen, /* open */ lxcClose, /* close */ NULL, /* supports_feature */ @@ -2790,7 +2790,7 @@ static virDriver lxcDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ - nodeGetFreeMemory, /* getFreeMemory */ + nodeGetFreeMemory, /* nodeGetFreeMemory */ lxcDomainEventRegister, /* domainEventRegister */ lxcDomainEventDeregister, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c index 897211b371..fbffbfd260 100644 --- a/src/openvz/openvz_driver.c +++ b/src/openvz/openvz_driver.c @@ -1625,8 +1625,8 @@ static virDriver openvzDriver = { NULL, /* domainGetSecurityLabel */ NULL, /* nodeGetSecurityModel */ openvzDomainGetXMLDesc, /* domainGetXMLDesc */ - NULL, /* domainXmlFromNative */ - NULL, /* domainXmlToNative */ + NULL, /* domainXMLFromNative */ + NULL, /* domainXMLToNative */ openvzListDefinedDomains, /* listDefinedDomains */ openvzNumDefinedDomains, /* numOfDefinedDomains */ openvzDomainCreate, /* domainCreate */ @@ -1653,7 +1653,7 @@ static virDriver openvzDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ NULL, /* nodeGetCellsFreeMemory */ - NULL, /* getFreeMemory */ + NULL, /* nodeGetFreeMemory */ NULL, /* domainEventRegister */ NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c index 8383e3827b..c909c6d63a 100644 --- a/src/phyp/phyp_driver.c +++ b/src/phyp/phyp_driver.c @@ -3814,7 +3814,7 @@ static virDriver phypDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ NULL, /* nodeGetCellsFreeMemory */ - NULL, /* getFreeMemory */ + NULL, /* nodeGetFreeMemory */ NULL, /* domainEventRegister */ NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ @@ -3848,7 +3848,7 @@ static virDriver phypDriver = { NULL, /* domainSnapshotCurrent */ NULL, /* domainRevertToSnapshot */ NULL, /* domainSnapshotDelete */ - NULL, /* qemuMonitorCommand */ + NULL, /* qemuDomainMonitorCommand */ NULL, /* domainOpenConsole */ NULL, /* domainInjectNMI */ }; diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 27951f46f4..294aad3146 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -7302,7 +7302,7 @@ static virDriver qemuDriver = { qemudDomainGetSecurityLabel, /* domainGetSecurityLabel */ qemudNodeGetSecurityModel, /* nodeGetSecurityModel */ qemuDomainGetXMLDesc, /* domainGetXMLDesc */ - qemuDomainXMLFromNative, /* domainXmlFromNative */ + qemuDomainXMLFromNative, /* domainXMLFromNative */ qemuDomainXMLToNative, /* domainXMLToNative */ qemudListDefinedDomains, /* listDefinedDomains */ qemudNumDefinedDomains, /* numOfDefinedDomains */ @@ -7330,7 +7330,7 @@ static virDriver qemuDriver = { qemudDomainMemoryPeek, /* domainMemoryPeek */ qemuDomainGetBlockInfo, /* domainGetBlockInfo */ nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ - nodeGetFreeMemory, /* getFreeMemory */ + nodeGetFreeMemory, /* nodeGetFreeMemory */ qemuDomainEventRegister, /* domainEventRegister */ qemuDomainEventDeregister, /* domainEventDeregister */ qemudDomainMigratePrepare2, /* domainMigratePrepare2 */ diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index e5003b8953..564eff6b8a 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -6473,7 +6473,7 @@ static virDriver remote_driver = { remoteDomainMemoryPeek, /* domainMemoryPeek */ remoteDomainGetBlockInfo, /* domainGetBlockInfo */ remoteNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ - remoteNodeGetFreeMemory, /* getFreeMemory */ + remoteNodeGetFreeMemory, /* nodeGetFreeMemory */ remoteDomainEventRegister, /* domainEventRegister */ remoteDomainEventDeregister, /* domainEventDeregister */ remoteDomainMigratePrepare2, /* domainMigratePrepare2 */ @@ -6490,7 +6490,7 @@ static virDriver remote_driver = { remoteCPUCompare, /* cpuCompare */ remoteCPUBaseline, /* cpuBaseline */ remoteDomainGetJobInfo, /* domainGetJobInfo */ - remoteDomainAbortJob, /* domainFinishJob */ + remoteDomainAbortJob, /* domainAbortJob */ remoteDomainMigrateSetMaxDowntime, /* domainMigrateSetMaxDowntime */ remoteDomainMigrateSetMaxSpeed, /* domainMigrateSetMaxSpeed */ remoteDomainEventRegisterAny, /* domainEventRegisterAny */ diff --git a/src/test/test_driver.c b/src/test/test_driver.c index a9c9846ce8..6d0c9a7404 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -5394,7 +5394,7 @@ static virDriver testDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ testNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ - NULL, /* getFreeMemory */ + NULL, /* nodeGetFreeMemory */ testDomainEventRegister, /* domainEventRegister */ testDomainEventDeregister, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c index 5a941fa2aa..bb1f1f8642 100644 --- a/src/uml/uml_driver.c +++ b/src/uml/uml_driver.c @@ -2257,7 +2257,7 @@ static virDriver umlDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ nodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ - nodeGetFreeMemory, /* getFreeMemory */ + nodeGetFreeMemory, /* nodeGetFreeMemory */ NULL, /* domainEventRegister */ NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c index a086ca6647..7eaea31876 100644 --- a/src/vmware/vmware_driver.c +++ b/src/vmware/vmware_driver.c @@ -978,8 +978,8 @@ static virDriver vmwareDriver = { NULL, /* domainGetSecurityLabel */ NULL, /* nodeGetSecurityModel */ vmwareDomainGetXMLDesc, /* domainGetXMLDesc */ - NULL, /* domainXmlFromNative */ - NULL, /* domainXmlToNative */ + NULL, /* domainXMLFromNative */ + NULL, /* domainXMLToNative */ vmwareListDefinedDomains, /* listDefinedDomains */ vmwareNumDefinedDomains, /* numOfDefinedDomains */ vmwareDomainCreate, /* domainCreate */ @@ -1006,7 +1006,7 @@ static virDriver vmwareDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ NULL, /* nodeGetCellsFreeMemory */ - NULL, /* getFreeMemory */ + NULL, /* nodeGetFreeMemory */ NULL, /* domainEventRegister */ NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ @@ -1015,10 +1015,10 @@ static virDriver vmwareDriver = { NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ NULL, /* domainMigratePrepareTunnel */ - NULL, /* IsEncrypted */ - NULL, /* IsSecure */ - vmwareDomainIsActive, /* DomainIsActive */ - vmwareDomainIsPersistent, /* DomainIsPersistent */ + NULL, /* isEncrypted */ + NULL, /* isSecure */ + vmwareDomainIsActive, /* domainIsActive */ + vmwareDomainIsPersistent, /* domainIsPersistent */ NULL, /* domainIsUpdated */ NULL, /* cpuCompare */ NULL, /* cpuBaseline */ diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c index 086edcafa5..d51b1581f6 100644 --- a/src/xen/xen_driver.c +++ b/src/xen/xen_driver.c @@ -2216,7 +2216,7 @@ static virDriver xenUnifiedDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ xenUnifiedNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ - xenUnifiedNodeGetFreeMemory, /* getFreeMemory */ + xenUnifiedNodeGetFreeMemory, /* nodeGetFreeMemory */ xenUnifiedDomainEventRegister, /* domainEventRegister */ xenUnifiedDomainEventDeregister, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c index 23bc5bf78b..15fa4e89d7 100644 --- a/src/xenapi/xenapi_driver.c +++ b/src/xenapi/xenapi_driver.c @@ -1834,7 +1834,7 @@ static virDriver xenapiDriver = { xenapiSupportsFeature, /* supports_feature */ xenapiType, /* type */ xenapiGetVersion, /* version */ - NULL, /*getlibvirtVersion */ + NULL, /* libvirtVersion */ xenapiGetHostname, /* getHostname */ NULL, /* getSysinfo */ xenapiGetMaxVcpus, /* getMaxVcpus */ @@ -1875,8 +1875,8 @@ static virDriver xenapiDriver = { NULL, /* domainGetSecurityLabel */ NULL, /* nodeGetSecurityModel */ xenapiDomainGetXMLDesc, /* domainGetXMLDesc */ - NULL, /* domainXmlFromNative */ - NULL, /* domainXmlToNative */ + NULL, /* domainXMLFromNative */ + NULL, /* domainXMLToNative */ xenapiListDefinedDomains, /* listDefinedDomains */ xenapiNumOfDefinedDomains, /* numOfDefinedDomains */ xenapiDomainCreate, /* domainCreate */ @@ -1903,7 +1903,7 @@ static virDriver xenapiDriver = { NULL, /* domainMemoryPeek */ NULL, /* domainGetBlockInfo */ xenapiNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ - xenapiNodeGetFreeMemory, /* getFreeMemory */ + xenapiNodeGetFreeMemory, /* nodeGetFreeMemory */ NULL, /* domainEventRegister */ NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ -- GitLab