Indent top-level labels by one space in src/parallels/

This commit is contained in:
Ján Tomko 2014-03-25 07:57:01 +01:00
parent 5d8315975e
commit 34ff191cc9
4 changed files with 78 additions and 78 deletions

View File

@ -284,7 +284,7 @@ parallelsAddVideoInfo(virDomainDefPtr def, virJSONValuePtr value)
return 0; return 0;
error: error:
VIR_FREE(accel); VIR_FREE(accel);
virDomainVideoDefFree(video); virDomainVideoDefFree(video);
return -1; return -1;
@ -390,7 +390,7 @@ parallelsAddHddInfo(virDomainDefPtr def, const char *key, virJSONValuePtr value)
return 0; return 0;
error: error:
virDomainDiskDefFree(disk); virDomainDiskDefFree(disk);
return -1; return -1;
} }
@ -422,7 +422,7 @@ parallelsMacAddrParse(const char *str, virMacAddrPtr addr)
} }
return 0; return 0;
error: error:
virReportError(VIR_ERR_INVALID_ARG, virReportError(VIR_ERR_INVALID_ARG,
_("Invalid MAC address format '%s'"), str); _("Invalid MAC address format '%s'"), str);
return -1; return -1;
@ -488,7 +488,7 @@ parallelsGetNetInfo(virDomainNetDefPtr net,
return 0; return 0;
error: error:
return -1; return -1;
} }
@ -510,7 +510,7 @@ parallelsAddNetInfo(virDomainDefPtr def, const char *key, virJSONValuePtr value)
return 0; return 0;
error: error:
virDomainNetDefFree(net); virDomainNetDefFree(net);
return -1; return -1;
} }
@ -1008,7 +1008,7 @@ parallelsConnectGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *h
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(output); VIR_FREE(output);
return ret; return ret;
} }
@ -1490,7 +1490,7 @@ parallelsApplyGraphicsParams(virDomainGraphicsDefPtr *oldgraphics, int nold,
} }
return 0; return 0;
error: error:
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
_("changing display parameters is not supported " _("changing display parameters is not supported "
"by parallels driver")); "by parallels driver"));
@ -1538,7 +1538,7 @@ parallelsApplySerialParams(virDomainChrDefPtr *oldserials, int nold,
} }
return 0; return 0;
error: error:
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s", virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
_("changing serial device parameters is " _("changing serial device parameters is "
"not supported by parallels driver")); "not supported by parallels driver"));
@ -1634,7 +1634,7 @@ static int parallelsAddHddByVolume(parallelsDomObjPtr pdom,
goto cleanup; goto cleanup;
ret = 0; ret = 0;
cleanup: cleanup:
virCommandFree(cmd); virCommandFree(cmd);
return ret; return ret;
} }
@ -1674,7 +1674,7 @@ static int parallelsAddHdd(virConnectPtr conn,
ret = parallelsAddHddByVolume(pdom, disk, pool, voldef); ret = parallelsAddHddByVolume(pdom, disk, pool, voldef);
cleanup: cleanup:
if (pool) if (pool)
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
virObjectUnref(vol); virObjectUnref(vol);
@ -1895,7 +1895,7 @@ static int parallelsApplyIfaceParams(parallelsDomObjPtr pdom,
ret = 0; ret = 0;
cleanup: cleanup:
if (create) if (create)
VIR_FREE(oldnet); VIR_FREE(oldnet);
virCommandFree(cmd); virCommandFree(cmd);
@ -2295,7 +2295,7 @@ parallelsCreateCt(virConnectPtr conn ATTRIBUTE_UNUSED, virDomainDefPtr def)
return 0; return 0;
error: error:
return -1; return -1;
} }

View File

