diff --git a/ChangeLog b/ChangeLog index 2f3ee9905a..208ebf548e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Thu Mar 22 11:35:05 CET 2007 Daniel Veillard + + * src/virsh.c: applied patch from Masayuki Sunou to avoid a bug + when using a wrong CPU number in vcpupin and report the error + Thu Mar 22 10:47:46 CET 2007 Daniel Veillard * libvirt.spec.in: one more extra fix for autostart dir from diff --git a/src/virsh.c b/src/virsh.c index c6fbf7305f..5789292ddb 100644 --- a/src/virsh.c +++ b/src/virsh.c @@ -1358,6 +1358,11 @@ cmdVcpupin(vshControl * ctl, vshCmd * cmd) if (cpu < VIR_NODEINFO_MAXCPUS(nodeinfo)) { VIR_USE_CPU(cpumap, cpu); + } else { + vshError(ctl, FALSE, _("Physical CPU %d doesn't exist."), cpu); + free(cpumap); + virDomainFree(dom); + return FALSE; } cpulist = index(cpulist, ','); if (cpulist)