mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
* src/virsh.c: fixed 2 small bugs in setvcpus command, after
Atsushi SAKAI pointed out a value checking problem Daniel
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
Wed Aug 15 12:21:13 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/virsh.c: fixed 2 small bugs in setvcpus command, after
|
||||
Atsushi SAKAI pointed out a value checking problem
|
||||
|
||||
Tue Aug 14 14:32:51 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/proxy_internal.c: fix the UUID lookup though proxy, by
|
||||
|
||||
@@ -1679,14 +1679,14 @@ cmdSetvcpus(vshControl * ctl, vshCmd * cmd)
|
||||
return FALSE;
|
||||
|
||||
count = vshCommandOptInt(cmd, "count", &count);
|
||||
if (!count) {
|
||||
if (count <= 0) {
|
||||
vshError(ctl, FALSE, _("Invalid number of virtual CPUs."));
|
||||
virDomainFree(dom);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
maxcpu = virDomainGetMaxVcpus(dom);
|
||||
if (!maxcpu) {
|
||||
if (maxcpu <= 0) {
|
||||
virDomainFree(dom);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user