mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
conf: Turn def->maxvcpus into size_t
Later on this will also be used to track size of the vcpu data array. Use size_t so that we can utilize the memory allocation helpers.
This commit is contained in:
parent
71c89ac9df
commit
80a59b4aae
@ -1317,7 +1317,7 @@ virDomainDefSetVcpus(virDomainDefPtr def,
|
|||||||
{
|
{
|
||||||
if (vcpus > def->maxvcpus) {
|
if (vcpus > def->maxvcpus) {
|
||||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||||
_("maxvcpus must not be less than current vcpus (%u < %u)"),
|
_("maxvcpus must not be less than current vcpus (%u < %zu)"),
|
||||||
vcpus, def->maxvcpus);
|
vcpus, def->maxvcpus);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -2219,7 +2219,7 @@ struct _virDomainDef {
|
|||||||
virDomainMemtune mem;
|
virDomainMemtune mem;
|
||||||
|
|
||||||
unsigned int vcpus;
|
unsigned int vcpus;
|
||||||
unsigned int maxvcpus;
|
size_t maxvcpus;
|
||||||
int placement_mode;
|
int placement_mode;
|
||||||
virBitmapPtr cpumask;
|
virBitmapPtr cpumask;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user