Revision cc1d9c70 monitor.c
b/monitor.c | ||
---|---|---|
1633 | 1633 |
qemu_balloon(target << 20); |
1634 | 1634 |
} |
1635 | 1635 |
|
1636 |
static void do_info_balloon(Monitor *mon) |
|
1636 |
static void monitor_print_balloon(Monitor *mon, const QObject *data) |
|
1637 |
{ |
|
1638 |
monitor_printf(mon, "balloon: actual=%d\n", |
|
1639 |
(int)qint_get_int(qobject_to_qint(data))); |
|
1640 |
} |
|
1641 |
|
|
1642 |
/** |
|
1643 |
* do_info_balloon(): Balloon information |
|
1644 |
*/ |
|
1645 |
static void do_info_balloon(Monitor *mon, QObject **ret_data) |
|
1637 | 1646 |
{ |
1638 | 1647 |
ram_addr_t actual; |
1639 | 1648 |
|
... | ... | |
1644 | 1653 |
else if (actual == 0) |
1645 | 1654 |
monitor_printf(mon, "Ballooning not activated in VM\n"); |
1646 | 1655 |
else |
1647 |
monitor_printf(mon, "balloon: actual=%d\n", (int)(actual >> 20));
|
|
1656 |
*ret_data = QOBJECT(qint_from_int((int)(actual >> 20)));
|
|
1648 | 1657 |
} |
1649 | 1658 |
|
1650 | 1659 |
static qemu_acl *find_acl(Monitor *mon, const char *name) |
... | ... | |
2107 | 2116 |
.args_type = "", |
2108 | 2117 |
.params = "", |
2109 | 2118 |
.help = "show balloon information", |
2110 |
.mhandler.info = do_info_balloon, |
|
2119 |
.user_print = monitor_print_balloon, |
|
2120 |
.mhandler.info_new = do_info_balloon, |
|
2111 | 2121 |
}, |
2112 | 2122 |
{ |
2113 | 2123 |
.name = "qtree", |
Also available in: Unified diff