From: Alon Levy <alevy@redhat.com>
To: qemu-devel@nongnu.org, anthony@codemonkey.ws, kraxel@redhat.com,
lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH v3 1/3] monitor, console: add QEVENT_SCREEN_DUMP_COMPLETE
Date: Mon, 5 Mar 2012 17:56:27 +0200 [thread overview]
Message-ID: <1330962989-20077-2-git-send-email-alevy@redhat.com> (raw)
In-Reply-To: <1330962989-20077-1-git-send-email-alevy@redhat.com>
Signed-off-by: Alon Levy <alevy@redhat.com>
---
QMP/qmp-events.txt | 15 +++++++++++++++
console.c | 11 +++++++++++
console.h | 1 +
monitor.c | 2 ++
monitor.h | 1 +
5 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt
index 9286af5..49c8d77 100644
--- a/QMP/qmp-events.txt
+++ b/QMP/qmp-events.txt
@@ -335,3 +335,18 @@ Example:
"len": 10737418240, "offset": 134217728,
"speed": 0 },
"timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
+
+SCREEN_DUMP_COMPLETE
+--------------------
+
+Emitted when screen-dump-async completes.
+
+Data:
+
+- "filename": Name of file containing screen dump (json-string)
+
+Example:
+
+{ "event": "SCREEN_DUMP_COMPLETE",
+ "data": { "filename": "/tmp/a.ppm" },
+ "timestamp": { "seconds": 1267061043, "microseconds": 959568 } }
diff --git a/console.c b/console.c
index 6a463f5..beebced 100644
--- a/console.c
+++ b/console.c
@@ -24,6 +24,8 @@
#include "qemu-common.h"
#include "console.h"
#include "qemu-timer.h"
+#include "qjson.h"
+#include "monitor.h"
//#define DEBUG_CONSOLE
#define DEFAULT_BACKSCROLL 512
@@ -1707,3 +1709,12 @@ PixelFormat qemu_default_pixelformat(int bpp)
}
return pf;
}
+
+void monitor_protocol_screen_dump_complete_event(const char *filename)
+{
+ QObject *event_data;
+
+ event_data = qobject_from_jsonf("{ 'filename': %s }", filename);
+ monitor_protocol_event(QEVENT_SCREEN_DUMP_COMPLETE, event_data);
+ qobject_decref(event_data);
+}
diff --git a/console.h b/console.h
index a95b581..c22803c 100644
--- a/console.h
+++ b/console.h
@@ -353,6 +353,7 @@ void vga_hw_update(void);
void vga_hw_invalidate(void);
void vga_hw_screen_dump(const char *filename);
void vga_hw_text_update(console_ch_t *chardata);
+void monitor_protocol_screen_dump_complete_event(const char *filename);
int is_graphic_console(void);
int is_fixedsize_console(void);
diff --git a/monitor.c b/monitor.c
index cbdfbad..a8c84c0 100644
--- a/monitor.c
+++ b/monitor.c
@@ -493,6 +493,8 @@ void monitor_protocol_event(MonitorEvent event, QObject *data)
break;
case QEVENT_WAKEUP:
event_name = "WAKEUP";
+ case QEVENT_SCREEN_DUMP_COMPLETE:
+ event_name = "SCREEN_DUMP_COMPLETE";
break;
default:
abort();
diff --git a/monitor.h b/monitor.h
index 0d49800..227ebf2 100644
--- a/monitor.h
+++ b/monitor.h
@@ -41,6 +41,7 @@ typedef enum MonitorEvent {
QEVENT_DEVICE_TRAY_MOVED,
QEVENT_SUSPEND,
QEVENT_WAKEUP,
+ QEVENT_SCREEN_DUMP_COMPLETE,
QEVENT_MAX,
} MonitorEvent;
--
1.7.9.1
next prev parent reply other threads:[~2012-03-05 15:58 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 14:16 [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async Alon Levy
2012-03-05 14:16 ` [Qemu-devel] [PATCH v2 2/2] add qmp screendump-async Alon Levy
2012-03-05 14:33 ` [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async Anthony Liguori
2012-03-05 15:17 ` Alon Levy
2012-03-05 15:56 ` [Qemu-devel] [PATCH v3 0/3] screendump async command Alon Levy
2012-03-05 15:56 ` Alon Levy [this message]
2012-03-05 15:56 ` [Qemu-devel] [PATCH v3 2/3] console: add hw_screen_dump_async Alon Levy
2012-03-05 15:56 ` [Qemu-devel] [PATCH v3 3/3] add qmp screendump-async Alon Levy
2012-03-05 17:17 ` [Qemu-devel] [PATCH v3 0/3] screendump async command Anthony Liguori
2012-03-05 17:20 ` [Qemu-devel] [PATCH v2 1/2] console: add hw_screen_dump_async Avi Kivity
2012-03-05 17:27 ` Anthony Liguori
2012-03-05 17:29 ` Avi Kivity
2012-03-05 17:56 ` Luiz Capitulino
2012-03-05 18:16 ` Anthony Liguori
2012-03-05 18:22 ` Avi Kivity
2012-03-05 19:32 ` Anthony Liguori
2012-03-05 17:31 ` Luiz Capitulino
2012-03-05 18:09 ` Alon Levy
2012-03-05 18:17 ` Avi Kivity
2012-03-05 18:58 ` Alon Levy
2012-03-05 19:45 ` Luiz Capitulino
2012-03-06 7:36 ` Gerd Hoffmann
2012-03-06 7:43 ` Alon Levy
2012-03-06 7:56 ` Alon Levy
2012-03-06 8:10 ` Gerd Hoffmann
2012-03-06 9:35 ` Alon Levy
2012-03-06 12:24 ` Luiz Capitulino
2012-03-06 13:16 ` Alon Levy
2012-03-06 13:51 ` Anthony Liguori
2012-03-06 13:53 ` Luiz Capitulino
2012-03-06 14:23 ` Alon Levy
2012-03-06 15:07 ` Anthony Liguori
2012-03-06 15:56 ` Alon Levy
2012-03-06 16:02 ` Alon Levy
2012-03-06 16:16 ` Anthony Liguori
2012-03-06 16:26 ` Alon Levy
2012-03-06 16:47 ` Anthony Liguori
2012-03-07 6:57 ` Gerd Hoffmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1330962989-20077-2-git-send-email-alevy@redhat.com \
--to=alevy@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=kraxel@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).