提交 6b6cb7ea 编写于 作者: M Matthias Bolte

esx: Fix "occurence" typo (again)

Also include some whitespace changes. No functional change included.
上级 8d2e24d6
...@@ -2475,6 +2475,7 @@ esxDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus, ...@@ -2475,6 +2475,7 @@ esxDomainSetVcpusFlags(virDomainPtr domain, unsigned int nvcpus,
} }
static int static int
esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
{ {
...@@ -2482,6 +2483,7 @@ esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus) ...@@ -2482,6 +2483,7 @@ esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
} }
static int static int
esxDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) esxDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
{ {
...@@ -2540,6 +2542,8 @@ esxDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags) ...@@ -2540,6 +2542,8 @@ esxDomainGetVcpusFlags(virDomainPtr domain, unsigned int flags)
return priv->maxVcpus; return priv->maxVcpus;
} }
static int static int
esxDomainGetMaxVcpus(virDomainPtr domain) esxDomainGetMaxVcpus(virDomainPtr domain)
{ {
...@@ -2547,6 +2551,8 @@ esxDomainGetMaxVcpus(virDomainPtr domain) ...@@ -2547,6 +2551,8 @@ esxDomainGetMaxVcpus(virDomainPtr domain)
VIR_DOMAIN_VCPU_MAXIMUM)); VIR_DOMAIN_VCPU_MAXIMUM));
} }
static char * static char *
esxDomainDumpXML(virDomainPtr domain, int flags) esxDomainDumpXML(virDomainPtr domain, int flags)
{ {
...@@ -3809,12 +3815,16 @@ esxDomainIsPersistent(virDomainPtr domain ATTRIBUTE_UNUSED) ...@@ -3809,12 +3815,16 @@ esxDomainIsPersistent(virDomainPtr domain ATTRIBUTE_UNUSED)
return 1; return 1;
} }
static int static int
esxDomainIsUpdated(virDomainPtr domain ATTRIBUTE_UNUSED) esxDomainIsUpdated(virDomainPtr domain ATTRIBUTE_UNUSED)
{ {
return 0; return 0;
} }
static virDomainSnapshotPtr static virDomainSnapshotPtr
esxDomainSnapshotCreateXML(virDomainPtr domain, const char *xmlDesc, esxDomainSnapshotCreateXML(virDomainPtr domain, const char *xmlDesc,
unsigned int flags) unsigned int flags)
......
...@@ -1812,7 +1812,7 @@ esxVI_GetVirtualMachineQuestionInfo ...@@ -1812,7 +1812,7 @@ esxVI_GetVirtualMachineQuestionInfo
int int
esxVI_GetBoolean(esxVI_ObjectContent *objectContent, const char *propertyName, esxVI_GetBoolean(esxVI_ObjectContent *objectContent, const char *propertyName,
esxVI_Boolean *value, esxVI_Occurrence occurence) esxVI_Boolean *value, esxVI_Occurrence occurrence)
{ {
esxVI_DynamicProperty *dynamicProperty; esxVI_DynamicProperty *dynamicProperty;
...@@ -1835,7 +1835,7 @@ esxVI_GetBoolean(esxVI_ObjectContent *objectContent, const char *propertyName, ...@@ -1835,7 +1835,7 @@ esxVI_GetBoolean(esxVI_ObjectContent *objectContent, const char *propertyName,
} }
if (*value == esxVI_Boolean_Undefined && if (*value == esxVI_Boolean_Undefined &&
occurence == esxVI_Occurrence_RequiredItem) { occurrence == esxVI_Occurrence_RequiredItem) {
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
_("Missing '%s' property"), propertyName); _("Missing '%s' property"), propertyName);
return -1; return -1;
...@@ -1844,9 +1844,11 @@ esxVI_GetBoolean(esxVI_ObjectContent *objectContent, const char *propertyName, ...@@ -1844,9 +1844,11 @@ esxVI_GetBoolean(esxVI_ObjectContent *objectContent, const char *propertyName,
return 0; return 0;
} }
int int
esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName, esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName,
esxVI_Long **value, esxVI_Occurrence occurence) esxVI_Long **value, esxVI_Occurrence occurrence)
{ {
esxVI_DynamicProperty *dynamicProperty; esxVI_DynamicProperty *dynamicProperty;
...@@ -1866,7 +1868,7 @@ esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName, ...@@ -1866,7 +1868,7 @@ esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName,
} }
} }
if (*value == NULL && occurence == esxVI_Occurrence_RequiredItem) { if (*value == NULL && occurrence == esxVI_Occurrence_RequiredItem) {
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
_("Missing '%s' property"), propertyName); _("Missing '%s' property"), propertyName);
return -1; return -1;
...@@ -1880,7 +1882,7 @@ esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName, ...@@ -1880,7 +1882,7 @@ esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName,
int int
esxVI_GetStringValue(esxVI_ObjectContent *objectContent, esxVI_GetStringValue(esxVI_ObjectContent *objectContent,
const char *propertyName, const char *propertyName,
char **value, esxVI_Occurrence occurence) char **value, esxVI_Occurrence occurrence)
{ {
esxVI_DynamicProperty *dynamicProperty; esxVI_DynamicProperty *dynamicProperty;
...@@ -1902,7 +1904,7 @@ esxVI_GetStringValue(esxVI_ObjectContent *objectContent, ...@@ -1902,7 +1904,7 @@ esxVI_GetStringValue(esxVI_ObjectContent *objectContent,
} }
} }
if (*value == NULL && occurence == esxVI_Occurrence_RequiredItem) { if (*value == NULL && occurrence == esxVI_Occurrence_RequiredItem) {
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
_("Missing '%s' property"), propertyName); _("Missing '%s' property"), propertyName);
return -1; return -1;
...@@ -1917,7 +1919,7 @@ int ...@@ -1917,7 +1919,7 @@ int
esxVI_GetManagedObjectReference(esxVI_ObjectContent *objectContent, esxVI_GetManagedObjectReference(esxVI_ObjectContent *objectContent,
const char *propertyName, const char *propertyName,
esxVI_ManagedObjectReference **value, esxVI_ManagedObjectReference **value,
esxVI_Occurrence occurence) esxVI_Occurrence occurrence)
{ {
esxVI_DynamicProperty *dynamicProperty; esxVI_DynamicProperty *dynamicProperty;
...@@ -1938,7 +1940,7 @@ esxVI_GetManagedObjectReference(esxVI_ObjectContent *objectContent, ...@@ -1938,7 +1940,7 @@ esxVI_GetManagedObjectReference(esxVI_ObjectContent *objectContent,
} }
} }
if (*value == NULL && occurence == esxVI_Occurrence_RequiredItem) { if (*value == NULL && occurrence == esxVI_Occurrence_RequiredItem) {
ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR, ESX_VI_ERROR(VIR_ERR_INTERNAL_ERROR,
_("Missing '%s' property"), propertyName); _("Missing '%s' property"), propertyName);
return -1; return -1;
...@@ -2265,7 +2267,8 @@ esxVI_GetSnapshotTreeBySnapshot ...@@ -2265,7 +2267,8 @@ esxVI_GetSnapshotTreeBySnapshot
int esxVI_LookupHostSystemProperties(esxVI_Context *ctx, int
esxVI_LookupHostSystemProperties(esxVI_Context *ctx,
esxVI_String *propertyNameList, esxVI_String *propertyNameList,
esxVI_ObjectContent **hostSystem) esxVI_ObjectContent **hostSystem)
{ {
......
...@@ -300,19 +300,19 @@ int esxVI_GetVirtualMachineQuestionInfo ...@@ -300,19 +300,19 @@ int esxVI_GetVirtualMachineQuestionInfo
int esxVI_GetBoolean(esxVI_ObjectContent *objectContent, int esxVI_GetBoolean(esxVI_ObjectContent *objectContent,
const char *propertyName, const char *propertyName,
esxVI_Boolean *value, esxVI_Occurrence occurence); esxVI_Boolean *value, esxVI_Occurrence occurrence);
int esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName, int esxVI_GetLong(esxVI_ObjectContent *objectContent, const char *propertyName,
esxVI_Long **value, esxVI_Occurrence occurence); esxVI_Long **value, esxVI_Occurrence occurrence);
int esxVI_GetStringValue(esxVI_ObjectContent *objectContent, int esxVI_GetStringValue(esxVI_ObjectContent *objectContent,
const char *propertyName, const char *propertyName,
char **value, esxVI_Occurrence occurence); char **value, esxVI_Occurrence occurrence);
int esxVI_GetManagedObjectReference(esxVI_ObjectContent *objectContent, int esxVI_GetManagedObjectReference(esxVI_ObjectContent *objectContent,
const char *propertyName, const char *propertyName,
esxVI_ManagedObjectReference **value, esxVI_ManagedObjectReference **value,
esxVI_Occurrence occurence); esxVI_Occurrence occurrence);
int esxVI_LookupNumberOfDomainsByPowerState int esxVI_LookupNumberOfDomainsByPowerState
(esxVI_Context *ctx, esxVI_VirtualMachinePowerState powerState, (esxVI_Context *ctx, esxVI_VirtualMachinePowerState powerState,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册