mirror of https://gitee.com/openkylin/libvirt.git
Indent top-level labels by one space in src/parallels/
This commit is contained in:
parent
5d8315975e
commit
34ff191cc9
|
@ -284,7 +284,7 @@ parallelsAddVideoInfo(virDomainDefPtr def, virJSONValuePtr value)
|
|||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
VIR_FREE(accel);
|
||||
virDomainVideoDefFree(video);
|
||||
return -1;
|
||||
|
@ -390,7 +390,7 @@ parallelsAddHddInfo(virDomainDefPtr def, const char *key, virJSONValuePtr value)
|
|||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
virDomainDiskDefFree(disk);
|
||||
return -1;
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ parallelsMacAddrParse(const char *str, virMacAddrPtr addr)
|
|||
}
|
||||
|
||||
return 0;
|
||||
error:
|
||||
error:
|
||||
virReportError(VIR_ERR_INVALID_ARG,
|
||||
_("Invalid MAC address format '%s'"), str);
|
||||
return -1;
|
||||
|
@ -488,7 +488,7 @@ parallelsGetNetInfo(virDomainNetDefPtr net,
|
|||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
@ -510,7 +510,7 @@ parallelsAddNetInfo(virDomainDefPtr def, const char *key, virJSONValuePtr value)
|
|||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
virDomainNetDefFree(net);
|
||||
return -1;
|
||||
}
|
||||
|
@ -1008,7 +1008,7 @@ parallelsConnectGetVersion(virConnectPtr conn ATTRIBUTE_UNUSED, unsigned long *h
|
|||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
VIR_FREE(output);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1490,7 +1490,7 @@ parallelsApplyGraphicsParams(virDomainGraphicsDefPtr *oldgraphics, int nold,
|
|||
}
|
||||
|
||||
return 0;
|
||||
error:
|
||||
error:
|
||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
||||
_("changing display parameters is not supported "
|
||||
"by parallels driver"));
|
||||
|
@ -1538,7 +1538,7 @@ parallelsApplySerialParams(virDomainChrDefPtr *oldserials, int nold,
|
|||
}
|
||||
|
||||
return 0;
|
||||
error:
|
||||
error:
|
||||
virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
|
||||
_("changing serial device parameters is "
|
||||
"not supported by parallels driver"));
|
||||
|
@ -1634,7 +1634,7 @@ static int parallelsAddHddByVolume(parallelsDomObjPtr pdom,
|
|||
goto cleanup;
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
cleanup:
|
||||
virCommandFree(cmd);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1674,7 +1674,7 @@ static int parallelsAddHdd(virConnectPtr conn,
|
|||
|
||||
ret = parallelsAddHddByVolume(pdom, disk, pool, voldef);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (pool)
|
||||
virStoragePoolObjUnlock(pool);
|
||||
virObjectUnref(vol);
|
||||
|
@ -1895,7 +1895,7 @@ static int parallelsApplyIfaceParams(parallelsDomObjPtr pdom,
|
|||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (create)
|
||||
VIR_FREE(oldnet);
|
||||
virCommandFree(cmd);
|
||||
|
@ -2295,7 +2295,7 @@ parallelsCreateCt(virConnectPtr conn ATTRIBUTE_UNUSED, virDomainDefPtr def)
|
|||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -94,7 +94,7 @@ static int parallelsGetBridgedNetInfo(virNetworkDefPtr def, virJSONValuePtr jobj
|
|||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
VIR_FREE(bridgeLink);
|
||||
VIR_FREE(bridgePath);
|
||||
VIR_FREE(bridgeAddress);
|
||||
|
@ -175,7 +175,7 @@ static int parallelsGetHostOnlyNetInfo(virNetworkDefPtr def, const char *name)
|
|||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
cleanup:
|
||||
virJSONValueFree(jobj);
|
||||
return ret;
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ parallelsLoadNetwork(parallelsConnPtr privconn, virJSONValuePtr jobj)
|
|||
virNetworkObjUnlock(net);
|
||||
return net;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
virNetworkDefFree(def);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -273,7 +273,7 @@ parallelsAddRoutedNetwork(parallelsConnPtr privconn)
|
|||
|
||||
return net;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
virNetworkDefFree(def);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -317,7 +317,7 @@ static int parallelsLoadNetworks(parallelsConnPtr privconn)
|
|||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
virJSONValueFree(jobj);
|
||||
return ret;
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ static virNetworkPtr parallelsNetworkLookupByUUID(virConnectPtr conn,
|
|||
|
||||
ret = virGetNetwork(conn, network->def->name, network->def->uuid);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (network)
|
||||
virNetworkObjUnlock(network);
|
||||
return ret;
|
||||
|
@ -504,7 +504,7 @@ static virNetworkPtr parallelsNetworkLookupByName(virConnectPtr conn,
|
|||
|
||||
ret = virGetNetwork(conn, network->def->name, network->def->uuid);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (network)
|
||||
virNetworkObjUnlock(network);
|
||||
return ret;
|
||||
|
@ -531,7 +531,7 @@ static char *parallelsNetworkGetXMLDesc(virNetworkPtr net,
|
|||
|
||||
ret = virNetworkDefFormat(network->def, flags);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (network)
|
||||
virNetworkObjUnlock(network);
|
||||
return ret;
|
||||
|
@ -552,7 +552,7 @@ static int parallelsNetworkIsActive(virNetworkPtr net)
|
|||
}
|
||||
ret = virNetworkObjIsActive(obj);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (obj)
|
||||
virNetworkObjUnlock(obj);
|
||||
return ret;
|
||||
|
@ -573,7 +573,7 @@ static int parallelsNetworkIsPersistent(virNetworkPtr net)
|
|||
}
|
||||
ret = obj->persistent;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (obj)
|
||||
virNetworkObjUnlock(obj);
|
||||
return ret;
|
||||
|
@ -598,7 +598,7 @@ static int parallelsNetworkGetAutostart(virNetworkPtr net,
|
|||
*autostart = network->autostart;
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (network)
|
||||
virNetworkObjUnlock(network);
|
||||
return ret;
|
||||
|
|
|
@ -115,7 +115,7 @@ parallelsFindVolumes(virStoragePoolObjPtr pool)
|
|||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
cleanup:
|
||||
VIR_FREE(path);
|
||||
closedir(dir);
|
||||
return ret;
|
||||
|
@ -194,7 +194,7 @@ parallelsPoolCreateByPath(virConnectPtr conn, const char *path)
|
|||
virStoragePoolObjUnlock(pool);
|
||||
|
||||
return pool;
|
||||
error:
|
||||
error:
|
||||
virStoragePoolDefFree(def);
|
||||
if (pool)
|
||||
virStoragePoolObjUnlock(pool);
|
||||
|
@ -267,7 +267,7 @@ static int parallelsDiskDescParseNode(xmlDocPtr xml,
|
|||
def->capacity <<= 9;
|
||||
def->allocation = def->capacity;
|
||||
ret = 0;
|
||||
cleanup:
|
||||
cleanup:
|
||||
xmlXPathFreeContext(ctxt);
|
||||
return ret;
|
||||
|
||||
|
@ -315,9 +315,9 @@ static int parallelsAddDiskVolume(virStoragePoolObjPtr pool,
|
|||
goto error;
|
||||
|
||||
return 0;
|
||||
no_memory:
|
||||
no_memory:
|
||||
virReportOOMError();
|
||||
error:
|
||||
error:
|
||||
virStorageVolDefFree(def);
|
||||
return -1;
|
||||
}
|
||||
|
@ -372,7 +372,7 @@ static int parallelsFindVmVolumes(virStoragePoolObjPtr pool,
|
|||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
cleanup:
|
||||
VIR_FREE(diskPath);
|
||||
VIR_FREE(diskDescPath);
|
||||
closedir(dir);
|
||||
|
@ -446,7 +446,7 @@ static int parallelsLoadPools(virConnectPtr conn)
|
|||
|
||||
return 0;
|
||||
|
||||
error:
|
||||
error:
|
||||
VIR_FREE(base);
|
||||
return -1;
|
||||
}
|
||||
|
@ -480,7 +480,7 @@ parallelsStorageOpen(virConnectPtr conn,
|
|||
|
||||
return VIR_DRV_OPEN_SUCCESS;
|
||||
|
||||
error:
|
||||
error:
|
||||
parallelsStorageUnlock(storageState);
|
||||
parallelsStorageClose(conn);
|
||||
return -1;
|
||||
|
@ -524,7 +524,7 @@ parallelsConnectListStoragePools(virConnectPtr conn, char **const names, int nna
|
|||
|
||||
return n;
|
||||
|
||||
error:
|
||||
error:
|
||||
for (n = 0; n < nnames; n++)
|
||||
VIR_FREE(names[n]);
|
||||
parallelsDriverUnlock(privconn);
|
||||
|
@ -573,7 +573,7 @@ parallelsConnectListDefinedStoragePools(virConnectPtr conn,
|
|||
|
||||
return n;
|
||||
|
||||
error:
|
||||
error:
|
||||
for (n = 0; n < nnames; n++)
|
||||
VIR_FREE(names[n]);
|
||||
parallelsDriverUnlock(privconn);
|
||||
|
@ -597,7 +597,7 @@ parallelsStoragePoolIsActive(virStoragePoolPtr pool)
|
|||
}
|
||||
ret = virStoragePoolObjIsActive(obj);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (obj)
|
||||
virStoragePoolObjUnlock(obj);
|
||||
return ret;
|
||||
|
@ -628,7 +628,7 @@ parallelsStoragePoolLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
|
|||
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
|
||||
NULL, NULL);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (pool)
|
||||
virStoragePoolObjUnlock(pool);
|
||||
return ret;
|
||||
|
@ -653,7 +653,7 @@ parallelsStoragePoolLookupByName(virConnectPtr conn, const char *name)
|
|||
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
|
||||
NULL, NULL);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (pool)
|
||||
virStoragePoolObjUnlock(pool);
|
||||
return ret;
|
||||
|
@ -736,7 +736,7 @@ parallelsStoragePoolDefineXML(virConnectPtr conn,
|
|||
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
|
||||
NULL, NULL);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
virStoragePoolDefFree(def);
|
||||
if (pool)
|
||||
virStoragePoolObjUnlock(pool);
|
||||
|
@ -773,7 +773,7 @@ parallelsStoragePoolUndefine(virStoragePoolPtr pool)
|
|||
virStoragePoolObjRemove(&privconn->pools, privpool);
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
parallelsDriverUnlock(privconn);
|
||||
|
@ -807,7 +807,7 @@ parallelsStoragePoolCreate(virStoragePoolPtr pool, unsigned int flags)
|
|||
privpool->active = 1;
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -840,7 +840,7 @@ parallelsStoragePoolDestroy(virStoragePoolPtr pool)
|
|||
}
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
parallelsDriverUnlock(privconn);
|
||||
|
@ -872,7 +872,7 @@ parallelsStoragePoolRefresh(virStoragePoolPtr pool, unsigned int flags)
|
|||
}
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -905,7 +905,7 @@ parallelsStoragePoolGetInfo(virStoragePoolPtr pool, virStoragePoolInfoPtr info)
|
|||
info->available = privpool->def->available;
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -931,7 +931,7 @@ parallelsStoragePoolGetXMLDesc(virStoragePoolPtr pool, unsigned int flags)
|
|||
|
||||
ret = virStoragePoolDefFormat(privpool->def);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -960,7 +960,7 @@ parallelsStoragePoolGetAutostart(virStoragePoolPtr pool, int *autostart)
|
|||
}
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -990,7 +990,7 @@ parallelsStoragePoolSetAutostart(virStoragePoolPtr pool, int autostart)
|
|||
privpool->autostart = (autostart != 0);
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -1020,7 +1020,7 @@ parallelsStoragePoolNumOfVolumes(virStoragePoolPtr pool)
|
|||
|
||||
ret = privpool->volumes.count;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -1061,7 +1061,7 @@ parallelsStoragePoolListVolumes(virStoragePoolPtr pool,
|
|||
virStoragePoolObjUnlock(privpool);
|
||||
return n;
|
||||
|
||||
error:
|
||||
error:
|
||||
for (n = 0; n < maxnames; n++)
|
||||
VIR_FREE(names[i]);
|
||||
|
||||
|
@ -1107,7 +1107,7 @@ parallelsStorageVolLookupByName(virStoragePoolPtr pool,
|
|||
privvol->name, privvol->key,
|
||||
NULL, NULL);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -1257,7 +1257,7 @@ parallelsStorageVolDefineXML(virStoragePoolObjPtr pool,
|
|||
ret = privvol;
|
||||
privvol = NULL;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
virStorageVolDefFree(privvol);
|
||||
VIR_FREE(xml_path);
|
||||
return ret;
|
||||
|
@ -1296,7 +1296,7 @@ parallelsStorageVolCreateXML(virStoragePoolPtr pool,
|
|||
ret = virGetStorageVol(pool->conn, privpool->def->name,
|
||||
privvol->name, privvol->key,
|
||||
NULL, NULL);
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -1379,7 +1379,7 @@ parallelsStorageVolCreateXMLFrom(virStoragePoolPtr pool,
|
|||
NULL, NULL);
|
||||
privvol = NULL;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
virStorageVolDefFree(privvol);
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
|
@ -1417,7 +1417,7 @@ int parallelsStorageVolDefRemove(virStoragePoolObjPtr privpool,
|
|||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
cleanup:
|
||||
VIR_FREE(xml_path);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1462,7 +1462,7 @@ parallelsStorageVolDelete(virStorageVolPtr vol, unsigned int flags)
|
|||
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -1478,7 +1478,7 @@ parallelsStorageVolTypeForPool(int pooltype)
|
|||
case VIR_STORAGE_POOL_FS:
|
||||
case VIR_STORAGE_POOL_NETFS:
|
||||
return VIR_STORAGE_VOL_FILE;
|
||||
default:
|
||||
default:
|
||||
return VIR_STORAGE_VOL_BLOCK;
|
||||
}
|
||||
}
|
||||
|
@ -1520,7 +1520,7 @@ parallelsStorageVolGetInfo(virStorageVolPtr vol, virStorageVolInfoPtr info)
|
|||
info->allocation = privvol->allocation;
|
||||
ret = 0;
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -1561,7 +1561,7 @@ parallelsStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
|
|||
|
||||
ret = virStorageVolDefFormat(privpool->def, privvol);
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
@ -1600,7 +1600,7 @@ parallelsStorageVolGetPath(virStorageVolPtr vol)
|
|||
|
||||
ignore_value(VIR_STRDUP(ret, privvol->target.path));
|
||||
|
||||
cleanup:
|
||||
cleanup:
|
||||
if (privpool)
|
||||
virStoragePoolObjUnlock(privpool);
|
||||
return ret;
|
||||
|
|
Loading…
Reference in New Issue