[libvirt] [PATCH] manage number of virtual CPUs
Daniel P. Berrange
berrange at redhat.com
Thu Aug 14 11:02:45 UTC 2008
On Wed, Aug 13, 2008 at 05:04:45PM +0400, Evgeniy Sokolov wrote:
> +static int openvzGetMaxVCPUs(virConnectPtr conn, const char *type) {
> + if (STRCASEEQ(type, "openvz"))
> + return 4096; //OpenVZ has no limitation
This should be 1024 since that's the max CPUs exposed by the kernel
to userspace for sched params.
> + if (virRun(conn, (char **)prog, NULL) < 0) {
> + openvzError(conn, VIR_ERR_INTERNAL_ERROR,
> + _("Could not exec %s"), VZCTL);
> + return -1;
> + }
There's no need to cast to '(char **)' anymore - virRun has
the correct constness defined.
With those two things changed this looks fine to commit
Regards,
Daniel
--
|: 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