[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump mo
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command |
Date: |
Mon, 22 Apr 2013 19:03:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130311 Thunderbird/17.0.4 |
Il 22/04/2013 18:49, Anthony Liguori ha scritto:
>> We've been adding fields to types since 0.15, sometimes in the middle of
>> a struct (since 1.2).
>
> You can safely add fields to the end of a struct.
For QEMU->user structs it is. For user->QEMU structs you need to add a
sizeof() at the beginning, or ensure that everything is heap-allocated
(and zero-initialized).
At that point you could also use structs to pass arguments to the
functions (in the C client API) that execute a QMP command. That's
similar to having keyword arguments in C.
> Well this is all well and good in abstract, in practice, we want a new
> screendump command anyway.
>
> It'd be *much* nicer to return the screenshot data via the QMP session
> instead of writing it to a file. So let's take the opportunity to fix
> the command.
That's debatable... the "nicest" way could also be to pass a pipe fd and
retrieve the dump from that fd. That's quite easy to do with fdsets.
The choice is between implementing SCM_RIGHTS sendfd and a base64 decoder.
> We can also introduce a "format" parameter to allow specifying formats
> othe than PPM.
True, but I'm not sure we want to go there. We'd need to add support
for options like JPG quality factor etc.
Paolo
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, (continued)
Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Markus Armbruster, 2013/04/19
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Eric Blake, 2013/04/19
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Gerd Hoffmann, 2013/04/22
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Paolo Bonzini, 2013/04/22
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Luiz Capitulino, 2013/04/22
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Paolo Bonzini, 2013/04/22
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Anthony Liguori, 2013/04/22
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command,
Paolo Bonzini <=
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Eric Blake, 2013/04/22
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Gerd Hoffmann, 2013/04/23
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Anthony Liguori, 2013/04/22
- Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Gerd Hoffmann, 2013/04/23
Re: [Qemu-devel] [RfC PATCH 0/5] console: qom-ify & extent screendump monitor command, Anthony Liguori, 2013/04/25