From c38e2f7a3994ffe94e519636ba921f440729bbeb Mon Sep 17 00:00:00 2001 From: Matthias Bolte Date: Sun, 25 Jul 2010 19:04:22 +0200 Subject: [PATCH] esx: Switch from name to number checks in the subdrivers --- src/esx/esx_device_monitor.c | 2 +- src/esx/esx_interface_driver.c | 2 +- src/esx/esx_network_driver.c | 2 +- src/esx/esx_nwfilter_driver.c | 2 +- src/esx/esx_secret_driver.c | 2 +- src/esx/esx_storage_driver.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/esx/esx_device_monitor.c b/src/esx/esx_device_monitor.c index 5887ba0a27..d559f96715 100644 --- a/src/esx/esx_device_monitor.c +++ b/src/esx/esx_device_monitor.c @@ -44,7 +44,7 @@ esxDeviceOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED) { - if (STRNEQ(conn->driver->name, "ESX")) { + if (conn->driver->no != VIR_DRV_ESX) { return VIR_DRV_OPEN_DECLINED; } diff --git a/src/esx/esx_interface_driver.c b/src/esx/esx_interface_driver.c index d58e365624..4bac3d5c06 100644 --- a/src/esx/esx_interface_driver.c +++ b/src/esx/esx_interface_driver.c @@ -44,7 +44,7 @@ esxInterfaceOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED) { - if (STRNEQ(conn->driver->name, "ESX")) { + if (conn->driver->no != VIR_DRV_ESX) { return VIR_DRV_OPEN_DECLINED; } diff --git a/src/esx/esx_network_driver.c b/src/esx/esx_network_driver.c index 52f5e6599e..a64bb8eeb7 100644 --- a/src/esx/esx_network_driver.c +++ b/src/esx/esx_network_driver.c @@ -44,7 +44,7 @@ esxNetworkOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED) { - if (STRNEQ(conn->driver->name, "ESX")) { + if (conn->driver->no != VIR_DRV_ESX) { return VIR_DRV_OPEN_DECLINED; } diff --git a/src/esx/esx_nwfilter_driver.c b/src/esx/esx_nwfilter_driver.c index cc2e73b8a8..a9d046d365 100644 --- a/src/esx/esx_nwfilter_driver.c +++ b/src/esx/esx_nwfilter_driver.c @@ -43,7 +43,7 @@ esxNWFilterOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED) { - if (STRNEQ(conn->driver->name, "ESX")) { + if (conn->driver->no != VIR_DRV_ESX) { return VIR_DRV_OPEN_DECLINED; } diff --git a/src/esx/esx_secret_driver.c b/src/esx/esx_secret_driver.c index 2d54b3f1b6..1ae7ddc355 100644 --- a/src/esx/esx_secret_driver.c +++ b/src/esx/esx_secret_driver.c @@ -42,7 +42,7 @@ static virDrvOpenStatus esxSecretOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED) { - if (STRNEQ(conn->driver->name, "ESX")) { + if (conn->driver->no != VIR_DRV_ESX) { return VIR_DRV_OPEN_DECLINED; } diff --git a/src/esx/esx_storage_driver.c b/src/esx/esx_storage_driver.c index 44d7d850d5..9f25e02821 100644 --- a/src/esx/esx_storage_driver.c +++ b/src/esx/esx_storage_driver.c @@ -45,7 +45,7 @@ esxStorageOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, int flags ATTRIBUTE_UNUSED) { - if (STRNEQ(conn->driver->name, "ESX")) { + if (conn->driver->no != VIR_DRV_ESX) { return VIR_DRV_OPEN_DECLINED; } -- 2.39.5