openvz: Cleanup indention

Some of the indents were only 2 spaces, make consistent w/ 4 spaces.
Also some indents didn't align properly. Fix them all up.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.vnet.ibm.com>
This commit is contained in:
John Ferlan 2017-10-23 12:04:43 -04:00
parent a1745174e9
commit 5bb07527c1

View File

@ -222,10 +222,10 @@ static int openvzSetInitialConfig(virDomainDefPtr vmdef)
ret = 0; ret = 0;
cleanup: cleanup:
VIR_FREE(confdir); VIR_FREE(confdir);
virCommandFree(cmd); virCommandFree(cmd);
return ret; return ret;
} }
@ -267,9 +267,9 @@ openvzSetDiskQuota(virDomainDefPtr vmdef,
ret = 0; ret = 0;
cleanup: cleanup:
virCommandFree(cmd); virCommandFree(cmd);
return ret; return ret;
} }
@ -633,40 +633,40 @@ static int openvzDomainSuspend(virDomainPtr dom)
static int openvzDomainResume(virDomainPtr dom) static int openvzDomainResume(virDomainPtr dom)
{ {
struct openvz_driver *driver = dom->conn->privateData; struct openvz_driver *driver = dom->conn->privateData;
virDomainObjPtr vm; virDomainObjPtr vm;
const char *prog[] = {VZCTL, "--quiet", "chkpnt", PROGRAM_SENTINEL, "--resume", NULL}; const char *prog[] = {VZCTL, "--quiet", "chkpnt", PROGRAM_SENTINEL, "--resume", NULL};
int ret = -1; int ret = -1;
openvzDriverLock(driver); openvzDriverLock(driver);
vm = virDomainObjListFindByUUID(driver->domains, dom->uuid); vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
openvzDriverUnlock(driver); openvzDriverUnlock(driver);
if (!vm) { if (!vm) {
virReportError(VIR_ERR_NO_DOMAIN, "%s", virReportError(VIR_ERR_NO_DOMAIN, "%s",
_("no domain with matching uuid")); _("no domain with matching uuid"));
goto cleanup; goto cleanup;
} }
if (!virDomainObjIsActive(vm)) { if (!virDomainObjIsActive(vm)) {
virReportError(VIR_ERR_OPERATION_INVALID, "%s", virReportError(VIR_ERR_OPERATION_INVALID, "%s",
_("Domain is not running")); _("Domain is not running"));
goto cleanup; goto cleanup;
} }
if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED) { if (virDomainObjGetState(vm, NULL) == VIR_DOMAIN_PAUSED) {
openvzSetProgramSentinal(prog, vm->def->name); openvzSetProgramSentinal(prog, vm->def->name);
if (virRun(prog, NULL) < 0) if (virRun(prog, NULL) < 0)
goto cleanup; goto cleanup;
virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_UNPAUSED); virDomainObjSetState(vm, VIR_DOMAIN_RUNNING, VIR_DOMAIN_RUNNING_UNPAUSED);
} }
ret = 0; ret = 0;
cleanup: cleanup:
if (vm) if (vm)
virObjectUnlock(vm); virObjectUnlock(vm);
return ret; return ret;
} }
static int static int
@ -833,7 +833,8 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
char *guest_ifname = NULL; char *guest_ifname = NULL;
if (net == NULL) if (net == NULL)
return 0; return 0;
if (vpsid == NULL) { if (vpsid == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Container ID is not specified")); _("Container ID is not specified"));
@ -864,9 +865,9 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
} else { } else {
guest_ifname = openvzGenerateContainerVethName(veid); guest_ifname = openvzGenerateContainerVethName(veid);
if (guest_ifname == NULL) { if (guest_ifname == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not generate eth name for container")); _("Could not generate eth name for container"));
goto cleanup; goto cleanup;
} }
} }
@ -875,9 +876,9 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
if (net->ifname == NULL) { if (net->ifname == NULL) {
net->ifname = openvzGenerateVethName(veid, guest_ifname); net->ifname = openvzGenerateVethName(veid, guest_ifname);
if (net->ifname == NULL) { if (net->ifname == NULL) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not generate veth name")); _("Could not generate veth name"));
goto cleanup; goto cleanup;
} }
} }
@ -902,7 +903,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
virCommandAddArg(cmd, "--netif_add"); virCommandAddArg(cmd, "--netif_add");
virCommandAddArgBuffer(cmd, &buf); virCommandAddArgBuffer(cmd, &buf);
} else if (net->type == VIR_DOMAIN_NET_TYPE_ETHERNET && } else if (net->type == VIR_DOMAIN_NET_TYPE_ETHERNET &&
net->guestIP.nips > 0) { net->guestIP.nips > 0) {
size_t i; size_t i;
/* --ipadd ip */ /* --ipadd ip */
@ -1035,7 +1036,7 @@ openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
driver->xmlopt) < 0) { driver->xmlopt) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not set number of vCPUs")); _("Could not set number of vCPUs"));
goto cleanup; goto cleanup;
} }
} }
@ -1043,7 +1044,7 @@ openvzDomainDefineXMLFlags(virConnectPtr conn, const char *xml, unsigned int fla
if (openvzDomainSetMemoryInternal(vm, vm->def->mem.cur_balloon) < 0) { if (openvzDomainSetMemoryInternal(vm, vm->def->mem.cur_balloon) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s", virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
_("Could not set memory size")); _("Could not set memory size"));
goto cleanup; goto cleanup;
} }
} }
@ -2068,7 +2069,7 @@ openvzUpdateDevice(virDomainDefPtr vmdef,
static int static int
openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml, openvzDomainUpdateDeviceFlags(virDomainPtr dom, const char *xml,
unsigned int flags) unsigned int flags)
{ {
int ret = -1; int ret = -1;
int veid; int veid;