提交 572d0508 编写于 作者: D Dmitry Guryanov 提交者: Ján Tomko

parallels: fix compilation of parallels_storage.c

virConnect.privateData is void *, so we can't access
fields of parallelsConn, pointer to which is stored in
virConnect.privateData. So replace all occurences of
conn->privateData->storageState with privconn->storageState.
Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
上级 a47ae7c0
...@@ -72,8 +72,8 @@ parallelsStorageClose(virConnectPtr conn) ...@@ -72,8 +72,8 @@ parallelsStorageClose(virConnectPtr conn)
{ {
parallelsConnPtr privconn = conn->privateData; parallelsConnPtr privconn = conn->privateData;
virStorageDriverStatePtr storageState = conn->privateData->storageState; virStorageDriverStatePtr storageState = privconn->storageState;
conn->privateData->storageState = NULL; privconn->storageState = NULL;
parallelsStorageLock(storageState); parallelsStorageLock(storageState);
virStoragePoolObjListFree(&privconn->pools); virStoragePoolObjListFree(&privconn->pools);
...@@ -189,7 +189,7 @@ parallelsPoolCreateByPath(virConnectPtr conn, const char *path) ...@@ -189,7 +189,7 @@ parallelsPoolCreateByPath(virConnectPtr conn, const char *path)
if (!(pool = virStoragePoolObjAssignDef(pools, def))) if (!(pool = virStoragePoolObjAssignDef(pools, def)))
goto error; goto error;
if (virStoragePoolObjSaveDef(conn->privateData->storageState, pool, def) < 0) { if (virStoragePoolObjSaveDef(privconn->storageState, pool, def) < 0) {
virStoragePoolObjRemove(pools, pool); virStoragePoolObjRemove(pools, pool);
goto error; goto error;
} }
...@@ -404,7 +404,7 @@ parallelsPoolsAdd(virDomainObjPtr dom, ...@@ -404,7 +404,7 @@ parallelsPoolsAdd(virDomainObjPtr dom,
static int parallelsLoadPools(virConnectPtr conn) static int parallelsLoadPools(virConnectPtr conn)
{ {
parallelsConnPtr privconn = conn->privateData; parallelsConnPtr privconn = conn->privateData;
virStorageDriverStatePtr storageState = conn->privateData->storageState; virStorageDriverStatePtr storageState = privconn->storageState;
char *base = NULL; char *base = NULL;
size_t i; size_t i;
...@@ -461,6 +461,7 @@ parallelsStorageOpen(virConnectPtr conn, ...@@ -461,6 +461,7 @@ parallelsStorageOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags) unsigned int flags)
{ {
parallelsConnPtr privconn = conn->privateData;
virStorageDriverStatePtr storageState; virStorageDriverStatePtr storageState;
virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR);
...@@ -475,7 +476,7 @@ parallelsStorageOpen(virConnectPtr conn, ...@@ -475,7 +476,7 @@ parallelsStorageOpen(virConnectPtr conn,
return VIR_DRV_OPEN_ERROR; return VIR_DRV_OPEN_ERROR;
} }
conn->privateData->storageState = storageState; privconn->storageState = storageState;
parallelsStorageLock(storageState); parallelsStorageLock(storageState);
if (parallelsLoadPools(conn)) if (parallelsLoadPools(conn))
...@@ -728,7 +729,7 @@ parallelsStoragePoolDefineXML(virConnectPtr conn, ...@@ -728,7 +729,7 @@ parallelsStoragePoolDefineXML(virConnectPtr conn,
if (!(pool = virStoragePoolObjAssignDef(&privconn->pools, def))) if (!(pool = virStoragePoolObjAssignDef(&privconn->pools, def)))
goto cleanup; goto cleanup;
if (virStoragePoolObjSaveDef(conn->privateData->storageState, pool, def) < 0) { if (virStoragePoolObjSaveDef(privconn->storageState, pool, def) < 0) {
virStoragePoolObjRemove(&privconn->pools, pool); virStoragePoolObjRemove(&privconn->pools, pool);
def = NULL; def = NULL;
goto cleanup; goto cleanup;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册