mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 01:34:11 +03:00
qemu, lxc: drop redundant checks
After the previous patch, there are now some redundant checks. * src/qemu/qemu_driver.c (qemudDomainGetVcpuPinInfo) (qemuGetSchedulerParametersFlags): Drop checks now guaranteed by libvirt.c. * src/lxc/lxc_driver.c (lxcGetSchedulerParametersFlags): Likewise.
This commit is contained in:
parent
4199f3de2e
commit
51727c1dc0
@ -2959,13 +2959,6 @@ lxcGetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
|
|
||||||
lxcDriverLock(driver);
|
lxcDriverLock(driver);
|
||||||
|
|
||||||
if ((flags & (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) ==
|
|
||||||
(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) {
|
|
||||||
lxcError(VIR_ERR_INVALID_ARG, "%s",
|
|
||||||
_("cannot query live and config together"));
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*nparams > 1) {
|
if (*nparams > 1) {
|
||||||
rc = lxcGetCpuBWStatus(driver->cgroup);
|
rc = lxcGetCpuBWStatus(driver->cgroup);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
|
@ -3574,13 +3574,6 @@ qemudDomainGetVcpuPinInfo(virDomainPtr dom,
|
|||||||
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
virCheckFlags(VIR_DOMAIN_AFFECT_LIVE |
|
||||||
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
VIR_DOMAIN_AFFECT_CONFIG, -1);
|
||||||
|
|
||||||
if ((flags & (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) ==
|
|
||||||
(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) {
|
|
||||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
|
||||||
_("cannot get live and persistent info concurrently"));
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
qemuDriverLock(driver);
|
qemuDriverLock(driver);
|
||||||
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
vm = virDomainFindByUUID(&driver->domains, dom->uuid);
|
||||||
qemuDriverUnlock(driver);
|
qemuDriverUnlock(driver);
|
||||||
@ -6902,13 +6895,6 @@ qemuGetSchedulerParametersFlags(virDomainPtr dom,
|
|||||||
/* We don't return strings, and thus trivially support this flag. */
|
/* We don't return strings, and thus trivially support this flag. */
|
||||||
flags &= ~VIR_TYPED_PARAM_STRING_OKAY;
|
flags &= ~VIR_TYPED_PARAM_STRING_OKAY;
|
||||||
|
|
||||||
if ((flags & (VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) ==
|
|
||||||
(VIR_DOMAIN_AFFECT_LIVE | VIR_DOMAIN_AFFECT_CONFIG)) {
|
|
||||||
qemuReportError(VIR_ERR_INVALID_ARG, "%s",
|
|
||||||
_("cannot query live and config together"));
|
|
||||||
goto cleanup;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (*nparams > 1) {
|
if (*nparams > 1) {
|
||||||
rc = qemuGetCpuBWStatus(driver->cgroup);
|
rc = qemuGetCpuBWStatus(driver->cgroup);
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user