From 2ff39a367738422c0ca1313cac8ff380e1fdd498 Mon Sep 17 00:00:00 2001 From: Ot ten Thije Date: Wed, 6 Oct 2010 17:48:15 +0100 Subject: Control state snapshots from Android console. This patch exposes Qemu's save, load, delete and list commands for state snapshots on the Android console. A level of indirection is added by means of the OutputChannel construct. This allows us to show the output of the Qemu commands on the console rather than on the monitor, while minimizing the differences with the upstream codebase. The new commands are exposed only when the configuration constant CONFIG_ANDROID_SNAPSHOTS is not 0. Change-Id: I558d5cd505d321fe2da5835713d341d151f60534 --- monitor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'monitor.c') diff --git a/monitor.c b/monitor.c index 9de414a..b0b6a7e 100644 --- a/monitor.c +++ b/monitor.c @@ -165,11 +165,13 @@ static void monitor_puts(Monitor *mon, const char *str) } } -void monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) +int monitor_vprintf(Monitor *mon, const char *fmt, va_list ap) { char buf[4096]; - vsnprintf(buf, sizeof(buf), fmt, ap); + int ret = vsnprintf(buf, sizeof(buf), fmt, ap); monitor_puts(mon, buf); + + return ret; } void monitor_printf(Monitor *mon, const char *fmt, ...) -- cgit v1.1