From 51727c1dc0b57165cb5c959e23dfc3cf9c4dbc6f Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 29 Nov 2011 10:40:19 -0700 Subject: [PATCH] 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. --- src/lxc/lxc_driver.c | 7 ------- src/qemu/qemu_driver.c | 14 -------------- 2 files changed, 21 deletions(-) diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c index c02fe70f53..8bd1501866 100644 --- a/src/lxc/lxc_driver.c +++ b/src/lxc/lxc_driver.c @@ -2959,13 +2959,6 @@ lxcGetSchedulerParametersFlags(virDomainPtr dom, 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) { rc = lxcGetCpuBWStatus(driver->cgroup); if (rc < 0) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 3be97f3a2e..307cc37680 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -3574,13 +3574,6 @@ qemudDomainGetVcpuPinInfo(virDomainPtr dom, virCheckFlags(VIR_DOMAIN_AFFECT_LIVE | 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); vm = virDomainFindByUUID(&driver->domains, dom->uuid); qemuDriverUnlock(driver); @@ -6902,13 +6895,6 @@ qemuGetSchedulerParametersFlags(virDomainPtr dom, /* We don't return strings, and thus trivially support this flag. */ 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) { rc = qemuGetCpuBWStatus(driver->cgroup); if (rc < 0) -- GitLab