Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
54e43dc3
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,发现更多精彩内容 >>
提交
54e43dc3
编写于
8月 14, 2013
作者:
J
Jim Fehlig
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
libxl: remove unnecessary curly braces
As per HACKING, remove some unneeded curly braces in the libxl driver.
上级
2576f178
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
14 addition
and
19 deletion
+14
-19
src/libxl/libxl_conf.c
src/libxl/libxl_conf.c
+5
-10
src/libxl/libxl_driver.c
src/libxl/libxl_driver.c
+9
-9
未找到文件。
src/libxl/libxl_conf.c
浏览文件 @
54e43dc3
...
@@ -246,9 +246,8 @@ libxlMakeCapabilitiesInternal(virArch hostarch,
...
@@ -246,9 +246,8 @@ libxlMakeCapabilitiesInternal(virArch hostarch,
/* Search for existing matching (model,hvm) tuple */
/* Search for existing matching (model,hvm) tuple */
for
(
i
=
0
;
i
<
nr_guest_archs
;
i
++
)
{
for
(
i
=
0
;
i
<
nr_guest_archs
;
i
++
)
{
if
((
guest_archs
[
i
].
arch
==
arch
)
&&
if
((
guest_archs
[
i
].
arch
==
arch
)
&&
guest_archs
[
i
].
hvm
==
hvm
)
{
guest_archs
[
i
].
hvm
==
hvm
)
break
;
break
;
}
}
}
/* Too many arch flavours - highly unlikely ! */
/* Too many arch flavours - highly unlikely ! */
...
@@ -916,21 +915,17 @@ libxlBuildDomainConfig(libxlDriverPrivatePtr driver,
...
@@ -916,21 +915,17 @@ libxlBuildDomainConfig(libxlDriverPrivatePtr driver,
if
(
libxlMakeDomCreateInfo
(
driver
,
def
,
&
d_config
->
c_info
)
<
0
)
if
(
libxlMakeDomCreateInfo
(
driver
,
def
,
&
d_config
->
c_info
)
<
0
)
return
-
1
;
return
-
1
;
if
(
libxlMakeDomBuildInfo
(
vm
,
d_config
)
<
0
)
{
if
(
libxlMakeDomBuildInfo
(
vm
,
d_config
)
<
0
)
return
-
1
;
return
-
1
;
}
if
(
libxlMakeDiskList
(
def
,
d_config
)
<
0
)
{
if
(
libxlMakeDiskList
(
def
,
d_config
)
<
0
)
return
-
1
;
return
-
1
;
}
if
(
libxlMakeNicList
(
def
,
d_config
)
<
0
)
{
if
(
libxlMakeNicList
(
def
,
d_config
)
<
0
)
return
-
1
;
return
-
1
;
}
if
(
libxlMakeVfbList
(
driver
,
def
,
d_config
)
<
0
)
{
if
(
libxlMakeVfbList
(
driver
,
def
,
d_config
)
<
0
)
return
-
1
;
return
-
1
;
}
d_config
->
on_reboot
=
def
->
onReboot
;
d_config
->
on_reboot
=
def
->
onReboot
;
d_config
->
on_poweroff
=
def
->
onPoweroff
;
d_config
->
on_poweroff
=
def
->
onPoweroff
;
...
...
src/libxl/libxl_driver.c
浏览文件 @
54e43dc3
...
@@ -301,13 +301,13 @@ libxlTimeoutRegisterEventHook(void *priv,
...
@@ -301,13 +301,13 @@ libxlTimeoutRegisterEventHook(void *priv,
gettimeofday
(
&
now
,
NULL
);
gettimeofday
(
&
now
,
NULL
);
timersub
(
&
abs_t
,
&
now
,
&
res
);
timersub
(
&
abs_t
,
&
now
,
&
res
);
/* Ensure timeout is not overflowed */
/* Ensure timeout is not overflowed */
if
(
timercmp
(
&
res
,
&
zero
,
<
))
{
if
(
timercmp
(
&
res
,
&
zero
,
<
))
timeout
=
0
;
timeout
=
0
;
}
else
if
(
res
.
tv_sec
>
INT_MAX
/
1000
)
{
else
if
(
res
.
tv_sec
>
INT_MAX
/
1000
)
timeout
=
INT_MAX
;
timeout
=
INT_MAX
;
}
else
{
else
timeout
=
res
.
tv_sec
*
1000
+
(
res
.
tv_usec
+
999
)
/
1000
;
timeout
=
res
.
tv_sec
*
1000
+
(
res
.
tv_usec
+
999
)
/
1000
;
}
info
->
id
=
virEventAddTimeout
(
timeout
,
libxlTimerCallback
,
info
->
id
=
virEventAddTimeout
(
timeout
,
libxlTimerCallback
,
info
,
libxlEventHookInfoFree
);
info
,
libxlEventHookInfoFree
);
if
(
info
->
id
<
0
)
{
if
(
info
->
id
<
0
)
{
...
@@ -1006,10 +1006,10 @@ libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
...
@@ -1006,10 +1006,10 @@ libxlVmStart(libxlDriverPrivatePtr driver, virDomainObjPtr vm,
virDomainObjAssignDef
(
vm
,
def
,
true
,
NULL
);
virDomainObjAssignDef
(
vm
,
def
,
true
,
NULL
);
def
=
NULL
;
def
=
NULL
;
if
(
unlink
(
managed_save_path
)
<
0
)
{
if
(
unlink
(
managed_save_path
)
<
0
)
VIR_WARN
(
"Failed to remove the managed state %s"
,
VIR_WARN
(
"Failed to remove the managed state %s"
,
managed_save_path
);
managed_save_path
);
}
vm
->
hasManagedSave
=
false
;
vm
->
hasManagedSave
=
false
;
}
}
VIR_FREE
(
managed_save_path
);
VIR_FREE
(
managed_save_path
);
...
@@ -4177,6 +4177,7 @@ libxlNodeGetCellsFreeMemory(virConnectPtr conn,
...
@@ -4177,6 +4177,7 @@ libxlNodeGetCellsFreeMemory(virConnectPtr conn,
else
else
freeMems
[
numCells
++
]
=
numa_info
[
n
].
free
;
freeMems
[
numCells
++
]
=
numa_info
[
n
].
free
;
}
}
ret
=
numCells
;
ret
=
numCells
;
cleanup:
cleanup:
...
@@ -4530,11 +4531,10 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
...
@@ -4530,11 +4531,10 @@ libxlDomainSetSchedulerParametersFlags(virDomainPtr dom,
for
(
i
=
0
;
i
<
nparams
;
++
i
)
{
for
(
i
=
0
;
i
<
nparams
;
++
i
)
{
virTypedParameterPtr
param
=
&
params
[
i
];
virTypedParameterPtr
param
=
&
params
[
i
];
if
(
STREQ
(
param
->
field
,
VIR_DOMAIN_SCHEDULER_WEIGHT
))
{
if
(
STREQ
(
param
->
field
,
VIR_DOMAIN_SCHEDULER_WEIGHT
))
sc_info
.
weight
=
params
[
i
].
value
.
ui
;
sc_info
.
weight
=
params
[
i
].
value
.
ui
;
}
else
if
(
STREQ
(
param
->
field
,
VIR_DOMAIN_SCHEDULER_CAP
))
{
else
if
(
STREQ
(
param
->
field
,
VIR_DOMAIN_SCHEDULER_CAP
))
sc_info
.
cap
=
params
[
i
].
value
.
ui
;
sc_info
.
cap
=
params
[
i
].
value
.
ui
;
}
}
}
if
(
libxl_domain_sched_params_set
(
priv
->
ctx
,
dom
->
id
,
&
sc_info
)
!=
0
)
{
if
(
libxl_domain_sched_params_set
(
priv
->
ctx
,
dom
->
id
,
&
sc_info
)
!=
0
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录