mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 14:57:42 +00:00
interface: Use proper return codes in the open function
The open function returned -1 in case of an error, but -1 maps to VIR_DRV_OPEN_DECLINED instead of VIR_DRV_OPEN_ERROR.
This commit is contained in:
parent
cad2a4caed
commit
4b75e4df27
@ -139,7 +139,7 @@ static virDrvOpenStatus interfaceOpenInterface(virConnectPtr conn,
|
|||||||
}
|
}
|
||||||
|
|
||||||
conn->interfacePrivateData = driverState;
|
conn->interfacePrivateData = driverState;
|
||||||
return 0;
|
return VIR_DRV_OPEN_SUCCESS;
|
||||||
|
|
||||||
netcf_error:
|
netcf_error:
|
||||||
if (driverState->netcf)
|
if (driverState->netcf)
|
||||||
@ -150,7 +150,7 @@ netcf_error:
|
|||||||
mutex_error:
|
mutex_error:
|
||||||
VIR_FREE(driverState);
|
VIR_FREE(driverState);
|
||||||
alloc_error:
|
alloc_error:
|
||||||
return -1;
|
return VIR_DRV_OPEN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int interfaceCloseInterface(virConnectPtr conn)
|
static int interfaceCloseInterface(virConnectPtr conn)
|
||||||
|
Loading…
Reference in New Issue
Block a user