提交 83fb1de2 编写于 作者: L Luiz Capitulino 提交者: Anthony Liguori

monitor: Convert do_balloon() to QObject

It is important to note that it never fails, as big refactoring
of the virtio code would be needed to get the proper error code.

Patchworks-ID: 35349
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
上级 a1f896a0
......@@ -1602,8 +1602,10 @@ static void do_info_status(Monitor *mon)
monitor_printf(mon, "VM status: paused\n");
}
static void do_balloon(Monitor *mon, const QDict *qdict)
/**
* do_balloon(): Request VM to change its memory allocation
*/
static void do_balloon(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
int value = qdict_get_int(qdict, "value");
ram_addr_t target = value;
......
......@@ -874,7 +874,8 @@ ETEXI
.args_type = "value:i",
.params = "target",
.help = "request VM to change it's memory allocation (in MB)",
.mhandler.cmd = do_balloon,
.user_print = monitor_user_noop,
.mhandler.cmd_new = do_balloon,
},
STEXI
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册