Since the secondary drivers are only active when the primary driver is also the Hyper-V driver, there is no need to use the different type specific privateData fields. --- src/hyperv/hyperv_device_monitor.c | 6 +----- src/hyperv/hyperv_interface_driver.c | 6 +----- src/hyperv/hyperv_network_driver.c | 6 +----- src/hyperv/hyperv_nwfilter_driver.c | 6 +----- src/hyperv/hyperv_secret_driver.c | 6 +----- src/hyperv/hyperv_storage_driver.c | 6 +----- 6 files changed, 6 insertions(+), 30 deletions(-) diff --git a/src/hyperv/hyperv_device_monitor.c b/src/hyperv/hyperv_device_monitor.c index 5332eb2..23411cd 100644 --- a/src/hyperv/hyperv_device_monitor.c +++ b/src/hyperv/hyperv_device_monitor.c @@ -44,18 +44,14 @@ hypervNodeDeviceOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->nodeDevicePrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervNodeDeviceClose(virConnectPtr conn) +hypervNodeDeviceClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->nodeDevicePrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_interface_driver.c b/src/hyperv/hyperv_interface_driver.c index b93cf30..9b9e4e6 100644 --- a/src/hyperv/hyperv_interface_driver.c +++ b/src/hyperv/hyperv_interface_driver.c @@ -44,18 +44,14 @@ hypervInterfaceOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->interfacePrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervInterfaceClose(virConnectPtr conn) +hypervInterfaceClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->interfacePrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_network_driver.c b/src/hyperv/hyperv_network_driver.c index 6f54f44..ab2daad 100644 --- a/src/hyperv/hyperv_network_driver.c +++ b/src/hyperv/hyperv_network_driver.c @@ -44,18 +44,14 @@ hypervNetworkOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->networkPrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervNetworkClose(virConnectPtr conn) +hypervNetworkClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->networkPrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_nwfilter_driver.c b/src/hyperv/hyperv_nwfilter_driver.c index a82db92..6165bf7 100644 --- a/src/hyperv/hyperv_nwfilter_driver.c +++ b/src/hyperv/hyperv_nwfilter_driver.c @@ -44,18 +44,14 @@ hypervNWFilterOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->nwfilterPrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervNWFilterClose(virConnectPtr conn) +hypervNWFilterClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->nwfilterPrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_secret_driver.c b/src/hyperv/hyperv_secret_driver.c index 8176484..65587f0 100644 --- a/src/hyperv/hyperv_secret_driver.c +++ b/src/hyperv/hyperv_secret_driver.c @@ -44,18 +44,14 @@ hypervSecretOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->secretPrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervSecretClose(virConnectPtr conn) +hypervSecretClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->secretPrivateData = NULL; - return 0; } diff --git a/src/hyperv/hyperv_storage_driver.c b/src/hyperv/hyperv_storage_driver.c index af3cca4..e3d4170 100644 --- a/src/hyperv/hyperv_storage_driver.c +++ b/src/hyperv/hyperv_storage_driver.c @@ -44,18 +44,14 @@ hypervStorageOpen(virConnectPtr conn, return VIR_DRV_OPEN_DECLINED; } - conn->storagePrivateData = conn->privateData; - return VIR_DRV_OPEN_SUCCESS; } static int -hypervStorageClose(virConnectPtr conn) +hypervStorageClose(virConnectPtr conn ATTRIBUTE_UNUSED) { - conn->storagePrivateData = NULL; - return 0; } -- 2.1.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list