@ -94,7 +94,7 @@ static int parallelsGetBridgedNetInfo(virNetworkDefPtr def, virJSONValuePtr jobj
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(bridgeLink); VIR_FREE(bridgeLink);
VIR_FREE(bridgePath); VIR_FREE(bridgePath);
VIR_FREE(bridgeAddress); VIR_FREE(bridgeAddress);
@ -175,7 +175,7 @@ static int parallelsGetHostOnlyNetInfo(virNetworkDefPtr def, const char *name)
} }
ret = 0; ret = 0;
cleanup: cleanup:
virJSONValueFree(jobj); virJSONValueFree(jobj);
return ret; return ret;
} }
@ -236,7 +236,7 @@ parallelsLoadNetwork(parallelsConnPtr privconn, virJSONValuePtr jobj)
virNetworkObjUnlock(net); virNetworkObjUnlock(net);
return net; return net;
cleanup: cleanup:
virNetworkDefFree(def); virNetworkDefFree(def);
return NULL; return NULL;
} }
@ -273,7 +273,7 @@ parallelsAddRoutedNetwork(parallelsConnPtr privconn)
return net; return net;
cleanup: cleanup:
virNetworkDefFree(def); virNetworkDefFree(def);
return NULL; return NULL;
} }
@ -317,7 +317,7 @@ static int parallelsLoadNetworks(parallelsConnPtr privconn)
ret = 0; ret = 0;
cleanup: cleanup:
virJSONValueFree(jobj); virJSONValueFree(jobj);
return ret; return ret;
} }
@ -480,7 +480,7 @@ static virNetworkPtr parallelsNetworkLookupByUUID(virConnectPtr conn,
ret = virGetNetwork(conn, network->def->name, network->def->uuid); ret = virGetNetwork(conn, network->def->name, network->def->uuid);
cleanup: cleanup:
if (network) if (network)
virNetworkObjUnlock(network); virNetworkObjUnlock(network);
return ret; return ret;
@ -504,7 +504,7 @@ static virNetworkPtr parallelsNetworkLookupByName(virConnectPtr conn,
ret = virGetNetwork(conn, network->def->name, network->def->uuid); ret = virGetNetwork(conn, network->def->name, network->def->uuid);
cleanup: cleanup:
if (network) if (network)
virNetworkObjUnlock(network); virNetworkObjUnlock(network);
return ret; return ret;
@ -531,7 +531,7 @@ static char *parallelsNetworkGetXMLDesc(virNetworkPtr net,
ret = virNetworkDefFormat(network->def, flags); ret = virNetworkDefFormat(network->def, flags);
cleanup: cleanup:
if (network) if (network)
virNetworkObjUnlock(network); virNetworkObjUnlock(network);
return ret; return ret;
@ -552,7 +552,7 @@ static int parallelsNetworkIsActive(virNetworkPtr net)
} }
ret = virNetworkObjIsActive(obj); ret = virNetworkObjIsActive(obj);
cleanup: cleanup:
if (obj) if (obj)
virNetworkObjUnlock(obj); virNetworkObjUnlock(obj);
return ret; return ret;
@ -573,7 +573,7 @@ static int parallelsNetworkIsPersistent(virNetworkPtr net)
} }
ret = obj->persistent; ret = obj->persistent;
cleanup: cleanup:
if (obj) if (obj)
virNetworkObjUnlock(obj); virNetworkObjUnlock(obj);
return ret; return ret;
@ -598,7 +598,7 @@ static int parallelsNetworkGetAutostart(virNetworkPtr net,
*autostart = network->autostart; *autostart = network->autostart;
ret = 0; ret = 0;
cleanup: cleanup:
if (network) if (network)
virNetworkObjUnlock(network); virNetworkObjUnlock(network);
return ret; return ret;

View File

@ -115,7 +115,7 @@ parallelsFindVolumes(virStoragePoolObjPtr pool)
} }
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(path); VIR_FREE(path);
closedir(dir); closedir(dir);
return ret; return ret;
@ -194,7 +194,7 @@ parallelsPoolCreateByPath(virConnectPtr conn, const char *path)
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
return pool; return pool;
error: error:
virStoragePoolDefFree(def); virStoragePoolDefFree(def);
if (pool) if (pool)
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
@ -267,7 +267,7 @@ static int parallelsDiskDescParseNode(xmlDocPtr xml,
def->capacity <<= 9; def->capacity <<= 9;
def->allocation = def->capacity; def->allocation = def->capacity;
ret = 0; ret = 0;
cleanup: cleanup:
xmlXPathFreeContext(ctxt); xmlXPathFreeContext(ctxt);
return ret; return ret;
@ -315,9 +315,9 @@ static int parallelsAddDiskVolume(virStoragePoolObjPtr pool,
goto error; goto error;
return 0; return 0;
no_memory: no_memory:
virReportOOMError(); virReportOOMError();
error: error:
virStorageVolDefFree(def); virStorageVolDefFree(def);
return -1; return -1;
} }
@ -372,7 +372,7 @@ static int parallelsFindVmVolumes(virStoragePoolObjPtr pool,
} }
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(diskPath); VIR_FREE(diskPath);
VIR_FREE(diskDescPath); VIR_FREE(diskDescPath);
closedir(dir); closedir(dir);
@ -446,7 +446,7 @@ static int parallelsLoadPools(virConnectPtr conn)
return 0; return 0;
error: error:
VIR_FREE(base); VIR_FREE(base);
return -1; return -1;
} }
@ -480,7 +480,7 @@ parallelsStorageOpen(virConnectPtr conn,
return VIR_DRV_OPEN_SUCCESS; return VIR_DRV_OPEN_SUCCESS;
error: error:
parallelsStorageUnlock(storageState); parallelsStorageUnlock(storageState);
parallelsStorageClose(conn); parallelsStorageClose(conn);
return -1; return -1;
@ -524,7 +524,7 @@ parallelsConnectListStoragePools(virConnectPtr conn, char **const names, int nna
return n; return n;
error: error:
for (n = 0; n < nnames; n++) for (n = 0; n < nnames; n++)
VIR_FREE(names[n]); VIR_FREE(names[n]);
parallelsDriverUnlock(privconn); parallelsDriverUnlock(privconn);
@ -573,7 +573,7 @@ parallelsConnectListDefinedStoragePools(virConnectPtr conn,
return n; return n;
error: error:
for (n = 0; n < nnames; n++) for (n = 0; n < nnames; n++)
VIR_FREE(names[n]); VIR_FREE(names[n]);
parallelsDriverUnlock(privconn); parallelsDriverUnlock(privconn);
@ -597,7 +597,7 @@ parallelsStoragePoolIsActive(virStoragePoolPtr pool)
} }
ret = virStoragePoolObjIsActive(obj); ret = virStoragePoolObjIsActive(obj);
cleanup: cleanup:
if (obj) if (obj)
virStoragePoolObjUnlock(obj); virStoragePoolObjUnlock(obj);
return ret; return ret;
@ -628,7 +628,7 @@ parallelsStoragePoolLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid, ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL); NULL, NULL);
cleanup: cleanup:
if (pool) if (pool)
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
return ret; return ret;
@ -653,7 +653,7 @@ parallelsStoragePoolLookupByName(virConnectPtr conn, const char *name)
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid, ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL); NULL, NULL);
cleanup: cleanup:
if (pool) if (pool)
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
return ret; return ret;
@ -736,7 +736,7 @@ parallelsStoragePoolDefineXML(virConnectPtr conn,
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid, ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL); NULL, NULL);
cleanup: cleanup:
virStoragePoolDefFree(def); virStoragePoolDefFree(def);
if (pool) if (pool)
virStoragePoolObjUnlock(pool); virStoragePoolObjUnlock(pool);
@ -773,7 +773,7 @@ parallelsStoragePoolUndefine(virStoragePoolPtr pool)
virStoragePoolObjRemove(&privconn->pools, privpool); virStoragePoolObjRemove(&privconn->pools, privpool);
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
parallelsDriverUnlock(privconn); parallelsDriverUnlock(privconn);
@ -807,7 +807,7 @@ parallelsStoragePoolCreate(virStoragePoolPtr pool, unsigned int flags)
privpool->active = 1; privpool->active = 1;
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -840,7 +840,7 @@ parallelsStoragePoolDestroy(virStoragePoolPtr pool)
} }
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
parallelsDriverUnlock(privconn); parallelsDriverUnlock(privconn);
@ -872,7 +872,7 @@ parallelsStoragePoolRefresh(virStoragePoolPtr pool, unsigned int flags)
} }
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -905,7 +905,7 @@ parallelsStoragePoolGetInfo(virStoragePoolPtr pool, virStoragePoolInfoPtr info)
info->available = privpool->def->available; info->available = privpool->def->available;
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -931,7 +931,7 @@ parallelsStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
ret = virStoragePoolDefFormat(privpool->def); ret = virStoragePoolDefFormat(privpool->def);
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -960,7 +960,7 @@ parallelsStoragePoolGetAutostart(virStoragePoolPtr pool, int *autostart)
} }
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -990,7 +990,7 @@ parallelsStoragePoolSetAutostart(virStoragePoolPtr pool, int autostart)
privpool->autostart = (autostart != 0); privpool->autostart = (autostart != 0);
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -1020,7 +1020,7 @@ parallelsStoragePoolNumOfVolumes(virStoragePoolPtr pool)
ret = privpool->volumes.count; ret = privpool->volumes.count;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -1061,7 +1061,7 @@ parallelsStoragePoolListVolumes(virStoragePoolPtr pool,
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return n; return n;
error: error:
for (n = 0; n < maxnames; n++) for (n = 0; n < maxnames; n++)
VIR_FREE(names[i]); VIR_FREE(names[i]);
@ -1107,7 +1107,7 @@ parallelsStorageVolLookupByName(virStoragePoolPtr pool,
privvol->name, privvol->key, privvol->name, privvol->key,
NULL, NULL); NULL, NULL);
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -1257,7 +1257,7 @@ parallelsStorageVolDefineXML(virStoragePoolObjPtr pool,
ret = privvol; ret = privvol;
privvol = NULL; privvol = NULL;
cleanup: cleanup:
virStorageVolDefFree(privvol); virStorageVolDefFree(privvol);
VIR_FREE(xml_path); VIR_FREE(xml_path);
return ret; return ret;
@ -1296,7 +1296,7 @@ parallelsStorageVolCreateXML(virStoragePoolPtr pool,
ret = virGetStorageVol(pool->conn, privpool->def->name, ret = virGetStorageVol(pool->conn, privpool->def->name,
privvol->name, privvol->key, privvol->name, privvol->key,
NULL, NULL); NULL, NULL);
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -1379,7 +1379,7 @@ parallelsStorageVolCreateXMLFrom(virStoragePoolPtr pool,
NULL, NULL); NULL, NULL);
privvol = NULL; privvol = NULL;
cleanup: cleanup:
virStorageVolDefFree(privvol); virStorageVolDefFree(privvol);
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
@ -1417,7 +1417,7 @@ int parallelsStorageVolDefRemove(virStoragePoolObjPtr privpool,
} }
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(xml_path); VIR_FREE(xml_path);
return ret; return ret;
} }
@ -1462,7 +1462,7 @@ parallelsStorageVolDelete(virStorageVolPtr vol, unsigned int flags)
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -1478,7 +1478,7 @@ parallelsStorageVolTypeForPool(int pooltype)
case VIR_STORAGE_POOL_FS: case VIR_STORAGE_POOL_FS:
case VIR_STORAGE_POOL_NETFS: case VIR_STORAGE_POOL_NETFS:
return VIR_STORAGE_VOL_FILE; return VIR_STORAGE_VOL_FILE;
default: default:
return VIR_STORAGE_VOL_BLOCK; return VIR_STORAGE_VOL_BLOCK;
} }
} }
@ -1520,7 +1520,7 @@ parallelsStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info)
info->allocation = privvol->allocation; info->allocation = privvol->allocation;
ret = 0; ret = 0;
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -1561,7 +1561,7 @@ parallelsStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
ret = virStorageVolDefFormat(privpool->def, privvol); ret = virStorageVolDefFormat(privpool->def, privvol);
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;
@ -1600,7 +1600,7 @@ parallelsStorageVolGetPath(virStorageVolPtr vol)
ignore_value(VIR_STRDUP(ret, privvol->target.path)); ignore_value(VIR_STRDUP(ret, privvol->target.path));
cleanup: cleanup:
if (privpool) if (privpool)
virStoragePoolObjUnlock(privpool); virStoragePoolObjUnlock(privpool);
return ret; return ret;