esx: Switch from name to number checks in the subdrivers

This commit is contained in:
Matthias Bolte 2010-07-25 19:04:22 +02:00
parent 25e34b703a
commit c38e2f7a39
6 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,7 @@ esxDeviceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) int flags ATTRIBUTE_UNUSED)
{ {
if (STRNEQ(conn->driver->name, "ESX")) { if (conn->driver->no != VIR_DRV_ESX) {
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
} }

View File

@ -44,7 +44,7 @@ esxInterfaceOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) int flags ATTRIBUTE_UNUSED)
{ {
if (STRNEQ(conn->driver->name, "ESX")) { if (conn->driver->no != VIR_DRV_ESX) {
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
} }

View File

@ -44,7 +44,7 @@ esxNetworkOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) int flags ATTRIBUTE_UNUSED)
{ {
if (STRNEQ(conn->driver->name, "ESX")) { if (conn->driver->no != VIR_DRV_ESX) {
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
} }

View File

@ -43,7 +43,7 @@ esxNWFilterOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) int flags ATTRIBUTE_UNUSED)
{ {
if (STRNEQ(conn->driver->name, "ESX")) { if (conn->driver->no != VIR_DRV_ESX) {
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
} }

View File

@ -42,7 +42,7 @@ static virDrvOpenStatus
esxSecretOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, esxSecretOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) int flags ATTRIBUTE_UNUSED)
{ {
if (STRNEQ(conn->driver->name, "ESX")) { if (conn->driver->no != VIR_DRV_ESX) {
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
} }

View File

@ -45,7 +45,7 @@ esxStorageOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) int flags ATTRIBUTE_UNUSED)
{ {
if (STRNEQ(conn->driver->name, "ESX")) { if (conn->driver->no != VIR_DRV_ESX) {
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
} }