Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
af253617
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
You need to sign in or sign up before continuing.
提交
af253617
编写于
1月 31, 2010
作者:
M
Matthias Bolte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
esx: Remove unnecessary casts
上级
376b311d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
37 addition
and
37 deletion
+37
-37
src/esx/esx_driver.c
src/esx/esx_driver.c
+37
-37
未找到文件。
src/esx/esx_driver.c
浏览文件 @
af253617
...
@@ -558,7 +558,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
...
@@ -558,7 +558,7 @@ esxOpen(virConnectPtr conn, virConnectAuthPtr auth, int flags ATTRIBUTE_UNUSED)
static
int
static
int
esxClose
(
virConnectPtr
conn
)
esxClose
(
virConnectPtr
conn
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_EnsureSession
(
priv
->
host
);
esxVI_EnsureSession
(
priv
->
host
);
...
@@ -645,7 +645,7 @@ esxSupportsVMotion(esxPrivate *priv)
...
@@ -645,7 +645,7 @@ esxSupportsVMotion(esxPrivate *priv)
static
int
static
int
esxSupportsFeature
(
virConnectPtr
conn
,
int
feature
)
esxSupportsFeature
(
virConnectPtr
conn
,
int
feature
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_Boolean
supportsVMotion
=
esxVI_Boolean_Undefined
;
esxVI_Boolean
supportsVMotion
=
esxVI_Boolean_Undefined
;
switch
(
feature
)
{
switch
(
feature
)
{
...
@@ -678,7 +678,7 @@ esxGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
...
@@ -678,7 +678,7 @@ esxGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
static
int
static
int
esxGetVersion
(
virConnectPtr
conn
,
unsigned
long
*
version
)
esxGetVersion
(
virConnectPtr
conn
,
unsigned
long
*
version
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
char
*
temp
;
char
*
temp
;
unsigned
int
major
,
minor
,
release
;
unsigned
int
major
,
minor
,
release
;
...
@@ -716,7 +716,7 @@ esxGetVersion(virConnectPtr conn, unsigned long *version)
...
@@ -716,7 +716,7 @@ esxGetVersion(virConnectPtr conn, unsigned long *version)
static
char
*
static
char
*
esxGetHostname
(
virConnectPtr
conn
)
esxGetHostname
(
virConnectPtr
conn
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
...
@@ -805,7 +805,7 @@ static int
...
@@ -805,7 +805,7 @@ static int
esxNodeGetInfo
(
virConnectPtr
conn
,
virNodeInfoPtr
nodeinfo
)
esxNodeGetInfo
(
virConnectPtr
conn
,
virNodeInfoPtr
nodeinfo
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
...
@@ -958,7 +958,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
...
@@ -958,7 +958,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
static
char
*
static
char
*
esxGetCapabilities
(
virConnectPtr
conn
)
esxGetCapabilities
(
virConnectPtr
conn
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
char
*
xml
=
virCapabilitiesFormatXML
(
priv
->
caps
);
char
*
xml
=
virCapabilitiesFormatXML
(
priv
->
caps
);
if
(
xml
==
NULL
)
{
if
(
xml
==
NULL
)
{
...
@@ -974,7 +974,7 @@ esxGetCapabilities(virConnectPtr conn)
...
@@ -974,7 +974,7 @@ esxGetCapabilities(virConnectPtr conn)
static
int
static
int
esxListDomains
(
virConnectPtr
conn
,
int
*
ids
,
int
maxids
)
esxListDomains
(
virConnectPtr
conn
,
int
*
ids
,
int
maxids
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
...
@@ -1046,7 +1046,7 @@ esxListDomains(virConnectPtr conn, int *ids, int maxids)
...
@@ -1046,7 +1046,7 @@ esxListDomains(virConnectPtr conn, int *ids, int maxids)
static
int
static
int
esxNumberOfDomains
(
virConnectPtr
conn
)
esxNumberOfDomains
(
virConnectPtr
conn
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
if
(
esxVI_EnsureSession
(
priv
->
host
)
<
0
)
{
if
(
esxVI_EnsureSession
(
priv
->
host
)
<
0
)
{
return
-
1
;
return
-
1
;
...
@@ -1062,7 +1062,7 @@ esxNumberOfDomains(virConnectPtr conn)
...
@@ -1062,7 +1062,7 @@ esxNumberOfDomains(virConnectPtr conn)
static
virDomainPtr
static
virDomainPtr
esxDomainLookupByID
(
virConnectPtr
conn
,
int
id
)
esxDomainLookupByID
(
virConnectPtr
conn
,
int
id
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
...
@@ -1145,7 +1145,7 @@ esxDomainLookupByID(virConnectPtr conn, int id)
...
@@ -1145,7 +1145,7 @@ esxDomainLookupByID(virConnectPtr conn, int id)
static
virDomainPtr
static
virDomainPtr
esxDomainLookupByUUID
(
virConnectPtr
conn
,
const
unsigned
char
*
uuid
)
esxDomainLookupByUUID
(
virConnectPtr
conn
,
const
unsigned
char
*
uuid
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
esxVI_VirtualMachinePowerState
powerState
;
...
@@ -1199,7 +1199,7 @@ esxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
...
@@ -1199,7 +1199,7 @@ esxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
static
virDomainPtr
static
virDomainPtr
esxDomainLookupByName
(
virConnectPtr
conn
,
const
char
*
name
)
esxDomainLookupByName
(
virConnectPtr
conn
,
const
char
*
name
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
...
@@ -1283,7 +1283,7 @@ static int
...
@@ -1283,7 +1283,7 @@ static int
esxDomainSuspend
(
virDomainPtr
domain
)
esxDomainSuspend
(
virDomainPtr
domain
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
esxVI_VirtualMachinePowerState
powerState
;
...
@@ -1338,7 +1338,7 @@ static int
...
@@ -1338,7 +1338,7 @@ static int
esxDomainResume
(
virDomainPtr
domain
)
esxDomainResume
(
virDomainPtr
domain
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
esxVI_VirtualMachinePowerState
powerState
;
...
@@ -1393,7 +1393,7 @@ static int
...
@@ -1393,7 +1393,7 @@ static int
esxDomainShutdown
(
virDomainPtr
domain
)
esxDomainShutdown
(
virDomainPtr
domain
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
esxVI_VirtualMachinePowerState
powerState
;
...
@@ -1438,7 +1438,7 @@ static int
...
@@ -1438,7 +1438,7 @@ static int
esxDomainReboot
(
virDomainPtr
domain
,
unsigned
int
flags
ATTRIBUTE_UNUSED
)
esxDomainReboot
(
virDomainPtr
domain
,
unsigned
int
flags
ATTRIBUTE_UNUSED
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
esxVI_VirtualMachinePowerState
powerState
;
...
@@ -1483,7 +1483,7 @@ static int
...
@@ -1483,7 +1483,7 @@ static int
esxDomainDestroy
(
virDomainPtr
domain
)
esxDomainDestroy
(
virDomainPtr
domain
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_Context
*
ctx
=
NULL
;
esxVI_Context
*
ctx
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
...
@@ -1559,7 +1559,7 @@ esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
...
@@ -1559,7 +1559,7 @@ esxDomainGetOSType(virDomainPtr domain ATTRIBUTE_UNUSED)
static
unsigned
long
static
unsigned
long
esxDomainGetMaxMemory
(
virDomainPtr
domain
)
esxDomainGetMaxMemory
(
virDomainPtr
domain
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
...
@@ -1616,7 +1616,7 @@ static int
...
@@ -1616,7 +1616,7 @@ static int
esxDomainSetMaxMemory
(
virDomainPtr
domain
,
unsigned
long
memory
)
esxDomainSetMaxMemory
(
virDomainPtr
domain
,
unsigned
long
memory
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
esxVI_ManagedObjectReference
*
task
=
NULL
;
esxVI_ManagedObjectReference
*
task
=
NULL
;
...
@@ -1669,7 +1669,7 @@ static int
...
@@ -1669,7 +1669,7 @@ static int
esxDomainSetMemory
(
virDomainPtr
domain
,
unsigned
long
memory
)
esxDomainSetMemory
(
virDomainPtr
domain
,
unsigned
long
memory
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
esxVI_ManagedObjectReference
*
task
=
NULL
;
esxVI_ManagedObjectReference
*
task
=
NULL
;
...
@@ -1723,7 +1723,7 @@ static int
...
@@ -1723,7 +1723,7 @@ static int
esxDomainGetInfo
(
virDomainPtr
domain
,
virDomainInfoPtr
info
)
esxDomainGetInfo
(
virDomainPtr
domain
,
virDomainInfoPtr
info
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
...
@@ -1978,7 +1978,7 @@ static int
...
@@ -1978,7 +1978,7 @@ static int
esxDomainSetVcpus
(
virDomainPtr
domain
,
unsigned
int
nvcpus
)
esxDomainSetVcpus
(
virDomainPtr
domain
,
unsigned
int
nvcpus
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
int
maxVcpus
;
int
maxVcpus
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
...
@@ -2050,7 +2050,7 @@ esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
...
@@ -2050,7 +2050,7 @@ esxDomainSetVcpus(virDomainPtr domain, unsigned int nvcpus)
static
int
static
int
esxDomainGetMaxVcpus
(
virDomainPtr
domain
)
esxDomainGetMaxVcpus
(
virDomainPtr
domain
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
...
@@ -2109,7 +2109,7 @@ esxDomainGetMaxVcpus(virDomainPtr domain)
...
@@ -2109,7 +2109,7 @@ esxDomainGetMaxVcpus(virDomainPtr domain)
static
char
*
static
char
*
esxDomainDumpXML
(
virDomainPtr
domain
,
int
flags
)
esxDomainDumpXML
(
virDomainPtr
domain
,
int
flags
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
...
@@ -2211,7 +2211,7 @@ esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
...
@@ -2211,7 +2211,7 @@ esxDomainXMLFromNative(virConnectPtr conn, const char *nativeFormat,
const
char
*
nativeConfig
,
const
char
*
nativeConfig
,
unsigned
int
flags
ATTRIBUTE_UNUSED
)
unsigned
int
flags
ATTRIBUTE_UNUSED
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
virDomainDefPtr
def
=
NULL
;
virDomainDefPtr
def
=
NULL
;
char
*
xml
=
NULL
;
char
*
xml
=
NULL
;
...
@@ -2240,7 +2240,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
...
@@ -2240,7 +2240,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
const
char
*
domainXml
,
const
char
*
domainXml
,
unsigned
int
flags
ATTRIBUTE_UNUSED
)
unsigned
int
flags
ATTRIBUTE_UNUSED
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
virDomainDefPtr
def
=
NULL
;
virDomainDefPtr
def
=
NULL
;
char
*
vmx
=
NULL
;
char
*
vmx
=
NULL
;
...
@@ -2268,7 +2268,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
...
@@ -2268,7 +2268,7 @@ esxDomainXMLToNative(virConnectPtr conn, const char *nativeFormat,
static
int
static
int
esxListDefinedDomains
(
virConnectPtr
conn
,
char
**
const
names
,
int
maxnames
)
esxListDefinedDomains
(
virConnectPtr
conn
,
char
**
const
names
,
int
maxnames
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachineList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
...
@@ -2358,7 +2358,7 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
...
@@ -2358,7 +2358,7 @@ esxListDefinedDomains(virConnectPtr conn, char **const names, int maxnames)
static
int
static
int
esxNumberOfDefinedDomains
(
virConnectPtr
conn
)
esxNumberOfDefinedDomains
(
virConnectPtr
conn
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
if
(
esxVI_EnsureSession
(
priv
->
host
)
<
0
)
{
if
(
esxVI_EnsureSession
(
priv
->
host
)
<
0
)
{
return
-
1
;
return
-
1
;
...
@@ -2375,7 +2375,7 @@ static int
...
@@ -2375,7 +2375,7 @@ static int
esxDomainCreate
(
virDomainPtr
domain
)
esxDomainCreate
(
virDomainPtr
domain
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
esxVI_VirtualMachinePowerState
powerState
;
...
@@ -2430,7 +2430,7 @@ esxDomainCreate(virDomainPtr domain)
...
@@ -2430,7 +2430,7 @@ esxDomainCreate(virDomainPtr domain)
static
virDomainPtr
static
virDomainPtr
esxDomainDefineXML
(
virConnectPtr
conn
,
const
char
*
xml
ATTRIBUTE_UNUSED
)
esxDomainDefineXML
(
virConnectPtr
conn
,
const
char
*
xml
ATTRIBUTE_UNUSED
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
virDomainDefPtr
def
=
NULL
;
virDomainDefPtr
def
=
NULL
;
char
*
vmx
=
NULL
;
char
*
vmx
=
NULL
;
int
i
;
int
i
;
...
@@ -2638,7 +2638,7 @@ static int
...
@@ -2638,7 +2638,7 @@ static int
esxDomainUndefine
(
virDomainPtr
domain
)
esxDomainUndefine
(
virDomainPtr
domain
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_Context
*
ctx
=
NULL
;
esxVI_Context
*
ctx
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
...
@@ -2740,7 +2740,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
...
@@ -2740,7 +2740,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr
params
,
int
*
nparams
)
virSchedParameterPtr
params
,
int
*
nparams
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
esxVI_DynamicProperty
*
dynamicProperty
=
NULL
;
...
@@ -2869,7 +2869,7 @@ esxDomainSetSchedulerParameters(virDomainPtr domain,
...
@@ -2869,7 +2869,7 @@ esxDomainSetSchedulerParameters(virDomainPtr domain,
virSchedParameterPtr
params
,
int
nparams
)
virSchedParameterPtr
params
,
int
nparams
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
esxVI_VirtualMachineConfigSpec
*
spec
=
NULL
;
esxVI_SharesInfo
*
sharesInfo
=
NULL
;
esxVI_SharesInfo
*
sharesInfo
=
NULL
;
...
@@ -3040,7 +3040,7 @@ esxDomainMigratePerform(virDomainPtr domain,
...
@@ -3040,7 +3040,7 @@ esxDomainMigratePerform(virDomainPtr domain,
unsigned
long
bandwidth
ATTRIBUTE_UNUSED
)
unsigned
long
bandwidth
ATTRIBUTE_UNUSED
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
xmlURIPtr
xmlUri
=
NULL
;
xmlURIPtr
xmlUri
=
NULL
;
char
hostIpAddress
[
NI_MAXHOST
]
=
""
;
char
hostIpAddress
[
NI_MAXHOST
]
=
""
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
...
@@ -3171,7 +3171,7 @@ static unsigned long long
...
@@ -3171,7 +3171,7 @@ static unsigned long long
esxNodeGetFreeMemory
(
virConnectPtr
conn
)
esxNodeGetFreeMemory
(
virConnectPtr
conn
)
{
{
unsigned
long
long
result
=
0
;
unsigned
long
long
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_ObjectContent
*
hostSystem
=
NULL
;
esxVI_ManagedObjectReference
*
managedObjectReference
=
NULL
;
esxVI_ManagedObjectReference
*
managedObjectReference
=
NULL
;
...
@@ -3249,7 +3249,7 @@ esxNodeGetFreeMemory(virConnectPtr conn)
...
@@ -3249,7 +3249,7 @@ esxNodeGetFreeMemory(virConnectPtr conn)
static
int
static
int
esxIsEncrypted
(
virConnectPtr
conn
)
esxIsEncrypted
(
virConnectPtr
conn
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
if
(
STRCASEEQ
(
priv
->
transport
,
"https"
))
{
if
(
STRCASEEQ
(
priv
->
transport
,
"https"
))
{
return
1
;
return
1
;
...
@@ -3263,7 +3263,7 @@ esxIsEncrypted(virConnectPtr conn)
...
@@ -3263,7 +3263,7 @@ esxIsEncrypted(virConnectPtr conn)
static
int
static
int
esxIsSecure
(
virConnectPtr
conn
)
esxIsSecure
(
virConnectPtr
conn
)
{
{
esxPrivate
*
priv
=
(
esxPrivate
*
)
conn
->
privateData
;
esxPrivate
*
priv
=
conn
->
privateData
;
if
(
STRCASEEQ
(
priv
->
transport
,
"https"
))
{
if
(
STRCASEEQ
(
priv
->
transport
,
"https"
))
{
return
1
;
return
1
;
...
@@ -3278,7 +3278,7 @@ static int
...
@@ -3278,7 +3278,7 @@ static int
esxDomainIsActive
(
virDomainPtr
domain
)
esxDomainIsActive
(
virDomainPtr
domain
)
{
{
int
result
=
0
;
int
result
=
0
;
esxPrivate
*
priv
=
(
esxPrivate
*
)
domain
->
conn
->
privateData
;
esxPrivate
*
priv
=
domain
->
conn
->
privateData
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_ObjectContent
*
virtualMachine
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_String
*
propertyNameList
=
NULL
;
esxVI_VirtualMachinePowerState
powerState
;
esxVI_VirtualMachinePowerState
powerState
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录