[libvirt] [PATCH] Fix the style of argument("cpumap") in op_pincpu()
Daniel P. Berrange
berrange at redhat.com
Wed May 6 08:53:46 UTC 2009
On Thu, Apr 30, 2009 at 04:00:54PM +0900, Tatsuro Enokura wrote:
> Hi all,
>
> The form of cpumap argument in op_pincpu method on xend change
> by following a patch.
> http://xenbits.xensource.com/xen-unstable.hg?rev/a63d20d7a941
>
> xenDaemonDomainPinCpu() sends the string for cpumap argument
> like python's list style now.
> This patch is following the change of cpumap argument.
> "[0,1,2]" ---> "0,1,2"
If we switch to the new format, does that still work with older
XenD ?
Daniel
> Index: src/xend_internal.c
> ===================================================================
> RCS file: /data/cvs/libvirt/src/xend_internal.c,v
> retrieving revision 1.260
> diff -u -r1.260 xend_internal.c
> --- src/xend_internal.c 24 Apr 2009 12:17:50 -0000 1.260
> +++ src/xend_internal.c 30 Apr 2009 01:40:59 -0000
> @@ -3760,7 +3760,7 @@
> xenDaemonDomainPinVcpu(virDomainPtr domain, unsigned int vcpu,
> unsigned char *cpumap, int maplen)
> {
> - char buf[VIR_UUID_BUFLEN], mapstr[sizeof(cpumap_t) * 64] = "[";
> + char buf[VIR_UUID_BUFLEN], mapstr[sizeof(cpumap_t) * 64] = "";
> int i, j;
>
> if ((domain == NULL) || (domain->conn == NULL) || (domain->name == NULL)
> @@ -3776,7 +3776,7 @@
> snprintf(buf, sizeof(buf), "%d,", (8 * i) + j);
> strcat(mapstr, buf);
> }
> - mapstr[strlen(mapstr) - 1] = ']';
> + mapstr[strlen(mapstr) - 1] = '\0';
> snprintf(buf, sizeof(buf), "%d", vcpu);
> return(xend_op(domain->conn, domain->name, "op", "pincpu", "vcpu", buf,
> "cpumap", mapstr, NULL));
> --
> Libvir-list mailing list
> Libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list
--
|: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
More information about the libvir-list
mailing list