vz_driver: Reformat

Honour our formatting style. Adjust indentation so it matches the
rest of our code.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Michal Privoznik 2015-06-25 09:56:56 +02:00
parent 70d75ffc79
commit ed025db700

View File

@ -190,8 +190,8 @@ vzConnectGetCapabilities(virConnectPtr conn)
static int static int
vzDomainDefPostParse(virDomainDefPtr def, vzDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps ATTRIBUTE_UNUSED, virCapsPtr caps ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED) void *opaque ATTRIBUTE_UNUSED)
{ {
/* memory hotplug tunables are not supported by this driver */ /* memory hotplug tunables are not supported by this driver */
if (virDomainDefCheckUnsupportedMemoryHotplug(def) < 0) if (virDomainDefCheckUnsupportedMemoryHotplug(def) < 0)
@ -202,9 +202,9 @@ vzDomainDefPostParse(virDomainDefPtr def,
static int static int
vzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, vzDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
const virDomainDef *def, const virDomainDef *def,
virCapsPtr caps ATTRIBUTE_UNUSED, virCapsPtr caps ATTRIBUTE_UNUSED,
void *opaque ATTRIBUTE_UNUSED) void *opaque ATTRIBUTE_UNUSED)
{ {
int ret = -1; int ret = -1;
@ -256,7 +256,7 @@ vzOpenDefault(virConnectPtr conn)
goto error; goto error;
if (!(privconn->xmlopt = virDomainXMLOptionNew(&vzDomainDefParserConfig, if (!(privconn->xmlopt = virDomainXMLOptionNew(&vzDomainDefParserConfig,
NULL, NULL))) NULL, NULL)))
goto error; goto error;
if (!(privconn->domains = virDomainObjListNew())) if (!(privconn->domains = virDomainObjListNew()))
@ -289,8 +289,8 @@ vzOpenDefault(virConnectPtr conn)
static virDrvOpenStatus static virDrvOpenStatus
vzConnectOpen(virConnectPtr conn, vzConnectOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
unsigned int flags) unsigned int flags)
{ {
int ret; int ret;
@ -474,8 +474,8 @@ vzConnectNumOfDefinedDomains(virConnectPtr conn)
static int static int
vzConnectListAllDomains(virConnectPtr conn, vzConnectListAllDomains(virConnectPtr conn,
virDomainPtr **domains, virDomainPtr **domains,
unsigned int flags) unsigned int flags)
{ {
vzConnPtr privconn = conn->privateData; vzConnPtr privconn = conn->privateData;
int ret = -1; int ret = -1;
@ -629,7 +629,7 @@ vzDomainIsPersistent(virDomainPtr domain)
static int static int
vzDomainGetState(virDomainPtr domain, vzDomainGetState(virDomainPtr domain,
int *state, int *reason, unsigned int flags) int *state, int *reason, unsigned int flags)
{ {
virDomainObjPtr privdom; virDomainObjPtr privdom;
int ret = -1; int ret = -1;
@ -779,7 +779,7 @@ vzDomainDefineXML(virConnectPtr conn, const char *xml)
static int static int
vzNodeGetInfo(virConnectPtr conn ATTRIBUTE_UNUSED, vzNodeGetInfo(virConnectPtr conn ATTRIBUTE_UNUSED,
virNodeInfoPtr nodeinfo) virNodeInfoPtr nodeinfo)
{ {
return nodeGetInfo(nodeinfo); return nodeGetInfo(nodeinfo);
} }
@ -804,9 +804,9 @@ static int vzConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
static char * static char *
vzConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED, vzConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED,
const char **xmlCPUs, const char **xmlCPUs,
unsigned int ncpus, unsigned int ncpus,
unsigned int flags) unsigned int flags)
{ {
virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, NULL); virCheckFlags(VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES, NULL);
@ -816,10 +816,10 @@ vzConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED,
static int static int
vzDomainGetVcpus(virDomainPtr domain, vzDomainGetVcpus(virDomainPtr domain,
virVcpuInfoPtr info, virVcpuInfoPtr info,
int maxinfo, int maxinfo,
unsigned char *cpumaps, unsigned char *cpumaps,
int maplen) int maplen)
{ {
virDomainObjPtr privdom = NULL; virDomainObjPtr privdom = NULL;
size_t i; size_t i;
@ -878,20 +878,20 @@ vzDomainGetVcpus(virDomainPtr domain,
static int static int
vzNodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED, vzNodeGetCPUMap(virConnectPtr conn ATTRIBUTE_UNUSED,
unsigned char **cpumap, unsigned char **cpumap,
unsigned int *online, unsigned int *online,
unsigned int flags) unsigned int flags)
{ {
return nodeGetCPUMap(cpumap, online, flags); return nodeGetCPUMap(cpumap, online, flags);
} }
static int static int
vzConnectDomainEventRegisterAny(virConnectPtr conn, vzConnectDomainEventRegisterAny(virConnectPtr conn,
virDomainPtr domain, virDomainPtr domain,
int eventID, int eventID,
virConnectDomainEventGenericCallback callback, virConnectDomainEventGenericCallback callback,
void *opaque, void *opaque,
virFreeCallback freecb) virFreeCallback freecb)
{ {
int ret = -1; int ret = -1;
vzConnPtr privconn = conn->privateData; vzConnPtr privconn = conn->privateData;
@ -905,7 +905,7 @@ vzConnectDomainEventRegisterAny(virConnectPtr conn,
static int static int
vzConnectDomainEventDeregisterAny(virConnectPtr conn, vzConnectDomainEventDeregisterAny(virConnectPtr conn,
int callbackID) int callbackID)
{ {
vzConnPtr privconn = conn->privateData; vzConnPtr privconn = conn->privateData;
int ret = -1; int ret = -1;
@ -971,7 +971,7 @@ vzDomainCreateWithFlags(virDomainPtr domain, unsigned int flags)
static int static int
vzDomainUndefineFlags(virDomainPtr domain, vzDomainUndefineFlags(virDomainPtr domain,
unsigned int flags) unsigned int flags)
{ {
vzConnPtr privconn = domain->conn->privateData; vzConnPtr privconn = domain->conn->privateData;
virDomainObjPtr dom = NULL; virDomainObjPtr dom = NULL;
@ -984,7 +984,7 @@ vzDomainUndefineFlags(virDomainPtr domain,
ret = prlsdkUnregisterDomain(privconn, dom); ret = prlsdkUnregisterDomain(privconn, dom);
if (ret) if (ret)
virObjectUnlock(dom); virObjectUnlock(dom);
return ret; return ret;
} }
@ -1069,7 +1069,7 @@ vzDomainManagedSaveRemove(virDomainPtr domain, unsigned int flags)
} }
static int vzDomainAttachDeviceFlags(virDomainPtr dom, const char *xml, static int vzDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags) unsigned int flags)
{ {
int ret = -1; int ret = -1;
vzConnPtr privconn = dom->conn->privateData; vzConnPtr privconn = dom->conn->privateData;
@ -1141,11 +1141,11 @@ static int vzDomainAttachDeviceFlags(virDomainPtr dom, const char *xml,
static int vzDomainAttachDevice(virDomainPtr dom, const char *xml) static int vzDomainAttachDevice(virDomainPtr dom, const char *xml)
{ {
return vzDomainAttachDeviceFlags(dom, xml, return vzDomainAttachDeviceFlags(dom, xml,
VIR_DOMAIN_AFFECT_CONFIG | VIR_DOMAIN_AFFECT_LIVE); VIR_DOMAIN_AFFECT_CONFIG | VIR_DOMAIN_AFFECT_LIVE);
} }
static int vzDomainDetachDeviceFlags(virDomainPtr dom, const char *xml, static int vzDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags) unsigned int flags)
{ {
int ret = -1; int ret = -1;
vzConnPtr privconn = dom->conn->privateData; vzConnPtr privconn = dom->conn->privateData;
@ -1218,7 +1218,7 @@ static int vzDomainDetachDeviceFlags(virDomainPtr dom, const char *xml,
static int vzDomainDetachDevice(virDomainPtr dom, const char *xml) static int vzDomainDetachDevice(virDomainPtr dom, const char *xml)
{ {
return vzDomainDetachDeviceFlags(dom, xml, return vzDomainDetachDeviceFlags(dom, xml,
VIR_DOMAIN_AFFECT_CONFIG | VIR_DOMAIN_AFFECT_LIVE); VIR_DOMAIN_AFFECT_CONFIG | VIR_DOMAIN_AFFECT_LIVE);
} }
static unsigned long long static unsigned long long
@ -1237,7 +1237,7 @@ vzDomainGetMaxMemory(virDomainPtr domain)
static int static int
vzDomainBlockStats(virDomainPtr domain, const char *path, vzDomainBlockStats(virDomainPtr domain, const char *path,
virDomainBlockStatsPtr stats) virDomainBlockStatsPtr stats)
{ {
virDomainObjPtr dom = NULL; virDomainObjPtr dom = NULL;
int ret = -1; int ret = -1;
@ -1257,7 +1257,7 @@ vzDomainBlockStats(virDomainPtr domain, const char *path,
} else { } else {
virDomainBlockStatsStruct s; virDomainBlockStatsStruct s;
#define PARALLELS_ZERO_STATS(VAR, TYPE, NAME) \ #define PARALLELS_ZERO_STATS(VAR, TYPE, NAME) \
stats->VAR = 0; stats->VAR = 0;
PARALLELS_BLOCK_STATS_FOREACH(PARALLELS_ZERO_STATS) PARALLELS_BLOCK_STATS_FOREACH(PARALLELS_ZERO_STATS)
@ -1269,10 +1269,10 @@ vzDomainBlockStats(virDomainPtr domain, const char *path,
goto cleanup; goto cleanup;
#define PARALLELS_SUM_STATS(VAR, TYPE, NAME) \ #define PARALLELS_SUM_STATS(VAR, TYPE, NAME) \
if (s.VAR != -1) \ if (s.VAR != -1) \
stats->VAR += s.VAR; stats->VAR += s.VAR;
PARALLELS_BLOCK_STATS_FOREACH(PARALLELS_SUM_STATS) PARALLELS_BLOCK_STATS_FOREACH(PARALLELS_SUM_STATS)
#undef PARALLELS_SUM_STATS #undef PARALLELS_SUM_STATS
} }
@ -1289,10 +1289,10 @@ vzDomainBlockStats(virDomainPtr domain, const char *path,
static int static int
vzDomainBlockStatsFlags(virDomainPtr domain, vzDomainBlockStatsFlags(virDomainPtr domain,
const char *path, const char *path,
virTypedParameterPtr params, virTypedParameterPtr params,
int *nparams, int *nparams,
unsigned int flags) unsigned int flags)
{ {
virDomainBlockStatsStruct stats; virDomainBlockStatsStruct stats;
int ret = -1; int ret = -1;