[libvirt] [PATCH 1/4] vcpupin: improve vcpupin definition of virsh vcpupin
Daniel P. Berrange
berrange at redhat.com
Mon Jun 20 11:32:50 UTC 2011
On Mon, Jun 20, 2011 at 05:18:34PM +0800, Wen Congyang wrote:
> At 06/20/2011 02:46 PM, Daniel Veillard Write:
> > On Fri, Jun 10, 2011 at 03:38:55PM +0900, Taku Izumi wrote:
> >>
> >> When using vcpupin command, we have to speficy comma-separated list as cpulist,
> >> but this is tedious in case the number of phsycal cpus is large.
> >> This patch improves this by introducing special markup "-" and "^" which are
> >> similar to XML schema of "cpuset" attribute.
> >>
> >> That is:
> >
> > The example
> >
> >> # virsh vcpupin Guest 0 0-15,^8
> >>
> >> is identical to
> >>
> >> # virsh vcpupin Guest 0 0,1,2,3,4,5,6,7,9,10,11,12,13,14,15
> >>
> >> NOTE: The expression is sequencially evaluated, so "0-15,^8" is not identical
> >
> > Okay, ACK, the point about having to generate the long comma list is
> > right and this seems like the right solution.
>
> I have pushed it with this(add extra documentation in the virsh.pod):
Unfortunately this does not appear to build cleanly, due to const-cast warnings:
make[3]: Entering directory `/home/berrange/src/virt/libvirt/tools'
CC virsh-virsh.o
cc1: warnings being treated as errors
virsh.c: In function 'cmdVcpupin':
virsh.c:3064:9: error: assignment discards qualifiers from pointer target type
virsh.c:3084:9: error: passing argument 1 of 'virParseNumber' from incompatible pointer type
../src/util/util.h:172:5: note: expected 'const char **' but argument is of type 'char **'
virsh.c:3092:9: error: passing argument 1 of 'virSkipSpaces' from incompatible pointer type
../src/util/util.h:171:6: note: expected 'const char **' but argument is of type 'char **'
virsh.c:3106:13: error: passing argument 1 of 'virSkipSpaces' from incompatible pointer type
../src/util/util.h:171:6: note: expected 'const char **' but argument is of type 'char **'
virsh.c:3108:13: error: passing argument 1 of 'virParseNumber' from incompatible pointer type
../src/util/util.h:172:5: note: expected 'const char **' but argument is of type 'char **'
virsh.c:3119:13: error: passing argument 1 of 'virSkipSpaces' from incompatible pointer type
../src/util/util.h:171:6: note: expected 'const char **' but argument is of type 'char **'
virsh.c:3124:13: error: passing argument 1 of 'virSkipSpaces' from incompatible pointer type
../src/util/util.h:171:6: note: expected 'const char **' but argument is of type 'char **'
make[3]: *** [virsh-virsh.o] Error 1
A reminder to everyone who commits. It is essential to run configure +
build with --enable-compile-warnings=error before pushing patches
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list