From 63c3c5399b9df0a25e666f816c959bcd1c97c055 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Thu, 23 Oct 2014 14:33:11 +0100 Subject: [PATCH] Update Hyper-V driver to always use privateData 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 5332eb2b7..23411cd20 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 b93cf30ef..9b9e4e605 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 6f54f4497..ab2daad65 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 a82db9259..6165bf7f8 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 81764842a..65587f03b 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 af3cca4d5..e3d4170a8 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.39.5