From: Taku Izumi Date: Wed, 16 Mar 2011 08:58:57 +0000 (+0900) Subject: setmaxmem: remove the code to invoke virDomainSetMemory in cmdSetmaxmem X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=74891d94886f9c2fe1679864a9bdb1cacbc7341b;p=libvirt.git setmaxmem: remove the code to invoke virDomainSetMemory in cmdSetmaxmem When the new maximum memory size becomes less than the current memory size, I think it is not the libvirt client but the each driver that decides the behavior (reject the operation or shrink the current memory size). Signed-off-by: Taku Izumi --- diff --git a/tools/virsh.c b/tools/virsh.c index f2d2c9d1a5..a718abf09d 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -3046,15 +3046,7 @@ cmdSetmaxmem(vshControl *ctl, const vshCmd *cmd) if (virDomainSetMaxMemory(dom, kilobytes) != 0) { vshError(ctl, "%s", _("Unable to change MaxMemorySize")); - virDomainFree(dom); - return FALSE; - } - - if (kilobytes < info.memory) { - if (virDomainSetMemory(dom, kilobytes) != 0) { - vshError(ctl, "%s", _("Unable to shrink current MemorySize")); - ret = FALSE; - } + ret = FALSE; } virDomainFree(dom);