]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* src/virsh.c: applied patch from Masayuki Sunou to avoid a bug
authorDaniel Veillard <veillard@redhat.com>
Thu, 22 Mar 2007 10:27:54 +0000 (10:27 +0000)
committerDaniel Veillard <veillard@redhat.com>
Thu, 22 Mar 2007 10:27:54 +0000 (10:27 +0000)
  when using a wrong CPU number in vcpupin and report the error
Daniel

ChangeLog
src/virsh.c

index 2f3ee9905a26d1fa580b045a8f7e3dbfd71d8f06..208ebf548ec23ed7d24da4de71cabe4955942128 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Thu Mar 22 11:35:05 CET 2007 Daniel Veillard <veillard@redhat.com>
+
+       * 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 <veillard@redhat.com>
 
        * libvirt.spec.in: one more extra fix for autostart dir from
index c6fbf7305f2ac22c14c03ecf2e3cbff729efd8d8..5789292ddb4d4feb1088fe40a359377f1031672a 100644 (file)
@@ -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)