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,
|
||||
int *nparams)
|
||||
{
|
||||
virQEMUDriverPtr driver = dom->conn->privateData;
|
||||
char *ret = NULL;
|
||||
int rc;
|
||||
virDomainObjPtr vm = NULL;
|
||||
qemuDomainObjPrivatePtr priv;
|
||||
|
||||
vm = virDomainObjListFindByUUID(driver->domains, dom->uuid);
|
||||
if (vm == NULL) {
|
||||
virReportError(VIR_ERR_INTERNAL_ERROR,
|
||||
_("No such domain %s"), dom->uuid);
|
||||
if (!(vm = qemuDomObjFromDomain(dom)))
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
priv = vm->privateData;
|
||||
|
||||
if (virDomainGetSchedulerTypeEnsureACL(dom->conn, vm->def) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user