From 572d0508958337c6ec2a669c5e61c680818d1be7 Mon Sep 17 00:00:00 2001 From: Dmitry Guryanov Date: Tue, 18 Nov 2014 16:02:04 +0300 Subject: [PATCH] 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: Dmitry Guryanov --- src/parallels/parallels_storage.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/parallels/parallels_storage.c b/src/parallels/parallels_storage.c index 4a16325dc0..e916e0f741 100644 --- a/src/parallels/parallels_storage.c +++ b/src/parallels/parallels_storage.c @@ -72,8 +72,8 @@ parallelsStorageClose(virConnectPtr conn) { parallelsConnPtr privconn = conn->privateData; - virStorageDriverStatePtr storageState = conn->privateData->storageState; - conn->privateData->storageState = NULL; + virStorageDriverStatePtr storageState = privconn->storageState; + privconn->storageState = NULL; parallelsStorageLock(storageState); virStoragePoolObjListFree(&privconn->pools); @@ -189,7 +189,7 @@ parallelsPoolCreateByPath(virConnectPtr conn, const char *path) if (!(pool = virStoragePoolObjAssignDef(pools, def))) goto error; - if (virStoragePoolObjSaveDef(conn->privateData->storageState, pool, def) < 0) { + if (virStoragePoolObjSaveDef(privconn->storageState, pool, def) < 0) { virStoragePoolObjRemove(pools, pool); goto error; } @@ -404,7 +404,7 @@ parallelsPoolsAdd(virDomainObjPtr dom, static int parallelsLoadPools(virConnectPtr conn) { parallelsConnPtr privconn = conn->privateData; - virStorageDriverStatePtr storageState = conn->privateData->storageState; + virStorageDriverStatePtr storageState = privconn->storageState; char *base = NULL; size_t i; @@ -461,6 +461,7 @@ parallelsStorageOpen(virConnectPtr conn, virConnectAuthPtr auth ATTRIBUTE_UNUSED, unsigned int flags) { + parallelsConnPtr privconn = conn->privateData; virStorageDriverStatePtr storageState; virCheckFlags(VIR_CONNECT_RO, VIR_DRV_OPEN_ERROR); @@ -475,7 +476,7 @@ parallelsStorageOpen(virConnectPtr conn, return VIR_DRV_OPEN_ERROR; } - conn->privateData->storageState = storageState; + privconn->storageState = storageState; parallelsStorageLock(storageState); if (parallelsLoadPools(conn)) @@ -728,7 +729,7 @@ parallelsStoragePoolDefineXML(virConnectPtr conn, if (!(pool = virStoragePoolObjAssignDef(&privconn->pools, def))) goto cleanup; - if (virStoragePoolObjSaveDef(conn->privateData->storageState, pool, def) < 0) { + if (virStoragePoolObjSaveDef(privconn->storageState, pool, def) < 0) { virStoragePoolObjRemove(&privconn->pools, pool); def = NULL; goto cleanup;