提交 3b0bd6ec 编写于 作者: L Luiz Capitulino 提交者: Anthony Liguori

monitor: do_balloon(): Use 'M' argument type

This makes do_balloon() accept megabyte values from the user
Monitor while accepting byte values for QMP.
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 b6e098d7
......@@ -2083,8 +2083,7 @@ static void do_balloon(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
if (balloon_get_value()) {
/* ballooning is active */
ram_addr_t value = qdict_get_int(qdict, "value");
qemu_balloon(value << 20);
qemu_balloon(qdict_get_int(qdict, "value"));
}
}
......
......@@ -887,7 +887,7 @@ ETEXI
{
.name = "balloon",
.args_type = "value:i",
.args_type = "value:M",
.params = "target",
.help = "request VM to change it's memory allocation (in MB)",
.user_print = monitor_user_noop,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册