Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
987b7077
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,发现更多精彩内容 >>
提交
987b7077
编写于
5月 27, 2015
作者:
P
Peter Krempa
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: monitor: Make qemuMonitorSetBalloon operate on unsinged long long
上级
efe8b44a
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
19 addition
and
19 deletion
+19
-19
src/qemu/qemu_monitor.c
src/qemu/qemu_monitor.c
+6
-2
src/qemu/qemu_monitor.h
src/qemu/qemu_monitor.h
+1
-1
src/qemu/qemu_monitor_json.c
src/qemu/qemu_monitor_json.c
+5
-7
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
+5
-7
src/qemu/qemu_monitor_text.h
src/qemu/qemu_monitor_text.h
+1
-1
未找到文件。
src/qemu/qemu_monitor.c
浏览文件 @
987b7077
...
...
@@ -2022,11 +2022,15 @@ qemuMonitorExpirePassword(qemuMonitorPtr mon,
}
/*
* Returns: 0 if balloon not supported, +1 if balloon adjust worked
* or -1 on failure
*/
int
qemuMonitorSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
)
unsigned
long
long
newmem
)
{
VIR_DEBUG
(
"newmem=%lu"
,
newmem
);
VIR_DEBUG
(
"newmem=%l
l
u"
,
newmem
);
QEMU_CHECK_MONITOR
(
mon
);
...
...
src/qemu/qemu_monitor.h
浏览文件 @
987b7077
...
...
@@ -401,7 +401,7 @@ int qemuMonitorExpirePassword(qemuMonitorPtr mon,
int
type
,
const
char
*
expire_time
);
int
qemuMonitorSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
);
unsigned
long
long
newmem
);
int
qemuMonitorSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
);
...
...
src/qemu/qemu_monitor_json.c
浏览文件 @
987b7077
...
...
@@ -2175,16 +2175,14 @@ int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon,
return
ret
;
}
/*
* Returns: 0 if balloon not supported, +1 if balloon adjust worked
* or -1 on failure
*/
int
qemuMonitorJSONSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
)
int
qemuMonitorJSONSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
long
newmem
)
{
int
ret
;
virJSONValuePtr
cmd
=
qemuMonitorJSONMakeCommand
(
"balloon"
,
"U:value"
,
((
unsigned
long
long
)
newmem
)
*
1024
,
"U:value"
,
newmem
*
1024
,
NULL
);
virJSONValuePtr
reply
=
NULL
;
if
(
!
cmd
)
...
...
src/qemu/qemu_monitor_json.h
浏览文件 @
987b7077
...
...
@@ -94,7 +94,7 @@ int qemuMonitorJSONExpirePassword(qemuMonitorPtr mon,
const
char
*
protocol
,
const
char
*
expire_time
);
int
qemuMonitorJSONSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
);
unsigned
long
long
newmem
);
int
qemuMonitorJSONSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
);
int
qemuMonitorJSONEjectMedia
(
qemuMonitorPtr
mon
,
...
...
src/qemu/qemu_monitor_text.c
浏览文件 @
987b7077
...
...
@@ -1110,12 +1110,10 @@ int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
return
ret
;
}
/*
* Returns: 0 if balloon not supported, +1 if balloon adjust worked
* or -1 on failure
*/
int
qemuMonitorTextSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
)
int
qemuMonitorTextSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
long
newmem
)
{
char
*
cmd
;
char
*
reply
=
NULL
;
...
...
@@ -1125,7 +1123,7 @@ int qemuMonitorTextSetBalloon(qemuMonitorPtr mon,
* 'newmem' is in KB, QEMU monitor works in MB, and we all wish
* we just worked in bytes with unsigned long long everywhere.
*/
if
(
virAsprintf
(
&
cmd
,
"balloon %lu"
,
VIR_DIV_UP
(
newmem
,
1024
))
<
0
)
if
(
virAsprintf
(
&
cmd
,
"balloon %l
l
u"
,
VIR_DIV_UP
(
newmem
,
1024
))
<
0
)
return
-
1
;
if
(
qemuMonitorHMPCommand
(
mon
,
cmd
,
&
reply
)
<
0
)
{
...
...
src/qemu/qemu_monitor_text.h
浏览文件 @
987b7077
...
...
@@ -79,7 +79,7 @@ int qemuMonitorTextExpirePassword(qemuMonitorPtr mon,
const
char
*
protocol
,
const
char
*
expire_time
);
int
qemuMonitorTextSetBalloon
(
qemuMonitorPtr
mon
,
unsigned
long
newmem
);
unsigned
long
long
newmem
);
int
qemuMonitorTextSetCPU
(
qemuMonitorPtr
mon
,
int
cpu
,
bool
online
);
int
qemuMonitorTextEjectMedia
(
qemuMonitorPtr
mon
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录