mirror of https://gitee.com/openkylin/libvirt.git
esx: Switch from name to number checks in the subdrivers
This commit is contained in:
parent
25e34b703a
commit
c38e2f7a39
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue