mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-02 01:45:17 +00:00
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.
This commit is contained in:
parent
c3ab6b2b53
commit
1428029738
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user