提交 4b75e4df 编写于 作者: M Matthias Bolte

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.
上级 cad2a4ca
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册