mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
qemuDomainGetSchedulerType: Prefer qemuDomObjFromDomain
In all qemu APIs we tend to prefer qemuDomObjFromDomain over virDomainObjListFindByUUID. But somehow the qemuDomainGetSchedulerType left unattended.
This commit is contained in:
parent
ba44dd2453
commit
e80e07f657
@ -7545,18 +7545,14 @@ cleanup:
|
|||||||
static char *qemuDomainGetSchedulerType(virDomainPtr dom,
|
static char *qemuDomainGetSchedulerType(virDomainPtr dom,
|
||||||
int *nparams)
|
int *nparams)
|
||||||
{
|
{
|
||||||
virQEMUDriverPtr driver = dom->conn->privateData;
|
|
||||||
char *ret = NULL;
|
char *ret = NULL;
|
||||||
int rc;
|
int rc;
|
||||||
virDomainObjPtr vm = NULL;
|
virDomainObjPtr vm = NULL;
|
||||||
qemuDomainObjPrivatePtr priv;
|
qemuDomainObjPrivatePtr priv;
|
||||||
|
|
||||||
vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
|
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||||
if (vm == NULL) {
|
|
||||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
|
||||||
_("No such domain %s"), dom->uuid);
|
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
|
||||||
priv = vm->privateData;
|
priv = vm->privateData;
|
||||||
|
|
||||||
if (virDomainGetSchedulerTypeEnsureACL(dom->conn, vm->def) < 0)
|
if (virDomainGetSchedulerTypeEnsureACL(dom->conn, vm->def) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user