ret = 0;
-cleanup:
+ cleanup:
virConsoleFree(con);
/* Restore original signal handlers */
sigaction(SIGHUP, &old_sighup, NULL);
sigaction(SIGPIPE, &old_sigpipe, NULL);
-resettty:
+ resettty:
/* Put STDIN back into the (sane?) state we found
it in before starting */
vshTTYRestore(ctl);
if (!desc)
desc = vshStrdup(ctl, "");
-cleanup:
+ cleanup:
VIR_FREE(domxml);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(doc);
}
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(disks);
virDomainFree(dom);
VIR_FREE(xml);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(interfaces);
virDomainFree(dom);
VIR_FREE(xml);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(desc);
VIR_FREE(state);
VIR_FREE(interfaces);
vshDomainControlStateToString(info.state));
}
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(params);
virDomainFree(dom);
return ret;
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(disks);
virDomainFree(dom);
return ret;
vshDomainStateToString(state));
}
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.9.12 and older) */
vshResetLibvirtError();
/* truncate domains that weren't found */
deleted = (nids + nnames) - list->ndomains;
-filter:
+ filter:
/* filter list the list if the list was acquired by fallback means */
for (i = 0; i < list->ndomains; i++) {
dom = list->domains[i];
/* the domain matched all filters, it may stay */
continue;
-remove_entry:
+ remove_entry:
/* the domain has to be removed as it failed one of the filters */
virDomainFree(list->domains[i]);
list->domains[i] = NULL;
deleted++;
}
-finished:
+ finished:
/* sort the list */
if (list->domains && list->ndomains)
qsort(list->domains, list->ndomains, sizeof(*list->domains),
success = true;
-cleanup:
+ cleanup:
for (i = 0; nnames != -1 && i < nnames; i++)
VIR_FREE(names[i]);
}
ret = true;
-cleanup:
+ cleanup:
vshDomainListFree(list);
return ret;
}
vshPrint(ctl, "%s", _("Device attached successfully\n"));
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
functionReturn = true;
}
-cleanup:
+ cleanup:
virDomainFree(dom);
virBufferFreeAndReset(&buf);
return functionReturn;
ret = true;
-cleanup:
+ cleanup:
virTypedParamsFree(params, nparams);
if (dom)
virDomainFree(dom);
return ret;
-save_error:
+ save_error:
vshSaveLibvirtError();
-error:
+ error:
vshError(ctl, "%s", _("Unable to change block I/O throttle"));
goto cleanup;
-interror:
+ interror:
vshError(ctl, "%s", _("Unable to parse integer parameter"));
goto cleanup;
}
ret = true;
-cleanup:
+ cleanup:
virTypedParamsFree(params, nparams);
virDomainFree(dom);
return ret;
-save_error:
+ save_error:
vshSaveLibvirtError();
-error:
+ error:
vshError(ctl, "%s", _("Unable to change blkio parameters"));
goto cleanup;
}
ret = virDomainBlockRebase(dom, path, base, bandwidth, flags);
}
-cleanup:
+ cleanup:
if (pdom && ret == 0)
*pdom = dom;
else if (dom)
vshPrint(ctl, "\n%s", quit ? _("Commit aborted") : _("Commit complete"));
ret = true;
-cleanup:
+ cleanup:
if (dom)
virDomainFree(dom);
if (blocking)
_("Now in mirroring phase"));
ret = true;
-cleanup:
+ cleanup:
if (dom)
virDomainFree(dom);
if (blocking)
vshPrint(ctl, "\n%s", quit ? _("Pull aborted") : _("Pull complete"));
ret = true;
-cleanup:
+ cleanup:
if (dom)
virDomainFree(dom);
if (blocking)
ret = cmdRunConsole(ctl, dom, name, flags);
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
vshError(ctl, _("interface (%s: %s) not found"), element, iface);
goto cleanup;
-hit:
+ hit:
/* find and modify/add link state node */
/* try to find <link> element */
cur = obj->nodesetval->nodeTab[i]->children;
ret = true;
}
-cleanup:
+ cleanup:
xmlXPathFreeObject(obj);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
ret = true;
-cleanup:
+ cleanup:
virTypedParamsFree(params, nparams);
virDomainFree(dom);
return ret;
-save_error:
+ save_error:
vshSaveLibvirtError();
-error:
+ error:
vshError(ctl, "%s", _("Unable to set interface parameters"));
goto cleanup;
}
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
rc = virDomainUndefine(dom);
-out:
+ out:
if (rc == 0) {
vshPrint(ctl, _("Domain %s has been undefined\n"), name);
ret = true;
}
}
-cleanup:
+ cleanup:
VIR_FREE(source);
VIR_FREE(target);
VIR_FREE(pool);
virDomainFree(dom);
return ret;
-error:
+ error:
vshReportError(ctl);
goto cleanup;
}
*nfdsret = nfds;
return 0;
-error:
+ error:
virStringFreeList(fdlist);
VIR_FREE(fds);
return -1;
goto cleanup;
}
-started:
+ started:
vshPrint(ctl, _("Domain %s started\n"),
virDomainGetName(dom));
#ifndef WIN32
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
VIR_FREE(fds);
return ret;
ret = '0';
-out:
+ out:
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
-out_sig:
+ out_sig:
if (dom) virDomainFree(dom);
VIR_FREE(xml);
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
functionReturn = true;
-cleanup:
+ cleanup:
sigaction(SIGINT, &old_sig_action, NULL);
vshTTYRestore(ctl);
return functionReturn;
if (ret)
vshPrint(ctl, _("\nDomain %s saved to %s\n"), name, to);
-cleanup:
+ cleanup:
if (dom)
virDomainFree(dom);
return ret;
vshPrint(ctl, "%s", xml);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
vshPrint(ctl, _("State file %s updated.\n"), file);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
vshPrint(ctl, _("State file %s edited.\n"), file);
ret = true;
-cleanup:
+ cleanup:
return ret;
}
}
ret = '0';
-out:
+ out:
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
-out_sig:
+ out_sig:
if (dom)
virDomainFree(dom);
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
if (ret)
vshPrint(ctl, _("\nDomain %s state saved by libvirt\n"), name);
-cleanup:
+ cleanup:
virDomainFree(dom);
VIR_FORCE_CLOSE(p[0]);
VIR_FORCE_CLOSE(p[1]);
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
*update_params = params;
params = NULL;
-cleanup:
+ cleanup:
VIR_FREE(set_field);
virTypedParamsFree(params, nparams);
return ret;
vshPrint(ctl, _("Domain restored from %s\n"), from);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(xml);
return ret;
}
}
ret = '0';
-out:
+ out:
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
-out_sig:
+ out_sig:
if (dom)
virDomainFree(dom);
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
if (ret)
vshPrint(ctl, _("\nDomain %s dumped to %s\n"), name, to);
-cleanup:
+ cleanup:
virDomainFree(dom);
VIR_FORCE_CLOSE(p[0]);
VIR_FORCE_CLOSE(p[1]);
vshPrint(ctl, _("Screenshot saved to %s, with type of %s"), file, mime);
ret = true;
-cleanup:
+ cleanup:
if (!ret && created)
unlink(file);
if (generated)
}
ret = true;
-cleanup:
+ cleanup:
if (dom)
virDomainFree(dom);
virStringFreeList(modes);
}
ret = true;
-cleanup:
+ cleanup:
if (dom)
virDomainFree(dom);
virStringFreeList(modes);
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
virTypedParamsFree(params, nparams);
return ret;
-save_error:
+ save_error:
vshSaveLibvirtError();
goto cleanup;
}
}
ret = count;
-cleanup:
+ cleanup:
VIR_FREE(def);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
return cpumap;
-error:
+ error:
vshError(ctl, "%s", _("cpulist: Invalid format."));
-cleanup:
+ cleanup:
VIR_FREE(cpumap);
return NULL;
}
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(cpumap);
virDomainFree(dom);
return ret;
goto cleanup;
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(cpumap);
virDomainFree(dom);
return ret;
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(buffer);
VIR_FREE(snippet);
xmlXPathFreeContext(ctxt);
ret = true;
}
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
VIR_FREE(result);
return ret;
-no_memory:
+ no_memory:
vshError(ctl, "%s", _("Out of memory"));
ret = false;
goto cleanup;
goto cleanup;
}
-do_show_total:
+ do_show_total:
/* get supported num of parameter for total statistics */
if ((nparams = virDomainGetCPUStats(dom, NULL, 0, -1, 1, flags)) < 0)
goto failed_stats;
ret = true;
-cleanup:
+ cleanup:
virTypedParamsFree(params, nparams);
virDomainFree(dom);
return ret;
-failed_stats:
+ failed_stats:
vshError(ctl, _("Failed to retrieve CPU statistics for domain '%s'"),
virDomainGetName(dom));
goto cleanup;
virDomainFree(dom);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(buffer);
VIR_FREE(fds);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(desc_edited);
VIR_FREE(desc);
if (tmp) {
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
if (!(virDomainSendKey(dom, codeset, holdtime, keycodes, count, 0) < 0))
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
goto cleanup;
signum = -1;
-cleanup:
+ cleanup:
VIR_FREE(tmp);
return signum;
}
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
virTypedParamsFree(params, nparams);
virDomainFree(dom);
return ret;
-save_error:
+ save_error:
vshSaveLibvirtError();
-error:
+ error:
vshError(ctl, "%s", _("Unable to change memory parameters"));
goto cleanup;
}
ret = true;
-cleanup:
+ cleanup:
virTypedParamsFree(params, nparams);
virDomainFree(dom);
return ret;
-save_error:
+ save_error:
vshSaveLibvirtError();
-error:
+ error:
vshError(ctl, "%s", _("Unable to change numa parameters"));
goto cleanup;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(result);
VIR_FREE(monitor_cmd);
virJSONValueFree(pretty);
if (data.count)
ret = true;
-cleanup:
+ cleanup:
vshEventCleanup(ctl);
if (eventId >= 0 &&
virConnectDomainQemuMonitorEventDeregister(ctl->conn, eventId) < 0)
vshError(ctl, _("Failed to attach to pid %u"), pid_value);
}
-cleanup:
+ cleanup:
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(result);
VIR_FREE(guest_agent_cmd);
if (dom)
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(seclabel);
VIR_FREE(secmodel);
if (dom)
virConnectClose(dconn);
}
-out:
+ out:
pthread_sigmask(SIG_SETMASK, &oldsigmask, NULL);
-out_sig:
+ out_sig:
virTypedParamsFree(params, nparams);
if (dom)
virDomainFree(dom);
ignore_value(safewrite(data->writefd, &ret, sizeof(ret)));
return;
-save_error:
+ save_error:
vshSaveLibvirtError();
goto out;
}
virThreadJoin(&workerThread);
-cleanup:
+ cleanup:
virDomainFree(dom);
VIR_FORCE_CLOSE(p[0]);
VIR_FORCE_CLOSE(p[1]);
ret = true;
-done:
+ done:
virDomainFree(dom);
return ret;
}
vshPrint(ctl, _("Compression cache: %.3lf %s"), value, unit);
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
ret = true;
-done:
+ done:
virDomainFree(dom);
return ret;
}
ret = true;
-done:
+ done:
virDomainFree(dom);
return ret;
}
break;
}
-cleanup:
+ cleanup:
VIR_FREE(doc);
VIR_FREE(xpath);
VIR_FREE(passwd);
vshPrint(ctl, "%s\n", hostname);
ret = true;
-error:
+ error:
VIR_FREE(hostname);
virDomainFree(dom);
return ret;
ret = true;
-cleanup:
+ cleanup:
virBitmapFree(bitmap);
return ret;
}
vshPrint(ctl, "%s", _("Device detached successfully\n"));
funcRet = true;
-cleanup:
+ cleanup:
VIR_FREE(buffer);
virDomainFree(dom);
return funcRet;
vshPrint(ctl, "%s", _("Device updated successfully\n"));
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(buffer);
virDomainFree(dom);
return ret;
goto cleanup;
}
-hit:
+ hit:
if (!(detach_xml = virXMLNodeToString(xml, matchNode))) {
vshSaveLibvirtError();
goto cleanup;
functionReturn = true;
}
-cleanup:
+ cleanup:
VIR_FREE(doc);
VIR_FREE(detach_xml);
virDomainFree(dom);
vshError(NULL, _("No disk found whose source path or target is %s"), path);
-cleanup:
+ cleanup:
xmlXPathFreeObject(obj);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
goto cleanup;
}
-cleanup:
+ cleanup:
VIR_FREE(device_type);
VIR_FREE(disk_type);
return ret;
if (count)
ret = true;
-cleanup:
+ cleanup:
vshEventCleanup(ctl);
if (data) {
for (i = 0; i < (all ? VIR_DOMAIN_EVENT_ID_LAST : 1); i++) {
vshPrint(ctl, _("succeeded to complete action %s on media\n"), action);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(doc);
xmlFreeNode(disk_node);
VIR_FREE(disk_xml);
ret = true;
-cleanup:
+ cleanup:
virDomainFree(dom);
return ret;
}
if (!tmp)
goto edit_cleanup;
-reedit:
+ reedit:
/* Start the editor. */
if (vshEditFile(ctl, tmp) == -1)
goto edit_cleanup;
EDIT_NOT_CHANGED;
}
-redefine:
+ redefine:
msg = NULL;
/* Now re-read the object XML. Did someone else change it while
edit_success = true;
-edit_cleanup:
+ edit_cleanup:
VIR_FREE(doc);
VIR_FREE(doc_edited);
VIR_FREE(doc_reread);
ret = true;
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
VIR_FREE(nodes);
ret = true;
- cleanup:
+ cleanup:
VIR_FREE(cpumap);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(params);
return ret;
}
ret = true;
- cleanup:
+ cleanup:
VIR_FREE(params);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
virTypedParamsFree(params, nparams);
return ret;
-save_error:
+ save_error:
vshSaveLibvirtError();
-error:
+ error:
vshError(ctl, "%s", _("Unable to change memory parameters"));
goto cleanup;
}
ret = true;
-cleanup:
+ cleanup:
if (iface)
virInterfaceFree(iface);
if (iface_edited)
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* truncate interfaces that weren't found */
deleted = nAllIfaces - list->nifaces;
-finished:
+ finished:
/* sort the list */
if (list->ifaces && list->nifaces)
qsort(list->ifaces, list->nifaces,
success = true;
-cleanup:
+ cleanup:
for (i = 0; nActiveIfaces != -1 && i < nActiveIfaces; i++)
VIR_FREE(activeNames[i]);
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* truncate networks that weren't found */
deleted = nAllNets - list->nnets;
-filter:
+ filter:
/* filter list the list if the list was acquired by fallback means */
for (i = 0; i < list->nnets; i++) {
net = list->nets[i];
/* the pool matched all filters, it may stay */
continue;
-remove_entry:
+ remove_entry:
/* the pool has to be removed as it failed one of the filters */
virNetworkFree(list->nets[i]);
list->nets[i] = NULL;
deleted++;
}
-finished:
+ finished:
/* sort the list */
if (list->nets && list->nnets)
qsort(list->nets, list->nnets,
success = true;
-cleanup:
+ cleanup:
for (i = 0; i < nAllNets; i++)
VIR_FREE(names[i]);
VIR_FREE(names);
vshPrint(ctl, _("Updated network %s %s"),
virNetworkGetName(network), affected);
ret = true;
-cleanup:
+ cleanup:
vshReportError(ctl);
virNetworkFree(network);
VIR_FREE(xmlFromFile);
if (data.count)
ret = true;
-cleanup:
+ cleanup:
vshEventCleanup(ctl);
if (eventId >= 0 &&
virConnectNetworkEventDeregisterAny(ctl->conn, eventId) < 0)
}
ret = true;
-cleanup:
+ cleanup:
virStringFreeList(arr);
virNodeDeviceFree(dev);
return ret;
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* the device matched all filters, it may stay */
continue;
-remove_entry:
+ remove_entry:
/* the device has to be removed as it failed one of the filters */
virNodeDeviceFree(list->devices[i]);
list->devices[i] = NULL;
deleted++;
}
-finished:
+ finished:
/* sort the list */
if (list->devices && list->ndevices)
qsort(list->devices, list->ndevices,
success = true;
-cleanup:
+ cleanup:
for (i = 0; ndevices != -1 && i < ndevices; i++)
VIR_FREE(names[i]);
VIR_FREE(names);
vshPrint(ctl, "%s\n", virNodeDeviceGetName(list->devices[i]));
}
-cleanup:
+ cleanup:
virStringFreeList(caps);
vshNodeDeviceListFree(list);
return ret;
vshPrint(ctl, "%s\n", xml);
ret = true;
-cleanup:
+ cleanup:
virStringFreeList(arr);
VIR_FREE(xml);
virNodeDeviceFree(device);
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.9.13 and older) */
vshResetLibvirtError();
/* truncate network filters that weren't found */
deleted = nfilters - list->nfilters;
-finished:
+ finished:
/* sort the list */
if (list->filters && list->nfilters)
qsort(list->filters, list->nfilters,
success = true;
-cleanup:
+ cleanup:
for (i = 0; nfilters != -1 && i < nfilters; i++)
VIR_FREE(names[i]);
VIR_FREE(names);
ret = true;
-cleanup:
+ cleanup:
if (nwfilter)
virNWFilterFree(nwfilter);
if (nwfilter_edited)
*retname = name;
return true;
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
return false;
}
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* truncate pools that weren't found */
deleted = nAllPools - list->npools;
-filter:
+ filter:
/* filter list the list if the list was acquired by fallback means */
for (i = 0; i < list->npools; i++) {
pool = list->pools[i];
/* the pool matched all filters, it may stay */
continue;
-remove_entry:
+ remove_entry:
/* the pool has to be removed as it failed one of the filters */
virStoragePoolFree(list->pools[i]);
list->pools[i] = NULL;
deleted++;
}
-finished:
+ finished:
/* sort the list */
if (list->pools && list->npools)
qsort(list->pools, list->npools,
success = true;
-cleanup:
+ cleanup:
for (i = 0; i < nAllPools; i++)
VIR_FREE(names[i]);
/* Cleanup and return */
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(outputStr);
if (list && list->npools) {
for (i = 0; i < list->npools; i++) {
vshPrint(ctl, _("Secret %s created\n"), uuid);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(buffer);
if (res)
virSecretFree(res);
VIR_FREE(xml);
ret = true;
-cleanup:
+ cleanup:
virSecretFree(secret);
return ret;
}
vshPrint(ctl, "%s", _("Secret value set\n"));
ret = true;
-cleanup:
+ cleanup:
virSecretFree(secret);
return ret;
}
VIR_FREE(base64);
ret = true;
-cleanup:
+ cleanup:
virSecretFree(secret);
return ret;
}
vshPrint(ctl, _("Secret %s deleted\n"), uuid);
ret = true;
-cleanup:
+ cleanup:
virSecretFree(secret);
return ret;
}
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* truncate secrets that weren't found */
deleted = nsecrets - list->nsecrets;
-finished:
+ finished:
/* sort the list */
if (list->secrets && list->nsecrets)
qsort(list->secrets, list->nsecrets,
success = true;
-cleanup:
+ cleanup:
if (nsecrets > 0) {
for (i = 0; i < nsecrets; i++)
VIR_FREE(uuids[i]);
ret = true;
-cleanup:
+ cleanup:
vshSecretListFree(list);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
if (snapshot)
ret = vshSnapshotCreate(ctl, dom, buffer, flags, from);
-cleanup:
+ cleanup:
VIR_FREE(buffer);
if (dom)
virDomainFree(dom);
virBufferEscapeString(buf, " file='%s'", file);
virBufferAddLit(buf, "/>\n");
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0)
vshError(ctl, _("unable to parse memspec: %s"), str);
virStringFreeList(array);
virBufferAddLit(buf, "/>\n");
}
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0)
vshError(ctl, _("unable to parse diskspec: %s"), str);
virStringFreeList(array);
ret = vshSnapshotCreate(ctl, dom, buffer, flags, NULL);
-cleanup:
+ cleanup:
virBufferFreeAndReset(&buf);
VIR_FREE(buffer);
virDomainFree(dom);
ret = true;
-cleanup:
+ cleanup:
if (!ret && name)
vshError(ctl, _("Failed to update %s"), name);
if (edited)
ret = true;
-cleanup:
+ cleanup:
if (!ret)
vshReportError(ctl);
VIR_FREE(xml);
*parent_name = virXPathString("string(/domainsnapshot/parent/name)", ctxt);
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0) {
vshReportError(ctl);
vshError(ctl, "%s", _("unable to determine if snapshot has parent"));
ret = !!(flags & VIR_DOMAIN_SNAPSHOT_LIST_ACTIVE);
}
-cleanup:
+ cleanup:
VIR_FREE(state);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xmldoc);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(state);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xmldoc);
}
}
-success:
+ success:
if (filter_fallback) {
/* Older API didn't filter on status or location, but the
* information is available in domain XML. */
ret = snaplist;
snaplist = NULL;
-cleanup:
+ cleanup:
vshSnapshotListFree(snaplist);
if (names && count > 0)
for (i = 0; i < count; i++)
ret = true;
-cleanup:
+ cleanup:
/* this frees up memory from the last iteration of the loop */
vshSnapshotListFree(snaplist);
VIR_FREE(parent_snap);
vshPrint(ctl, "%s", xml);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(xml);
if (snapshot)
virDomainSnapshotFree(snapshot);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(parent);
if (snapshot)
virDomainSnapshotFree(snapshot);
ret = true;
-cleanup:
+ cleanup:
if (snapshot)
virDomainSnapshotFree(snapshot);
if (dom)
ret = true;
-cleanup:
+ cleanup:
if (snapshot)
virDomainSnapshotFree(snapshot);
if (dom)
vshError(ctl, _("Failed to create vol from %s"), from);
}
-cleanup:
+ cleanup:
VIR_FREE(buffer);
virStoragePoolFree(pool);
return ret;
}
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(buffer);
if (pool)
virStoragePoolFree(pool);
xmlNodeSetContent(obj->nodesetval->nodeTab[0], (const xmlChar *)newname);
xmlDocDumpMemory(doc, &newxml, &size);
-cleanup:
+ cleanup:
xmlXPathFreeObject(obj);
xmlXPathFreeContext(ctxt);
xmlFreeDoc(doc);
ret = true;
-cleanup:
+ cleanup:
VIR_FREE(origxml);
xmlFree(newxml);
if (origvol)
ret = true;
-cleanup:
+ cleanup:
if (vol)
virStorageVolFree(vol);
if (st)
ret = true;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(fd);
if (!ret && created)
unlink(file);
vshPrint(ctl, _("Vol %s wiped\n"), name);
ret = true;
-out:
+ out:
virStorageVolFree(vol);
return ret;
}
ret = false;
}
-cleanup:
+ cleanup:
virStorageVolFree(vol);
return ret;
}
vshError(ctl, "%s", _("Failed to list volumes"));
goto cleanup;
-fallback:
+ fallback:
/* fall back to old method (0.10.1 and older) */
vshResetLibvirtError();
/* truncate the list for not found vols */
deleted = nvols - list->nvols;
-finished:
+ finished:
/* sort the list */
if (list->vols && list->nvols)
qsort(list->vols, list->nvols, sizeof(*list->vols), vshStorageVolSorter);
success = true;
-cleanup:
+ cleanup:
if (nvols > 0)
for (i = 0; i < nvols; i++)
VIR_FREE(names[i]);
/* Cleanup and return */
ret = true;
-cleanup:
+ cleanup:
/* Safely free the memory allocated in this function */
if (list && list->nvols) {
vshError(ctl, "%s", last_error->message);
-out:
+ out:
vshResetLibvirtError();
}
if (!root)
virBufferTrim(indent, NULL, 2);
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
}
ret = 0;
-cleanup:
+ cleanup:
virCommandFree(cmd);
return ret;
}
vshError(ctl, _("command '%s' doesn't support option --%s"),
cmd->name, name);
}
-cleanup:
+ cleanup:
VIR_FREE(alias);
return ret;
}
data_only = true;
continue;
} else {
-get_data:
+ get_data:
/* Special case 'help' to ignore spurious data */
if (!(opt = vshCmddefGetData(cmd, &opts_need_arg,
&opts_seen)) &&
VIR_FREE(str);
return;
-error:
+ error:
vshCloseLogFile(ctl);
vshError(ctl, "%s", _("failed to write the log file"));
virBufferFreeAndReset(&buf);
virReportSystemError(EPERM,
_("%s not matched against 'allowed_users' in %s"),
name, conf_file);
-cleanup:
+ cleanup:
VIR_FREE(gname);
return ret;
}
}
}
return shargv;
-error:
+ error:
virStringFreeList(shargv);
return NULL;
}
/* At this point, the parent is now waiting for the child to exit,
* but as that may take a long time, we release resources now. */
-cleanup:
+ cleanup:
if (nfdlist > 0)
for (i = 0; i < nfdlist; i++)
VIR_FORCE_CLOSE(fdlist[i]);
}
return;
-unknown:
+ unknown:
dbg("Cannot determine payload: Prog=%u, Proc=%u, Type=%u, Status=%u", prog, proc, type, status);
proto_tree_add_item(tree, hf_libvirt_unknown, tvb, VIR_HEADER_LEN, -1, ENC_NA);
}