Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
0d4d04e5
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,发现更多精彩内容 >>
提交
0d4d04e5
编写于
9月 23, 2009
作者:
M
Matthias Bolte
提交者:
Daniel Veillard
9月 23, 2009
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ESX Whitespace cleanup
上级
15b0c4ff
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
31 addition
and
31 deletion
+31
-31
src/esx/esx_driver.c
src/esx/esx_driver.c
+10
-10
src/esx/esx_util.c
src/esx/esx_util.c
+6
-6
src/esx/esx_util.h
src/esx/esx_util.h
+2
-2
src/esx/esx_vi.c
src/esx/esx_vi.c
+2
-1
src/esx/esx_vi_types.c
src/esx/esx_vi_types.c
+5
-6
src/esx/esx_vi_types.h
src/esx/esx_vi_types.h
+6
-6
未找到文件。
src/esx/esx_driver.c
浏览文件 @
0d4d04e5
...
...
@@ -752,13 +752,13 @@ esxGetHostname(virConnectPtr conn)
}
}
if
(
hostName
==
NULL
||
strlen
(
hostName
)
<
1
)
{
if
(
hostName
==
NULL
||
strlen
(
hostName
)
<
1
)
{
ESX_ERROR
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"Missing or empty 'hostName' property"
);
goto
failure
;
}
if
(
domainName
==
NULL
||
strlen
(
domainName
)
<
1
)
{
if
(
domainName
==
NULL
||
strlen
(
domainName
)
<
1
)
{
ESX_ERROR
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"Missing or empty 'domainName' property"
);
goto
failure
;
...
...
@@ -800,7 +800,7 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
int32_t
numaInfo_numNodes
=
0
;
char
*
ptr
=
NULL
;
memset
(
nodeinfo
,
0
,
sizeof
(
virNodeInfo
));
memset
(
nodeinfo
,
0
,
sizeof
(
virNodeInfo
));
if
(
priv
->
phantom
)
{
ESX_ERROR
(
conn
,
VIR_ERR_OPERATION_INVALID
,
...
...
@@ -891,11 +891,11 @@ esxNodeGetInfo(virConnectPtr conn, virNodeInfoPtr nodeinfo)
/* Strip the string to fit more relevant information in 32 chars */
while
(
*
ptr
!=
'\0'
)
{
if
(
STRPREFIX
(
ptr
,
" "
))
{
memmove
(
ptr
,
ptr
+
1
,
strlen
(
ptr
+
1
)
+
1
);
if
(
STRPREFIX
(
ptr
,
" "
))
{
memmove
(
ptr
,
ptr
+
1
,
strlen
(
ptr
+
1
)
+
1
);
continue
;
}
else
if
(
STRPREFIX
(
ptr
,
"(R)"
)
||
STRPREFIX
(
ptr
,
"(C)"
))
{
memmove
(
ptr
,
ptr
+
3
,
strlen
(
ptr
+
3
)
+
1
);
memmove
(
ptr
,
ptr
+
3
,
strlen
(
ptr
+
3
)
+
1
);
continue
;
}
else
if
(
STRPREFIX
(
ptr
,
"(TM)"
))
{
memmove
(
ptr
,
ptr
+
4
,
strlen
(
ptr
+
4
)
+
1
);
...
...
@@ -1201,7 +1201,7 @@ esxDomainLookupByUUID(virConnectPtr conn, const unsigned char *uuid)
}
if
(
memcmp
(
uuid
,
uuid_candidate
,
VIR_UUID_BUFLEN
*
sizeof
(
unsigned
char
))
!=
0
)
{
VIR_UUID_BUFLEN
*
sizeof
(
unsigned
char
))
!=
0
)
{
continue
;
}
...
...
@@ -2737,7 +2737,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
dynamicProperty
!=
NULL
&&
mask
!=
7
&&
i
<
3
;
dynamicProperty
=
dynamicProperty
->
_next
)
{
if
(
STREQ
(
dynamicProperty
->
name
,
"config.cpuAllocation.reservation"
)
&&
!
(
mask
&
(
1
<<
0
)))
{
!
(
mask
&
(
1
<<
0
)))
{
snprintf
(
params
[
i
].
field
,
VIR_DOMAIN_SCHED_FIELD_LENGTH
,
"%s"
,
"reservation"
);
...
...
@@ -2753,7 +2753,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
++
i
;
}
else
if
(
STREQ
(
dynamicProperty
->
name
,
"config.cpuAllocation.limit"
)
&&
!
(
mask
&
(
1
<<
1
)))
{
!
(
mask
&
(
1
<<
1
)))
{
snprintf
(
params
[
i
].
field
,
VIR_DOMAIN_SCHED_FIELD_LENGTH
,
"%s"
,
"limit"
);
...
...
@@ -2769,7 +2769,7 @@ esxDomainGetSchedulerParameters(virDomainPtr domain,
++
i
;
}
else
if
(
STREQ
(
dynamicProperty
->
name
,
"config.cpuAllocation.shares"
)
&&
!
(
mask
&
(
1
<<
2
)))
{
!
(
mask
&
(
1
<<
2
)))
{
snprintf
(
params
[
i
].
field
,
VIR_DOMAIN_SCHED_FIELD_LENGTH
,
"%s"
,
"shares"
);
...
...
src/esx/esx_util.c
浏览文件 @
0d4d04e5
...
...
@@ -271,7 +271,7 @@ esxUtil_ResolveHostname(virConnectPtr conn, const char *hostname,
struct
addrinfo
*
result
=
NULL
;
int
errcode
;
memset
(
&
hints
,
0
,
sizeof
(
struct
addrinfo
));
memset
(
&
hints
,
0
,
sizeof
(
struct
addrinfo
));
hints
.
ai_flags
=
AI_ADDRCONFIG
;
hints
.
ai_family
=
AF_INET
;
...
...
@@ -455,12 +455,12 @@ esxUtil_GetConfigLong(virConnectPtr conn, virConfPtr conf, const char *name,
int
esxUtil_GetConfigBoolean
(
virConnectPtr
conn
,
virConfPtr
conf
,
const
char
*
name
,
int
*
bool
val
,
int
default_
,
const
char
*
name
,
int
*
bool
ean_
,
int
default_
,
int
optional
)
{
virConfValuePtr
value
;
*
bool
val
=
default_
;
*
bool
ean_
=
default_
;
value
=
virConfGetValue
(
conf
,
name
);
if
(
value
==
NULL
)
{
...
...
@@ -485,9 +485,9 @@ esxUtil_GetConfigBoolean(virConnectPtr conn, virConfPtr conf,
}
if
(
STRCASEEQ
(
value
->
str
,
"true"
))
{
*
bool
val
=
1
;
*
bool
ean_
=
1
;
}
else
if
(
STRCASEEQ
(
value
->
str
,
"false"
))
{
*
bool
val
=
0
;
*
bool
ean_
=
0
;
}
else
{
ESX_ERROR
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"Config entry '%s' must represent a boolean value "
...
...
@@ -506,7 +506,7 @@ esxUtil_GetConfigBoolean(virConnectPtr conn, virConfPtr conf,
int
esxUtil_EqualSuffix
(
const
char
*
string
,
const
char
*
suffix
)
esxUtil_EqualSuffix
(
const
char
*
string
,
const
char
*
suffix
)
{
int
difference
=
(
int
)
strlen
(
string
)
-
(
int
)
strlen
(
suffix
);
...
...
src/esx/esx_util.h
浏览文件 @
0d4d04e5
...
...
@@ -53,9 +53,9 @@ int esxUtil_GetConfigLong(virConnectPtr conn, virConfPtr conf, const char *name,
long
long
*
number
,
long
long
default_
,
int
optional
);
int
esxUtil_GetConfigBoolean
(
virConnectPtr
conn
,
virConfPtr
conf
,
const
char
*
name
,
int
*
boolean
,
int
default_
,
const
char
*
name
,
int
*
boolean
_
,
int
default_
,
int
optional
);
int
esxUtil_EqualSuffix
(
const
char
*
string
,
const
char
*
suffix
);
int
esxUtil_EqualSuffix
(
const
char
*
string
,
const
char
*
suffix
);
#endif
/* __ESX_UTIL_H__ */
src/esx/esx_vi.c
浏览文件 @
0d4d04e5
...
...
@@ -82,7 +82,7 @@
int \
esxVI_##_type##_Alloc(virConnectPtr conn, esxVI_##_type **ptrptr) \
{ \
return esxVI_Alloc(conn, (void **)ptrptr, sizeof
(esxVI_##_type));
\
return esxVI_Alloc(conn, (void **)ptrptr, sizeof
(esxVI_##_type));
\
}
#define ESX_VI__TEMPLATE__FREE(_type, _body) \
...
...
@@ -765,6 +765,7 @@ esxVI_Enumeration_Deserialize(virConnectPtr conn,
failure:
result
=
-
1
;
goto
cleanup
;
}
...
...
src/esx/esx_vi_types.c
浏览文件 @
0d4d04e5
...
...
@@ -66,7 +66,7 @@
int \
esxVI_##_type##_Alloc(virConnectPtr conn, esxVI_##_type **ptrptr) \
{ \
return esxVI_Alloc(conn, (void **)ptrptr, sizeof
(esxVI_##_type));
\
return esxVI_Alloc(conn, (void **)ptrptr, sizeof
(esxVI_##_type));
\
}
...
...
@@ -133,7 +133,7 @@
#define ESX_VI__TEMPLATE__LIST__SERIALIZE(_type) \
int \
esxVI_##_type##_SerializeList(virConnectPtr conn, esxVI_##_type *list, \
const char
*
element, virBufferPtr output, \
const char
*
element, virBufferPtr output, \
esxVI_Boolean required) \
{ \
return esxVI_List_Serialize(conn, (esxVI_List *)list, \
...
...
@@ -291,7 +291,7 @@
if (value < (_min) || value > (_max)) { \
ESX_VI_ERROR(conn, VIR_ERR_INTERNAL_ERROR, \
"Value '%s' is not representable as "_xsdType, \
(const char *)
string);
\
(const char *)
string);
\
goto failure; \
} \
\
...
...
@@ -1010,7 +1010,6 @@ ESX_VI__TEMPLATE__SERIALIZE_EXTRA(Long, "xsd:long",
/* esxVI_Long_SerializeList */
ESX_VI__TEMPLATE__LIST__SERIALIZE
(
Long
);
/* esxVI_Long_Deserialize */
ESX_VI__TEMPLATE__DESERIALIZE_NUMBER
(
Long
,
"xsd:long"
,
INT64_MIN
,
INT64_MAX
);
...
...
@@ -1394,7 +1393,7 @@ esxVI_ManagedObjectReference_Deserialize
}
if
(
expectedType
!=
NULL
&&
!
STR
EQ
(
expectedType
,
(
*
managedObjectReference
)
->
type
))
{
STRN
EQ
(
expectedType
,
(
*
managedObjectReference
)
->
type
))
{
ESX_VI_ERROR
(
conn
,
VIR_ERR_INTERNAL_ERROR
,
"Expected type '%s' but found '%s'"
,
expectedType
,
(
*
managedObjectReference
)
->
type
);
...
...
@@ -1615,7 +1614,7 @@ esxVI_TraversalSpec_Alloc(virConnectPtr conn,
esxVI_TraversalSpec
**
traversalSpec
)
{
if
(
esxVI_Alloc
(
conn
,
(
void
**
)
traversalSpec
,
sizeof
(
esxVI_TraversalSpec
))
<
0
)
{
sizeof
(
esxVI_TraversalSpec
))
<
0
)
{
return
-
1
;
}
...
...
src/esx/esx_vi_types.h
浏览文件 @
0d4d04e5
...
...
@@ -1157,13 +1157,13 @@ int esxVI_PerfCounterInfo_DeserializeList
struct
_esxVI_PerfQuerySpec
{
esxVI_PerfQuerySpec
*
_next
;
/* optional */
esxVI_ManagedObjectReference
*
entity
;
/* required */
esxVI_DateTime
*
startTime
;
/* optional */
esxVI_DateTime
*
endTime
;
/* optional */
esxVI_ManagedObjectReference
*
entity
;
/* required */
esxVI_DateTime
*
startTime
;
/* optional */
esxVI_DateTime
*
endTime
;
/* optional */
esxVI_Int
*
maxSample
;
/* optional */
esxVI_PerfMetricId
*
metricId
;
/* optional, list */
esxVI_Int
*
intervalId
;
/* optional */
char
*
format
;
/* optional */
// FIXME: see PerfFormat
char
*
format
;
/* optional */
// FIXME: see PerfFormat
};
int
esxVI_PerfQuerySpec_Alloc
(
virConnectPtr
conn
,
...
...
@@ -1187,8 +1187,8 @@ int esxVI_PerfQuerySpec_SerializeList(virConnectPtr conn,
struct
_esxVI_PerfSampleInfo
{
esxVI_PerfSampleInfo
*
_next
;
/* optional */
esxVI_DateTime
*
timestamp
;
/* required */
esxVI_Int
*
interval
;
/* required */
esxVI_DateTime
*
timestamp
;
/* required */
esxVI_Int
*
interval
;
/* required */
};
int
esxVI_PerfSampleInfo_Alloc
(
virConnectPtr
conn
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录