aboutsummaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-06-16 18:58:02 +0100
committerPeter Maydell <peter.maydell@linaro.org>2014-06-23 16:20:42 +0100
commit4e9cc7dda298b9292b722d7a42900825e1307b8a (patch)
tree8b5080b7964e7b304409cffe61e29ac9784a1b1b /monitor.c
parenta237a3365efb3c319d37040e42b8a43a854be7f9 (diff)
android-console: Implement quit
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/monitor.c b/monitor.c
index c9f4a245c7..3b9dbfbe6a 100644
--- a/monitor.c
+++ b/monitor.c
@@ -5048,6 +5048,20 @@ void monitor_resume(Monitor *mon)
readline_show_prompt(mon->rs);
}
+/**
+ * monitor_disconnect() : Disconnect the monitor connection
+ *
+ * Close this monitor connection, if we can, with the same behaviour
+ * as if the other end itself had closed it (eg, we will go back
+ * to listening on the TCP socket).
+ * File descriptor cleanup happens when the char backend sends us
+ * the CHR_EVENT_CLOSED event.
+ */
+int monitor_disconnect(Monitor *mon)
+{
+ return qemu_chr_del_client(mon->chr);
+}
+
static QObject *get_qmp_greeting(void)
{
QObject *ver = NULL;