[libvirt] [PATCH] qemu: fix the error cover issue in SetMemoryParameters

https://bugzilla.redhat.com/show_bug.cgi?id=1245476 We won't return the errno after commit 0d7f45ae, and the more clearly error will be set in the code in vircgroup*. Also We will always report error "Operation not permitted", because the return is -1. Signed-off-by: Luyao Huang <lhuang@redhat.com> --- src/qemu/qemu_driver.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 9dbe635..3130fe3 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -9809,12 +9809,8 @@ qemuDomainSetMemoryParameters(virDomainPtr dom, #define QEMU_SET_MEM_PARAMETER(FUNC, VALUE) \ if (set_ ## VALUE) { \ if (flags & VIR_DOMAIN_AFFECT_LIVE) { \ - if ((rc = FUNC(priv->cgroup, VALUE)) < 0) { \ - virReportSystemError(-rc, _("unable to set memory %s tunable"), \ - #VALUE); \ - \ - goto endjob; \ - } \ + if ((rc = FUNC(priv->cgroup, VALUE)) < 0) \ + goto endjob; \ vm->def->mem.VALUE = VALUE; \ } \ \ -- 1.8.3.1

On Wed, Jul 22, 2015 at 03:35:14PM +0800, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1245476
We won't return the errno after commit 0d7f45ae, and the more clearly error will be set in the code in vircgroup*. Also We will always report error "Operation not permitted", because the return is -1.
All called methods set the error appropriately, ACK && pushed. Martin

On 07/22/2015 05:06 PM, Martin Kletzander wrote:
On Wed, Jul 22, 2015 at 03:35:14PM +0800, Luyao Huang wrote:
https://bugzilla.redhat.com/show_bug.cgi?id=1245476
We won't return the errno after commit 0d7f45ae, and the more clearly error will be set in the code in vircgroup*. Also We will always report error "Operation not permitted", because the return is -1.
All called methods set the error appropriately, ACK && pushed.
Thanks a lot for your quick review.
Martin
Luyao
participants (3)
-
lhuang
-
Luyao Huang
-
Martin Kletzander