mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
esx: Add various vir*Flags API
Even though we don't accept any flags, it is unfriendly to callers that use the modern API to have to fall back to the flag-free API. Signed-off-by: Eric Blake <eblake@redhat.com> Acked-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
eded8aad10
commit
cb55026732
@ -1984,7 +1984,9 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
|
||||
|
||||
|
||||
static int
|
||||
esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
|
||||
esxDomainSetMemoryFlags(virDomainPtr domain,
|
||||
unsigned long memory,
|
||||
unsigned int flags)
|
||||
{
|
||||
int result = -1;
|
||||
esxPrivate *priv = domain->conn->privateData;
|
||||
@ -1994,6 +1996,8 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
|
||||
esxVI_TaskInfoState taskInfoState;
|
||||
char *taskInfoErrorMessage = NULL;
|
||||
|
||||
virCheckFlags(0, -1);
|
||||
|
||||
if (esxVI_EnsureSession(priv->primary) < 0)
|
||||
return -1;
|
||||
|
||||
@ -2037,6 +2041,12 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
|
||||
{
|
||||
return esxDomainSetMemoryFlags(domain, memory, 0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* libvirt exposed virtual CPU usage in absolute time, ESX doesn't provide this
|
||||
@ -5122,6 +5132,7 @@ static virHypervisorDriver esxHypervisorDriver = {
|
||||
.domainGetMaxMemory = esxDomainGetMaxMemory, /* 0.7.0 */
|
||||
.domainSetMaxMemory = esxDomainSetMaxMemory, /* 0.7.0 */
|
||||
.domainSetMemory = esxDomainSetMemory, /* 0.7.0 */
|
||||
.domainSetMemoryFlags = esxDomainSetMemoryFlags, /* 5.6.0 */
|
||||
.domainSetMemoryParameters = esxDomainSetMemoryParameters, /* 0.8.6 */
|
||||
.domainGetMemoryParameters = esxDomainGetMemoryParameters, /* 0.8.6 */
|
||||
.domainGetInfo = esxDomainGetInfo, /* 0.7.0 */
|
||||
|
Loading…
x
Reference in New Issue
Block a user