From: Eric Blake <eblake@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "Markus Armbruster (supporter:QAPI Schema)" <armbru@redhat.com>,
"Anthony Liguori (maintainer:Graphics)" <aliguori@us.ibm.com>,
alevy@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com
Subject: Re: [Qemu-devel] [RfC PATCH 2/2] console: add screendump-device qmp cmd
Date: Fri, 12 Jul 2013 11:06:18 -0600 [thread overview]
Message-ID: <51E0378A.7040502@redhat.com> (raw)
In-Reply-To: <1371477707-7039-3-git-send-email-kraxel@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2155 bytes --]
On 06/17/2013 08:01 AM, Gerd Hoffmann wrote:
> Adds a screendump-device qmp command, which has an additional 'device'
> parameter. This way it is possible to specify the device you want a
> screendump from.
>
> For the hmp monitor an optional device parameter has been added to the
> esisting screendump command.
>
> https://bugzilla.redhat.com/show_bug.cgi?id=903910
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> qapi-schema.json | 15 +++++++++++++++
> qmp-commands.hx | 25 +++++++++++++++++++++++++
> ui/console.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 92 insertions(+)
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index adcf801..719dc6e 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3125,6 +3125,21 @@
> { 'command': 'screendump', 'data': {'filename': 'str'} }
>
> ##
> +# @screendump-device:
> +#
> +# Write a PPM from the specified device to a file.
> +#
> +# @filename: the path of a new PPM file to store the image
> +# @device: #optional device to take the screenshot from
> +#
> +# Returns: Nothing on success
> +#
> +# Since: 1.6
> +##
> +{ 'command': 'screendump-device', 'data': {'filename': 'str',
> + '*device' : 'str' }}
Does this command need to return a job id, and does there need to be an
event when it is completed? Can filename include /dev/fdset (that is,
the file is opened via qemu_open, so we can use fd passing to pass in a
pipe fd rather than requiring a trip through the filesystem)?
> +
> +static void qmp_screendump_bh(void *opaque)
> +{
> + Error *local_err;
> + struct screendump_job *j = opaque;
> + DisplaySurface *surface;
> +
> + surface = qemu_console_surface(j->con);
> + ppm_save(j->filename, surface, &local_err);
Yes, ppm_save uses qemu_open(), so fd passing should be possible.
> + /* TODO: send qmp completion (or error) event */
Aha, this explains why it is still rfc.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 621 bytes --]
prev parent reply other threads:[~2013-07-12 17:06 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-17 14:01 [Qemu-devel] [RfC PATCH 0/2] new screendump qmp command Gerd Hoffmann
2013-06-17 14:01 ` [Qemu-devel] [RfC PATCH 1/2] display update with notification Gerd Hoffmann
2013-06-17 14:39 ` Anthony Liguori
2013-06-17 14:01 ` [Qemu-devel] [RfC PATCH 2/2] console: add screendump-device qmp cmd Gerd Hoffmann
2013-06-17 14:43 ` Anthony Liguori
2013-06-17 14:50 ` Luiz Capitulino
2013-06-18 9:24 ` Gerd Hoffmann
2013-06-18 13:13 ` Luiz Capitulino
2013-06-18 13:24 ` Gerd Hoffmann
2013-06-18 14:47 ` Stefan Hajnoczi
2013-06-25 10:28 ` Gerd Hoffmann
2013-07-12 17:01 ` Eric Blake
2013-07-12 17:06 ` Eric Blake [this message]
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=51E0378A.7040502@redhat.com \
--to=eblake@redhat.com \
--cc=alevy@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=armbru@redhat.com \
--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).