]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
interface: Use proper return codes in the open function
authorMatthias Bolte <matthias.bolte@googlemail.com>
Sun, 14 Feb 2010 22:15:56 +0000 (23:15 +0100)
committerMatthias Bolte <matthias.bolte@googlemail.com>
Mon, 15 Feb 2010 09:59:43 +0000 (10:59 +0100)
The open function returned -1 in case of an error, but -1 maps
to VIR_DRV_OPEN_DECLINED instead of VIR_DRV_OPEN_ERROR.

src/interface/netcf_driver.c

index 275304972b5563ef1d64914b9e03925cbb159c5d..7f4d43d231a00b389f58c46cd590316781488a31 100644 (file)
@@ -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)