From f771c5440e04626f1cf9a6a7d1b1c6cd8168cacd Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Mon, 5 Mar 2018 17:37:48 +0100 Subject: qapi: Add device ID and head parameters to screendump MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QEMU's screendump command can only take dumps from the primary display. When using multiple VGA cards, there is no way to get a dump from a secondary card or other display heads yet. So let's add a 'device' and a 'head' parameter to the HMP and QMP commands to be able to specify alternative devices and heads with the screendump command, too. Reviewed-by: Daniel P. Berrangé Acked-by: Dr. David Alan Gilbert Reviewed-by: Gerd Hoffmann Signed-off-by: Thomas Huth Reviewed-by: Eric Blake Message-id: 1520267868-31778-1-git-send-email-thuth@redhat.com Signed-off-by: Gerd Hoffmann --- hmp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'hmp.c') diff --git a/hmp.c b/hmp.c index 016cb5c4f1..ba9e299ee2 100644 --- a/hmp.c +++ b/hmp.c @@ -2140,9 +2140,11 @@ err_out: void hmp_screendump(Monitor *mon, const QDict *qdict) { const char *filename = qdict_get_str(qdict, "filename"); + const char *id = qdict_get_try_str(qdict, "device"); + int64_t head = qdict_get_try_int(qdict, "head", 0); Error *err = NULL; - qmp_screendump(filename, &err); + qmp_screendump(filename, id != NULL, id, id != NULL, head, &err); hmp_handle_error(mon, &err); } -- cgit v1.2.3