From: Matthias Bolte Date: Sun, 14 Feb 2010 22:15:56 +0000 (+0100) Subject: interface: Use proper return codes in the open function X-Git-Tag: v0.7.7~166 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b75e4df27874ff0e515cbb86ea45b4a551cc357;p=thirdparty%2Flibvirt.git 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. --- diff --git a/src/interface/netcf_driver.c b/src/interface/netcf_driver.c index 275304972b..7f4d43d231 100644 --- a/src/interface/netcf_driver.c +++ b/src/interface/netcf_driver.c @@ -139,7 +139,7 @@ static virDrvOpenStatus interfaceOpenInterface(virConnectPtr conn, } conn->interfacePrivateData = driverState; - return 0; + return VIR_DRV_OPEN_SUCCESS; netcf_error: if (driverState->netcf) @@ -150,7 +150,7 @@ netcf_error: mutex_error: VIR_FREE(driverState); alloc_error: - return -1; + return VIR_DRV_OPEN_ERROR; } static int interfaceCloseInterface(virConnectPtr conn)