提交 cb550267 编写于 作者: E Eric Blake

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: NEric Blake <eblake@redhat.com>
Acked-by: NPeter Krempa <pkrempa@redhat.com>
上级 eded8aad
...@@ -1984,7 +1984,9 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory) ...@@ -1984,7 +1984,9 @@ esxDomainSetMaxMemory(virDomainPtr domain, unsigned long memory)
static int static int
esxDomainSetMemory(virDomainPtr domain, unsigned long memory) esxDomainSetMemoryFlags(virDomainPtr domain,
unsigned long memory,
unsigned int flags)
{ {
int result = -1; int result = -1;
esxPrivate *priv = domain->conn->privateData; esxPrivate *priv = domain->conn->privateData;
...@@ -1994,6 +1996,8 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory) ...@@ -1994,6 +1996,8 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory)
esxVI_TaskInfoState taskInfoState; esxVI_TaskInfoState taskInfoState;
char *taskInfoErrorMessage = NULL; char *taskInfoErrorMessage = NULL;
virCheckFlags(0, -1);
if (esxVI_EnsureSession(priv->primary) < 0) if (esxVI_EnsureSession(priv->primary) < 0)
return -1; return -1;
...@@ -2037,6 +2041,12 @@ esxDomainSetMemory(virDomainPtr domain, unsigned long memory) ...@@ -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 * libvirt exposed virtual CPU usage in absolute time, ESX doesn't provide this
...@@ -5122,6 +5132,7 @@ static virHypervisorDriver esxHypervisorDriver = { ...@@ -5122,6 +5132,7 @@ static virHypervisorDriver esxHypervisorDriver = {
.domainGetMaxMemory = esxDomainGetMaxMemory, /* 0.7.0 */ .domainGetMaxMemory = esxDomainGetMaxMemory, /* 0.7.0 */
.domainSetMaxMemory = esxDomainSetMaxMemory, /* 0.7.0 */ .domainSetMaxMemory = esxDomainSetMaxMemory, /* 0.7.0 */
.domainSetMemory = esxDomainSetMemory, /* 0.7.0 */ .domainSetMemory = esxDomainSetMemory, /* 0.7.0 */
.domainSetMemoryFlags = esxDomainSetMemoryFlags, /* 5.6.0 */
.domainSetMemoryParameters = esxDomainSetMemoryParameters, /* 0.8.6 */ .domainSetMemoryParameters = esxDomainSetMemoryParameters, /* 0.8.6 */
.domainGetMemoryParameters = esxDomainGetMemoryParameters, /* 0.8.6 */ .domainGetMemoryParameters = esxDomainGetMemoryParameters, /* 0.8.6 */
.domainGetInfo = esxDomainGetInfo, /* 0.7.0 */ .domainGetInfo = esxDomainGetInfo, /* 0.7.0 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册