*data = nsdata;
return 0;
-error:
+ error:
VIR_FREE(nodes);
testDomainDefNamespaceFree(nsdata);
return -1;
return caps;
-error:
+ error:
virObjectUnref(caps);
return NULL;
}
dom->def->vcpus = nvcpus;
ret = 0;
-cleanup:
+ cleanup:
return ret;
}
dom->hasManagedSave = false;
ret = 0;
-cleanup:
+ cleanup:
if (ret < 0)
testDomainShutdownState(NULL, dom, VIR_DOMAIN_SHUTOFF_FAILED);
return ret;
return VIR_DRV_OPEN_SUCCESS;
-error:
+ error:
virObjectUnref(privconn->domains);
virNetworkObjListFree(&privconn->networks);
virInterfaceObjListFree(&privconn->ifaces);
ret = node;
}
-error:
+ error:
xmlFreeDoc(doc);
VIR_FREE(absFile);
return ret;
}
return 0;
-error:
+ error:
return -1;
}
}
ret = 0;
-error:
+ error:
return ret;
}
}
ret = 0;
-error:
+ error:
VIR_FREE(nodes);
return ret;
}
}
ret = 0;
-error:
+ error:
VIR_FREE(nodes);
return ret;
}
}
ret = 0;
-error:
+ error:
VIR_FREE(nodes);
return ret;
}
}
ret = 0;
-error:
+ error:
virStorageVolDefFree(def);
VIR_FREE(nodes);
return ret;
}
ret = 0;
-error:
+ error:
VIR_FREE(nodes);
return ret;
}
}
ret = 0;
-error:
+ error:
VIR_FREE(nodes);
return ret;
}
}
ret = 0;
-error:
+ error:
VIR_FREE(nodes);
return ret;
}
}
i = -1;
-found_user:
+ found_user:
/* Even if we didn't find the user, we still ask for a password. */
if (i == -1 || privconn->auths[i].password != NULL) {
password = virAuthGetPassword(conn, auth, "test",
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(username);
VIR_FREE(password);
return ret;
}
ret = virDomainObjIsActive(obj);
-cleanup:
+ cleanup:
if (obj)
virObjectUnlock(obj);
return ret;
}
ret = obj->persistent;
-cleanup:
+ cleanup:
if (obj)
virObjectUnlock(obj);
return ret;
if (ret)
ret->id = dom->def->id;
-cleanup:
+ cleanup:
if (dom)
virObjectUnlock(dom);
if (event)
if (ret)
ret->id = dom->def->id;
-cleanup:
+ cleanup:
if (dom)
virObjectUnlock(dom);
return ret;
if (ret)
ret->id = dom->def->id;
-cleanup:
+ cleanup:
if (dom)
virObjectUnlock(dom);
return ret;
if (ret)
ret->id = dom->def->id;
-cleanup:
+ cleanup:
if (dom)
virObjectUnlock(dom);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
if (event)
VIR_DOMAIN_EVENT_RESUMED_UNPAUSED);
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
if (event) {
VIR_DOMAIN_EVENT_SUSPENDED_PAUSED);
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
}
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
if (event)
}
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
if (event)
info->cpuTime = ((tv.tv_sec * 1000ll * 1000ll * 1000ll) + (tv.tv_usec * 1000ll));
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
*state = virDomainObjGetState(privdom, reason);
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FREE(xml);
/* Don't report failure in close or unlink, because
VIR_DOMAIN_EVENT_STARTED_RESTORED);
ret = 0;
-cleanup:
+ cleanup:
virDomainDefFree(def);
VIR_FREE(xml);
VIR_FORCE_CLOSE(fd);
}
ret = 0;
-cleanup:
+ cleanup:
VIR_FORCE_CLOSE(fd);
if (privdom)
virObjectUnlock(privdom);
ret = privdom->def->mem.max_balloon;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
privdom->def->mem.max_balloon = memory;
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
privdom->def->mem.cur_balloon = memory;
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
ret = (flags & VIR_DOMAIN_VCPU_MAXIMUM) ? def->maxvcpus : def->vcpus;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
break;
}
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
}
ret = maxinfo;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
ret = virDomainDefFormat(def,
flags);
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
if (ret)
ret->id = dom->def->id;
-cleanup:
+ cleanup:
virDomainDefFree(def);
virDomainDefFree(oldDef);
if (dom)
ret = virDomainObjGetMetadata(privdom, type, uri, privconn->caps,
privconn->xmlopt, flags);
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
privconn->caps, privconn->xmlopt,
NULL, flags);
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
}
ret = i;
-cleanup:
+ cleanup:
testDriverUnlock(privconn);
return ret;
}
VIR_DOMAIN_EVENT_STARTED_BOOTED);
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
if (event)
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
if (event)
*autostart = privdom->autostart;
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
privdom->autostart = autostart ? 1 : 0;
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
*nparams = 1;
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
ret = 0;
-cleanup:
+ cleanup:
if (privdom)
virObjectUnlock(privdom);
return ret;
stats->errs = tv.tv_sec / 2;
ret = 0;
-error:
+ error:
if (privdom)
virObjectUnlock(privdom);
return ret;
stats->tx_drop = tv.tv_sec / 4;
ret = 0;
-error:
+ error:
if (privdom)
virObjectUnlock(privdom);
return ret;
ret = virGetNetwork(conn, net->def->name, net->def->uuid);
-cleanup:
+ cleanup:
if (net)
virNetworkObjUnlock(net);
return ret;
ret = virGetNetwork(conn, net->def->name, net->def->uuid);
-cleanup:
+ cleanup:
if (net)
virNetworkObjUnlock(net);
return ret;
return n;
-error:
+ error:
for (n = 0; n < nnames; n++)
VIR_FREE(names[n]);
testDriverUnlock(privconn);
return n;
-error:
+ error:
for (n = 0; n < nnames; n++)
VIR_FREE(names[n]);
testDriverUnlock(privconn);
}
ret = virNetworkObjIsActive(obj);
-cleanup:
+ cleanup:
if (obj)
virNetworkObjUnlock(obj);
return ret;
}
ret = obj->persistent;
-cleanup:
+ cleanup:
if (obj)
virNetworkObjUnlock(obj);
return ret;
ret = virGetNetwork(conn, net->def->name, net->def->uuid);
-cleanup:
+ cleanup:
virNetworkDefFree(def);
if (event)
testObjectEventQueue(privconn, event);
ret = virGetNetwork(conn, net->def->name, net->def->uuid);
-cleanup:
+ cleanup:
virNetworkDefFree(def);
if (event)
testObjectEventQueue(privconn, event);
privnet = NULL;
ret = 0;
-cleanup:
+ cleanup:
if (event)
testObjectEventQueue(privconn, event);
if (privnet)
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
testDriverUnlock(privconn);
return ret;
}
0);
ret = 0;
-cleanup:
+ cleanup:
if (event)
testObjectEventQueue(privconn, event);
if (privnet)
}
ret = 0;
-cleanup:
+ cleanup:
if (event)
testObjectEventQueue(privconn, event);
if (privnet)
ret = virNetworkDefFormat(privnet->def, flags);
-cleanup:
+ cleanup:
if (privnet)
virNetworkObjUnlock(privnet);
return ret;
ignore_value(VIR_STRDUP(bridge, privnet->def->bridge));
-cleanup:
+ cleanup:
if (privnet)
virNetworkObjUnlock(privnet);
return bridge;
*autostart = privnet->autostart;
ret = 0;
-cleanup:
+ cleanup:
if (privnet)
virNetworkObjUnlock(privnet);
return ret;
privnet->autostart = autostart ? 1 : 0;
ret = 0;
-cleanup:
+ cleanup:
if (privnet)
virNetworkObjUnlock(privnet);
return ret;
return n;
-error:
+ error:
for (n = 0; n < nnames; n++)
VIR_FREE(names[n]);
testDriverUnlock(privconn);
return n;
-error:
+ error:
for (n = 0; n < nnames; n++)
VIR_FREE(names[n]);
testDriverUnlock(privconn);
ret = virGetInterface(conn, iface->def->name, iface->def->mac);
-cleanup:
+ cleanup:
if (iface)
virInterfaceObjUnlock(iface);
return ret;
ret = virGetInterface(conn, iface->def->name, iface->def->mac);
-cleanup:
+ cleanup:
if (iface)
virInterfaceObjUnlock(iface);
return ret;
}
ret = virInterfaceObjIsActive(obj);
-cleanup:
+ cleanup:
if (obj)
virInterfaceObjUnlock(obj);
return ret;
goto cleanup;
ret = 0;
-cleanup:
+ cleanup:
testDriverUnlock(privconn);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
testDriverUnlock(privconn);
return ret;
ret = 0;
-cleanup:
+ cleanup:
testDriverUnlock(privconn);
return ret;
}
ret = virInterfaceDefFormat(privinterface->def);
-cleanup:
+ cleanup:
if (privinterface)
virInterfaceObjUnlock(privinterface);
return ret;
ret = virGetInterface(conn, iface->def->name, iface->def->mac);
-cleanup:
+ cleanup:
virInterfaceDefFree(def);
if (iface)
virInterfaceObjUnlock(iface);
privinterface);
ret = 0;
-cleanup:
+ cleanup:
testDriverUnlock(privconn);
return ret;
}
privinterface->active = 1;
ret = 0;
-cleanup:
+ cleanup:
if (privinterface)
virInterfaceObjUnlock(privinterface);
testDriverUnlock(privconn);
privinterface->active = 0;
ret = 0;
-cleanup:
+ cleanup:
if (privinterface)
virInterfaceObjUnlock(privinterface);
testDriverUnlock(privconn);
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL);
-cleanup:
+ cleanup:
if (pool)
virStoragePoolObjUnlock(pool);
return ret;
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL);
-cleanup:
+ cleanup:
if (pool)
virStoragePoolObjUnlock(pool);
return ret;
return n;
-error:
+ error:
for (n = 0; n < nnames; n++)
VIR_FREE(names[n]);
testDriverUnlock(privconn);
return n;
-error:
+ error:
for (n = 0; n < nnames; n++)
VIR_FREE(names[n]);
testDriverUnlock(privconn);
}
ret = virStoragePoolObjIsActive(obj);
-cleanup:
+ cleanup:
if (obj)
virStoragePoolObjUnlock(obj);
return ret;
}
ret = obj->configFile ? 1 : 0;
-cleanup:
+ cleanup:
if (obj)
virStoragePoolObjUnlock(obj);
return ret;
privpool->active = 1;
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
_("pool type '%s' does not support source discovery"), type);
}
-cleanup:
+ cleanup:
virStoragePoolSourceFree(source);
return ret;
}
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL);
-cleanup:
+ cleanup:
virStoragePoolDefFree(def);
if (pool)
virStoragePoolObjUnlock(pool);
ret = virGetStoragePool(conn, pool->def->name, pool->def->uuid,
NULL, NULL);
-cleanup:
+ cleanup:
virStoragePoolDefFree(def);
if (pool)
virStoragePoolObjUnlock(pool);
virStoragePoolObjRemove(&privconn->pools, privpool);
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
testDriverUnlock(privconn);
}
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
testDriverUnlock(privconn);
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
info->available = privpool->def->available;
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
ret = virStoragePoolDefFormat(privpool->def);
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
}
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
privpool->autostart = autostart;
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
ret = privpool->volumes.count;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
privvol->name, privvol->key,
NULL, NULL);
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
NULL, NULL);
privvol = NULL;
-cleanup:
+ cleanup:
virStorageVolDefFree(privvol);
if (privpool)
virStoragePoolObjUnlock(privpool);
NULL, NULL);
privvol = NULL;
-cleanup:
+ cleanup:
virStorageVolDefFree(privvol);
if (privpool)
virStoragePoolObjUnlock(privpool);
}
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
info->allocation = privvol->allocation;
ret = 0;
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
ret = virStorageVolDefFormat(privpool->def, privvol);
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
ignore_value(VIR_STRDUP(ret, privvol->target.path));
-cleanup:
+ cleanup:
if (privpool)
virStoragePoolObjUnlock(privpool);
return ret;
ret = virGetNodeDevice(conn, name);
-cleanup:
+ cleanup:
if (obj)
virNodeDeviceObjUnlock(obj);
return ret;
ret = virNodeDeviceDefFormat(obj->def);
-cleanup:
+ cleanup:
if (obj)
virNodeDeviceObjUnlock(obj);
return ret;
"%s", _("no parent for this device"));
}
-cleanup:
+ cleanup:
if (obj)
virNodeDeviceObjUnlock(obj);
return ret;
++ncaps;
ret = ncaps;
-cleanup:
+ cleanup:
if (obj)
virNodeDeviceObjUnlock(obj);
return ret;
}
ret = ncaps;
-cleanup:
+ cleanup:
if (obj)
virNodeDeviceObjUnlock(obj);
if (ret == -1) {
dev = virGetNodeDevice(conn, def->name);
def = NULL;
-cleanup:
+ cleanup:
testDriverUnlock(driver);
virNodeDeviceDefFree(def);
VIR_FREE(wwnn);
virNodeDeviceObjLock(obj);
virNodeDeviceObjRemove(&driver->devs, obj);
-out:
+ out:
if (obj)
virNodeDeviceObjUnlock(obj);
VIR_FREE(parent_name);
ret = 8;
-cleanup:
+ cleanup:
testDriverUnlock(privconn);
return ret;
}
vm->hasManagedSave = true;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
if (event) {
}
ret = vm->hasManagedSave;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
testDriverUnlock(privconn);
vm->hasManagedSave = false;
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
testDriverUnlock(privconn);
n = virDomainSnapshotObjListNum(vm->snapshots, NULL, flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
n = virDomainSnapshotObjListGetNames(vm->snapshots, NULL, names, nameslen,
flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
n = virDomainListSnapshots(vm->snapshots, NULL, domain, snaps, flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
n = virDomainSnapshotObjListGetNames(vm->snapshots, snap, names, nameslen,
flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
n = virDomainSnapshotObjListNum(vm->snapshots, snap, flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
n = virDomainListSnapshots(vm->snapshots, snap, snapshot->domain, snaps,
flags);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return n;
snapshot = virGetDomainSnapshot(domain, snap->def->name);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return snapshot;
ret = (vm->current_snapshot != NULL);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
parent = virGetDomainSnapshot(snapshot->domain, snap->def->parent);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return parent;
snapshot = virGetDomainSnapshot(domain, vm->current_snapshot->def->name);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return snapshot;
xml = virDomainSnapshotDefFormat(uuidstr, snap->def, flags, 0);
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return xml;
ret = (vm->current_snapshot &&
STREQ(snapshot->name, vm->current_snapshot->def->name));
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
ret = 1;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
}
snapshot = virGetDomainSnapshot(domain, snap->def->name);
-cleanup:
+ cleanup:
VIR_FREE(xml);
if (vm) {
if (snapshot) {
}
ret = 0;
-cleanup:
+ cleanup:
if (vm)
virObjectUnlock(vm);
return ret;
vm->current_snapshot = snap;
ret = 0;
-cleanup:
+ cleanup:
if (event) {
testObjectEventQueue(privconn, event);
if (event2)