Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
82e119f5
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,发现更多精彩内容 >>
提交
82e119f5
编写于
5月 27, 2013
作者:
P
Peter Krempa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: Use bool instead of int in qemuMonitorSetCPU APIs
The 'online' parameter has only two possible values. Use a bool for it.
上级
36e073ad
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
8 addition
and
8 deletion
+8
-8
src/qemu/qemu_driver.c
src/qemu/qemu_driver.c
+2
-2
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.c
+1
-1
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor.h
+1
-1
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.c
+1
-1
src/qemu/qemu_monitor_json.h
src/qemu/qemu_monitor_json.h
+1
-1
src/qemu/qemu_monitor_text.c
src/qemu/qemu_monitor_text.c
+1
-1
src/qemu/qemu_monitor_text.h
src/qemu/qemu_monitor_text.h
+1
-1
未找到文件。
src/qemu/qemu_driver.c
浏览文件 @
82e119f5
...
...
@@ -3538,7 +3538,7 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
if
(
nvcpus
>
vcpus
)
{
for
(
i
=
vcpus
;
i
<
nvcpus
;
i
++
)
{
/* Online new CPU */
rc
=
qemuMonitorSetCPU
(
priv
->
mon
,
i
,
1
);
rc
=
qemuMonitorSetCPU
(
priv
->
mon
,
i
,
true
);
if
(
rc
==
0
)
goto
unsupported
;
if
(
rc
<
0
)
...
...
@@ -3549,7 +3549,7 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
}
else
{
for
(
i
=
vcpus
-
1
;
i
>=
nvcpus
;
i
--
)
{
/* Offline old CPU */
rc
=
qemuMonitorSetCPU
(
priv
->
mon
,
i
,
0
);
rc
=
qemuMonitorSetCPU
(
priv
->
mon
,
i
,
false
);
if
(
rc
==
0
)
goto
unsupported
;
if
(
rc
<
0
)
...
...
src/qemu/qemu_monitor.c
浏览文件 @
82e119f5
...
...
@@ -1670,7 +1670,7 @@ int qemuMonitorSetBalloon(qemuMonitorPtr mon,
}
int
qemuMonitorSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
int
online
)
int
qemuMonitorSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
)
{
int
ret
;
VIR_DEBUG
(
"mon=%p cpu=%d online=%d"
,
mon
,
cpu
,
online
);
...
...
src/qemu/qemu_monitor.h
浏览文件 @
82e119f5
...
...
@@ -299,7 +299,7 @@ int qemuMonitorExpirePassword(qemuMonitorPtr mon,
const
char
*
expire_time
);
int
qemuMonitorSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
);
int
qemuMonitorSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
int
online
);
int
qemuMonitorSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
);
/* XXX should we pass the virDomainDiskDefPtr instead
...
...
src/qemu/qemu_monitor_json.c
浏览文件 @
82e119f5
...
...
@@ -2076,7 +2076,7 @@ cleanup:
* or -1 on failure
*/
int
qemuMonitorJSONSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
int
online
)
int
cpu
,
bool
online
)
{
/* XXX Update to use QMP, if QMP ever adds support for cpu hotplug */
VIR_DEBUG
(
"no QMP support for cpu_set, trying HMP"
);
...
...
src/qemu/qemu_monitor_json.h
浏览文件 @
82e119f5
...
...
@@ -94,7 +94,7 @@ int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon,
const
char
*
expire_time
);
int
qemuMonitorJSONSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
);
int
qemuMonitorJSONSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
int
online
);
int
qemuMonitorJSONSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
);
int
qemuMonitorJSONEjectMedia
(
qemuMonitorPtr
mon
,
const
char
*
dev_name
,
...
...
src/qemu/qemu_monitor_text.c
浏览文件 @
82e119f5
...
...
@@ -1231,7 +1231,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
* Returns: 0 if CPU hotplug not supported, +1 if CPU hotplug worked
* or -1 on failure
*/
int
qemuMonitorTextSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
int
online
)
int
qemuMonitorTextSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
)
{
char
*
cmd
;
char
*
reply
=
NULL
;
...
...
src/qemu/qemu_monitor_text.h
浏览文件 @
82e119f5
...
...
@@ -90,7 +90,7 @@ int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
const
char
*
expire_time
);
int
qemuMonitorTextSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
);
int
qemuMonitorTextSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
int
online
);
int
qemuMonitorTextSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
);
int
qemuMonitorTextEjectMedia
(
qemuMonitorPtr
mon
,
const
char
*
dev_name
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录