This patch converts the internal drivers to use the old-style struct initializers, which kind of gives us a self-documenting TODO list for each of the drivers. It also fixes up some bad comments in the internal driver list. It does not touch the storage or network driver initializers.
Signed-off-by: Chris Lalancette <clala...@redhat.com>
diff --git a/src/lxc_driver.c b/src/lxc_driver.c index c08ca9c..999c8b4 100644 --- a/src/lxc_driver.c +++ b/src/lxc_driver.c @@ -1469,7 +1469,7 @@ static virDriver lxcDriver = { NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ NULL, /* domainMigrateFinish2 */ - NULL, /* nodeDeviceAttach */ + NULL, /* nodeDeviceDettach */ NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ }; diff --git a/src/openvz_driver.c b/src/openvz_driver.c index ac2c089..f50ebdf 100644 --- a/src/openvz_driver.c +++ b/src/openvz_driver.c @@ -1314,8 +1314,8 @@ static virDriver openvzDriver = { NULL, /* supports_feature */ openvzGetType, /* type */ openvzGetVersion, /* version */ - NULL, /* hostname */ - NULL, /* uri */ + NULL, /* getHostname */ + NULL, /* getURI */ openvzGetMaxVCPUs, /* getMaxVcpus */ openvzGetNodeInfo, /* nodeGetInfo */ openvzGetCapabilities, /* getCapabilities */ @@ -1345,8 +1345,8 @@ static virDriver openvzDriver = { NULL, /* domainGetSecurityLabel */ NULL, /* nodeGetSecurityModel */ openvzDomainDumpXML, /* domainDumpXML */ - openvzListDefinedDomains, /* listDomains */ - openvzNumDefinedDomains, /* numOfDomains */ + openvzListDefinedDomains, /* listDefinedDomains */ + openvzNumDefinedDomains, /* numOfDefinedDomains */ openvzDomainCreate, /* domainCreate */ openvzDomainDefineXML, /* domainDefineXML */ openvzDomainUndefine, /* domainUndefine */ @@ -1365,12 +1365,12 @@ static virDriver openvzDriver = { NULL, /* domainBlockPeek */ NULL, /* domainMemoryPeek */ NULL, /* nodeGetCellsFreeMemory */ - NULL, /* nodeGetFreeMemory */ + NULL, /* getFreeMemory */ NULL, /* domainEventRegister */ NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ NULL, /* domainMigrateFinish2 */ - NULL, /* nodeDeviceAttach */ + NULL, /* nodeDeviceDettach */ NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ }; diff --git a/src/qemu_driver.c b/src/qemu_driver.c index b2974bb..de6512d 100644 --- a/src/qemu_driver.c +++ b/src/qemu_driver.c @@ -5035,8 +5035,8 @@ static virDriver qemuDriver = { qemudSupportsFeature, /* supports_feature */ qemudGetType, /* type */ qemudGetVersion, /* version */ - qemudGetHostname, /* hostname */ - NULL, /* URI */ + qemudGetHostname, /* getHostname */ + NULL, /* getURI */ qemudGetMaxVCPUs, /* getMaxVcpus */ qemudGetNodeInfo, /* nodeGetInfo */ qemudGetCapabilities, /* getCapabilities */ @@ -5071,8 +5071,8 @@ static virDriver qemuDriver = { qemudDomainGetSecurityLabel, /* domainGetSecurityLabel */ qemudNodeGetSecurityModel, /* nodeGetSecurityModel */ qemudDomainDumpXML, /* domainDumpXML */ - qemudListDefinedDomains, /* listDomains */ - qemudNumDefinedDomains, /* numOfDomains */ + qemudListDefinedDomains, /* listDefinedDomains */ + qemudNumDefinedDomains, /* numOfDefinedDomains */ qemudDomainStart, /* domainCreate */ qemudDomainDefine, /* domainDefineXML */ qemudDomainUndefine, /* domainUndefine */ diff --git a/src/remote_internal.c b/src/remote_internal.c index 9e6304b..c6fa562 100644 --- a/src/remote_internal.c +++ b/src/remote_internal.c @@ -6837,71 +6837,72 @@ unsigned long remoteVersion(void) } static virDriver driver = { - .no = VIR_DRV_REMOTE, - .name = "remote", - .open = remoteOpen, - .close = remoteClose, - .supports_feature = remoteSupportsFeature, - .type = remoteType, - .version = remoteGetVersion, - .getHostname = remoteGetHostname, - .getMaxVcpus = remoteGetMaxVcpus, - .nodeGetInfo = remoteNodeGetInfo, - .getCapabilities = remoteGetCapabilities, - .listDomains = remoteListDomains, - .numOfDomains = remoteNumOfDomains, - .domainCreateXML = remoteDomainCreateXML, - .domainLookupByID = remoteDomainLookupByID, - .domainLookupByUUID = remoteDomainLookupByUUID, - .domainLookupByName = remoteDomainLookupByName, - .domainSuspend = remoteDomainSuspend, - .domainResume = remoteDomainResume, - .domainShutdown = remoteDomainShutdown, - .domainReboot = remoteDomainReboot, - .domainDestroy = remoteDomainDestroy, - .domainGetOSType = remoteDomainGetOSType, - .domainGetMaxMemory = remoteDomainGetMaxMemory, - .domainSetMaxMemory = remoteDomainSetMaxMemory, - .domainSetMemory = remoteDomainSetMemory, - .domainGetInfo = remoteDomainGetInfo, - .domainSave = remoteDomainSave, - .domainRestore = remoteDomainRestore, - .domainCoreDump = remoteDomainCoreDump, - .domainSetVcpus = remoteDomainSetVcpus, - .domainPinVcpu = remoteDomainPinVcpu, - .domainGetVcpus = remoteDomainGetVcpus, - .domainGetMaxVcpus = remoteDomainGetMaxVcpus, - .domainGetSecurityLabel = remoteDomainGetSecurityLabel, - .nodeGetSecurityModel = remoteNodeGetSecurityModel, - .domainDumpXML = remoteDomainDumpXML, - .listDefinedDomains = remoteListDefinedDomains, - .numOfDefinedDomains = remoteNumOfDefinedDomains, - .domainCreate = remoteDomainCreate, - .domainDefineXML = remoteDomainDefineXML, - .domainUndefine = remoteDomainUndefine, - .domainAttachDevice = remoteDomainAttachDevice, - .domainDetachDevice = remoteDomainDetachDevice, - .domainGetAutostart = remoteDomainGetAutostart, - .domainSetAutostart = remoteDomainSetAutostart, - .domainGetSchedulerType = remoteDomainGetSchedulerType, - .domainGetSchedulerParameters = remoteDomainGetSchedulerParameters, - .domainSetSchedulerParameters = remoteDomainSetSchedulerParameters, - .domainMigratePrepare = remoteDomainMigratePrepare, - .domainMigratePerform = remoteDomainMigratePerform, - .domainMigrateFinish = remoteDomainMigrateFinish, - .domainBlockStats = remoteDomainBlockStats, - .domainInterfaceStats = remoteDomainInterfaceStats, - .domainBlockPeek = remoteDomainBlockPeek, - .domainMemoryPeek = remoteDomainMemoryPeek, - .nodeGetCellsFreeMemory = remoteNodeGetCellsFreeMemory, - .getFreeMemory = remoteNodeGetFreeMemory, - .domainEventRegister = remoteDomainEventRegister, - .domainEventDeregister = remoteDomainEventDeregister, - .domainMigratePrepare2 = remoteDomainMigratePrepare2, - .domainMigrateFinish2 = remoteDomainMigrateFinish2, - .nodeDeviceDettach = remoteNodeDeviceDettach, - .nodeDeviceReAttach = remoteNodeDeviceReAttach, - .nodeDeviceReset = remoteNodeDeviceReset, + VIR_DRV_REMOTE, + "remote", + remoteOpen, /* open */ + remoteClose, /* close */ + remoteSupportsFeature, /* supports_feature */ + remoteType, /* type */ + remoteGetVersion, /* version */ + remoteGetHostname, /* getHostname */ + NULL, /* getURI */ + remoteGetMaxVcpus, /* getMaxVcpus */ + remoteNodeGetInfo, /* nodeGetInfo */ + remoteGetCapabilities, /* getCapabilities */ + remoteListDomains, /* listDomains */ + remoteNumOfDomains, /* numOfDomains */ + remoteDomainCreateXML, /* domainCreateXML */ + remoteDomainLookupByID, /* domainLookupByID */ + remoteDomainLookupByUUID, /* domainLookupByUUID */ + remoteDomainLookupByName, /* domainLookupByName */ + remoteDomainSuspend, /* domainSuspend */ + remoteDomainResume, /* domainResume */ + remoteDomainShutdown, /* domainShutdown */ + remoteDomainReboot, /* domainReboot */ + remoteDomainDestroy, /* domainDestroy */ + remoteDomainGetOSType, /* domainGetOSType */ + remoteDomainGetMaxMemory, /* domainGetMaxMemory */ + remoteDomainSetMaxMemory, /* domainSetMaxMemory */ + remoteDomainSetMemory, /* domainSetMemory */ + remoteDomainGetInfo, /* domainGetInfo */ + remoteDomainSave, /* domainSave */ + remoteDomainRestore, /* domainRestore */ + remoteDomainCoreDump, /* domainCoreDump */ + remoteDomainSetVcpus, /* domainSetVcpus */ + remoteDomainPinVcpu, /* domainPinVcpu */ + remoteDomainGetVcpus, /* domainGetVcpus */ + remoteDomainGetMaxVcpus, /* domainGetMaxVcpus */ + remoteDomainGetSecurityLabel, /* domainGetSecurityLabel */ + remoteNodeGetSecurityModel, /* nodeGetSecurityModel */ + remoteDomainDumpXML, /* domainDumpXML */ + remoteListDefinedDomains, /* listDefinedDomains */ + remoteNumOfDefinedDomains, /* numOfDefinedDomains */ + remoteDomainCreate, /* domainCreate */ + remoteDomainDefineXML, /* domainDefineXML */ + remoteDomainUndefine, /* domainUndefine */ + remoteDomainAttachDevice, /* domainAttachDevice */ + remoteDomainDetachDevice, /* domainDetachDevice */ + remoteDomainGetAutostart, /* domainGetAutostart */ + remoteDomainSetAutostart, /* domainSetAutostart */ + remoteDomainGetSchedulerType, /* domainGetSchedulerType */ + remoteDomainGetSchedulerParameters, /* domainGetSchedulerParameters */ + remoteDomainSetSchedulerParameters, /* domainSetSchedulerParameters */ + remoteDomainMigratePrepare, /* domainMigratePrepare */ + remoteDomainMigratePerform, /* domainMigratePerform */ + remoteDomainMigrateFinish, /* domainMigrateFinish */ + remoteDomainBlockStats, /* domainBlockStats */ + remoteDomainInterfaceStats, /* domainInterfaceStats */ + remoteDomainBlockPeek, /* domainBlockPeek */ + remoteDomainMemoryPeek, /* domainMemoryPeek */ + remoteNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ + remoteNodeGetFreeMemory, /* getFreeMemory */ + remoteDomainEventRegister, /* domainEventRegister */ + remoteDomainEventDeregister, /* domainEventDeregister */ + remoteDomainMigratePrepare2, /* domainMigratePrepare2 */ + remoteDomainMigrateFinish2, /* domainMigrateFinish2 */ + remoteNodeDeviceDettach, /* nodeDeviceDettach */ + remoteNodeDeviceReAttach, /* nodeDeviceReAttach */ + remoteNodeDeviceReset, /* nodeDeviceReset */ }; static virNetworkDriver network_driver = { diff --git a/src/test.c b/src/test.c index 32292eb..b0de44c 100644 --- a/src/test.c +++ b/src/test.c @@ -3474,8 +3474,8 @@ static virDriver testDriver = { NULL, /* supports_feature */ NULL, /* type */ testGetVersion, /* version */ - testGetHostname, /* hostname */ - NULL, /* URI */ + testGetHostname, /* getHostname */ + NULL, /* getURI */ testGetMaxVCPUs, /* getMaxVcpus */ testNodeGetInfo, /* nodeGetInfo */ testGetCapabilities, /* getCapabilities */ @@ -3530,7 +3530,7 @@ static virDriver testDriver = { testDomainEventDeregister, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ NULL, /* domainMigrateFinish2 */ - NULL, /* nodeDeviceAttach */ + NULL, /* nodeDeviceDettach */ NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ }; diff --git a/src/uml_driver.c b/src/uml_driver.c index f7400f9..01d5d9c 100644 --- a/src/uml_driver.c +++ b/src/uml_driver.c @@ -1829,8 +1829,8 @@ static virDriver umlDriver = { NULL, /* supports_feature */ umlGetType, /* type */ umlGetVersion, /* version */ - umlGetHostname, /* hostname */ - NULL, /* URI */ + umlGetHostname, /* getHostname */ + NULL, /* getURI */ NULL, /* getMaxVcpus */ umlGetNodeInfo, /* nodeGetInfo */ umlGetCapabilities, /* getCapabilities */ @@ -1860,8 +1860,8 @@ static virDriver umlDriver = { NULL, /* domainGetSecurityLabel */ NULL, /* nodeGetSecurityModel */ umlDomainDumpXML, /* domainDumpXML */ - umlListDefinedDomains, /* listDomains */ - umlNumDefinedDomains, /* numOfDomains */ + umlListDefinedDomains, /* listDefinedDomains */ + umlNumDefinedDomains, /* numOfDefinedDomains */ umlDomainStart, /* domainCreate */ umlDomainDefine, /* domainDefineXML */ umlDomainUndefine, /* domainUndefine */ @@ -1887,10 +1887,10 @@ static virDriver umlDriver = { NULL, /* getFreeMemory */ #endif NULL, /* domainEventRegister */ - NULL, /* domainEventUnregister */ + NULL, /* domainEventDeregister */ NULL, /* domainMigratePrepare2 */ NULL, /* domainMigrateFinish2 */ - NULL, /* nodeDeviceAttach */ + NULL, /* nodeDeviceDettach */ NULL, /* nodeDeviceReAttach */ NULL, /* nodeDeviceReset */ }; diff --git a/src/xen_unified.c b/src/xen_unified.c index 8e64f51..4d0c973 100644 --- a/src/xen_unified.c +++ b/src/xen_unified.c @@ -1424,63 +1424,72 @@ xenUnifiedDomainEventDeregister (virConnectPtr conn, /* The interface which we export upwards to libvirt.c. */ static virDriver xenUnifiedDriver = { - .no = VIR_DRV_XEN_UNIFIED, - .name = "Xen", - .open = xenUnifiedOpen, - .close = xenUnifiedClose, - .supports_feature = xenUnifiedSupportsFeature, - .type = xenUnifiedType, - .version = xenUnifiedGetVersion, - .getHostname = xenUnifiedGetHostname, - .getMaxVcpus = xenUnifiedGetMaxVcpus, - .nodeGetInfo = xenUnifiedNodeGetInfo, - .getCapabilities = xenUnifiedGetCapabilities, - .listDomains = xenUnifiedListDomains, - .numOfDomains = xenUnifiedNumOfDomains, - .domainCreateXML = xenUnifiedDomainCreateXML, - .domainLookupByID = xenUnifiedDomainLookupByID, - .domainLookupByUUID = xenUnifiedDomainLookupByUUID, - .domainLookupByName = xenUnifiedDomainLookupByName, - .domainSuspend = xenUnifiedDomainSuspend, - .domainResume = xenUnifiedDomainResume, - .domainShutdown = xenUnifiedDomainShutdown, - .domainReboot = xenUnifiedDomainReboot, - .domainDestroy = xenUnifiedDomainDestroy, - .domainGetOSType = xenUnifiedDomainGetOSType, - .domainGetMaxMemory = xenUnifiedDomainGetMaxMemory, - .domainSetMaxMemory = xenUnifiedDomainSetMaxMemory, - .domainSetMemory = xenUnifiedDomainSetMemory, - .domainGetInfo = xenUnifiedDomainGetInfo, - .domainSave = xenUnifiedDomainSave, - .domainRestore = xenUnifiedDomainRestore, - .domainCoreDump = xenUnifiedDomainCoreDump, - .domainSetVcpus = xenUnifiedDomainSetVcpus, - .domainPinVcpu = xenUnifiedDomainPinVcpu, - .domainGetVcpus = xenUnifiedDomainGetVcpus, - .domainGetMaxVcpus = xenUnifiedDomainGetMaxVcpus, - .domainDumpXML = xenUnifiedDomainDumpXML, - .listDefinedDomains = xenUnifiedListDefinedDomains, - .numOfDefinedDomains = xenUnifiedNumOfDefinedDomains, - .domainCreate = xenUnifiedDomainCreate, - .domainDefineXML = xenUnifiedDomainDefineXML, - .domainUndefine = xenUnifiedDomainUndefine, - .domainAttachDevice = xenUnifiedDomainAttachDevice, - .domainDetachDevice = xenUnifiedDomainDetachDevice, - .domainGetAutostart = xenUnifiedDomainGetAutostart, - .domainSetAutostart = xenUnifiedDomainSetAutostart, - .domainGetSchedulerType = xenUnifiedDomainGetSchedulerType, - .domainGetSchedulerParameters = xenUnifiedDomainGetSchedulerParameters, - .domainSetSchedulerParameters = xenUnifiedDomainSetSchedulerParameters, - .domainMigratePrepare = xenUnifiedDomainMigratePrepare, - .domainMigratePerform = xenUnifiedDomainMigratePerform, - .domainMigrateFinish = xenUnifiedDomainMigrateFinish, - .domainBlockStats = xenUnifiedDomainBlockStats, - .domainInterfaceStats = xenUnifiedDomainInterfaceStats, - .domainBlockPeek = xenUnifiedDomainBlockPeek, - .nodeGetCellsFreeMemory = xenUnifiedNodeGetCellsFreeMemory, - .getFreeMemory = xenUnifiedNodeGetFreeMemory, - .domainEventRegister = xenUnifiedDomainEventRegister, - .domainEventDeregister = xenUnifiedDomainEventDeregister, + VIR_DRV_XEN_UNIFIED, + "Xen", + xenUnifiedOpen, /* open */ + xenUnifiedClose, /* close */ + xenUnifiedSupportsFeature, /* supports_feature */ + xenUnifiedType, /* type */ + xenUnifiedGetVersion, /* version */ + xenUnifiedGetHostname, /* getHostname */ + NULL, /* getURI */ + xenUnifiedGetMaxVcpus, /* getMaxVcpus */ + xenUnifiedNodeGetInfo, /* nodeGetInfo */ + xenUnifiedGetCapabilities, /* getCapabilities */ + xenUnifiedListDomains, /* listDomains */ + xenUnifiedNumOfDomains, /* numOfDomains */ + xenUnifiedDomainCreateXML, /* domainCreateXML */ + xenUnifiedDomainLookupByID, /* domainLookupByID */ + xenUnifiedDomainLookupByUUID, /* domainLookupByUUID */ + xenUnifiedDomainLookupByName, /* domainLookupByName */ + xenUnifiedDomainSuspend, /* domainSuspend */ + xenUnifiedDomainResume, /* domainResume */ + xenUnifiedDomainShutdown, /* domainShutdown */ + xenUnifiedDomainReboot, /* domainReboot */ + xenUnifiedDomainDestroy, /* domainDestroy */ + xenUnifiedDomainGetOSType, /* domainGetOSType */ + xenUnifiedDomainGetMaxMemory, /* domainGetMaxMemory */ + xenUnifiedDomainSetMaxMemory, /* domainSetMaxMemory */ + xenUnifiedDomainSetMemory, /* domainSetMemory */ + xenUnifiedDomainGetInfo, /* domainGetInfo */ + xenUnifiedDomainSave, /* domainSave */ + xenUnifiedDomainRestore, /* domainRestore */ + xenUnifiedDomainCoreDump, /* domainCoreDump */ + xenUnifiedDomainSetVcpus, /* domainSetVcpus */ + xenUnifiedDomainPinVcpu, /* domainPinVcpu */ + xenUnifiedDomainGetVcpus, /* domainGetVcpus */ + xenUnifiedDomainGetMaxVcpus, /* domainGetMaxVcpus */ + NULL, /* domainGetSecurityLabel */ + NULL, /* nodeGetSecurityModel */ + xenUnifiedDomainDumpXML, /* domainDumpXML */ + xenUnifiedListDefinedDomains, /* listDefinedDomains */ + xenUnifiedNumOfDefinedDomains, /* numOfDefinedDomains */ + xenUnifiedDomainCreate, /* domainCreate */ + xenUnifiedDomainDefineXML, /* domainDefineXML */ + xenUnifiedDomainUndefine, /* domainUndefine */ + xenUnifiedDomainAttachDevice, /* domainAttachDevice */ + xenUnifiedDomainDetachDevice, /* domainDetachDevice */ + xenUnifiedDomainGetAutostart, /* domainGetAutostart */ + xenUnifiedDomainSetAutostart, /* domainSetAutostart */ + xenUnifiedDomainGetSchedulerType, /* domainGetSchedulerType */ + xenUnifiedDomainGetSchedulerParameters, /* domainGetSchedulerParameters */ + xenUnifiedDomainSetSchedulerParameters, /* domainSetSchedulerParameters */ + xenUnifiedDomainMigratePrepare, /* domainMigratePrepare */ + xenUnifiedDomainMigratePerform, /* domainMigratePerform */ + xenUnifiedDomainMigrateFinish, /* domainMigrateFinish */ + xenUnifiedDomainBlockStats, /* domainBlockStats */ + xenUnifiedDomainInterfaceStats, /* domainInterfaceStats */ + xenUnifiedDomainBlockPeek, /* domainBlockPeek */ + NULL, /* domainMemoryPeek */ + xenUnifiedNodeGetCellsFreeMemory, /* nodeGetCellsFreeMemory */ + xenUnifiedNodeGetFreeMemory, /* getFreeMemory */ + xenUnifiedDomainEventRegister, /* domainEventRegister */ + xenUnifiedDomainEventDeregister, /* domainEventDeregister */ + NULL, /* domainMigratePrepare2 */ + NULL, /* domainMigrateFinish2 */ + NULL, /* nodeDeviceDettach */ + NULL, /* nodeDeviceReAttach */ + NULL, /* nodeDeviceReset */ }; /**
-- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list