提交 14280297 编写于 作者: M Matthias Bolte

vbox: Fix logic in storage driver open function

If the main driver is the vbox driver, then the open function
has to return an error if the private data is invalid.
上级 c3ab6b2b
......@@ -7754,19 +7754,16 @@ static virDrvOpenStatus vboxStorageOpen (virConnectPtr conn,
vboxGlobalData *data = conn->privateData;
if (STRNEQ(conn->driver->name, "VBOX"))
goto cleanup;
return VIR_DRV_OPEN_DECLINED;
if ((data->pFuncs == NULL) ||
(data->vboxObj == NULL) ||
(data->vboxSession == NULL))
goto cleanup;
return VIR_DRV_OPEN_ERROR;
VIR_DEBUG("vbox storage initialized");
/* conn->storagePrivateData = some storage specific data */
return VIR_DRV_OPEN_SUCCESS;
cleanup:
return VIR_DRV_OPEN_DECLINED;
}
static int vboxStorageClose (virConnectPtr conn) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册