* src/virsh.c: add error messages for negative memory size as

pointed out by Masayuki Sunou
Daniel
This commit is contained in:
Daniel Veillard 2007-03-20 15:31:46 +00:00
parent 633a3bef0d
commit 4ffe066dd8
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Tue Mar 20 16:40:06 CET 2007 Daniel Veillard <veillard@redhat.com>
* src/virsh.c: add error messages for negative memory size as
pointed out by Masayuki Sunou
Tue Mar 20 16:30:29 CET 2007 Daniel Veillard <veillard@redhat.com>
* src/xen_internal.c: applied patch from Atsushi SAKAI fixing

View File

@ -1461,6 +1461,7 @@ cmdSetmem(vshControl * ctl, vshCmd * cmd)
bytes = vshCommandOptInt(cmd, "bytes", &bytes);
if (bytes <= 0) {
virDomainFree(dom);
vshError(ctl, FALSE, _("Invalid value of %d for memory size"), bytes);
return FALSE;
}
@ -1504,6 +1505,7 @@ cmdSetmaxmem(vshControl * ctl, vshCmd * cmd)
bytes = vshCommandOptInt(cmd, "bytes", &bytes);
if (bytes <= 0) {
virDomainFree(dom);
vshError(ctl, FALSE, _("Invalid value of %d for memory size"), bytes);
return FALSE;
}