From 3d6dbfeab057a3d9b12a53abc4b85fb35a2b699c Mon Sep 17 00:00:00 2001 From: Daniel Veillard Date: Thu, 22 Mar 2007 10:27:54 +0000 Subject: [PATCH] * src/virsh.c: applied patch from Masayuki Sunou to avoid a bug when using a wrong CPU number in vcpupin and report the error Daniel --- ChangeLog | 5 +++++ src/virsh.c | 5 +++++ 2 files changed, 10 insertions(+) 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)