qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2] chardev: add hotplug support.
Date: Mon, 15 Oct 2012 11:36:44 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:16.0) Gecko/20121009 Thunderbird/16.0

On 10/15/2012 12:51 AM, Lei Li wrote:
> On 10/12/2012 08:39 PM, Gerd Hoffmann wrote:
>> This patch adds chardev_add and chardev_del monitor commands.
>>
>> chardev_del is pretty straight forward, it just takes an id argument and
>> zaps the chardev specified.
>>
>> chardev_add is more tricky as there are tons of arguments for the
>> different backends.  The hmp version limited to the most common use
>> cases, especially when it comes to sockets:  You can only specify port
>> (tcp) or path (unix) and qemu will create a listening socket.  For
>> example this ...
>>
>>     (qemu) chardev_add foo socket 42
>>
>> ... will do the same as ...
>>
>>     -chardev socket,id=foo,port=42,server,nowait
>>
>> on the qemu command line.
>>
>> The qmp version has full support for everything the -chardev command
>> line switch can handle.  The implementation is pretty straight
>> forward: It just puts all arguments it got into a QemuOpts, then goes
>> call qemu_chr_new_from_opts().
>>
>> Signed-off-by: Gerd Hoffmann <address@hidden>

>> +++ b/qapi-schema.json
>> @@ -2796,3 +2796,42 @@
>>   # Since: 0.14.0
>>   ##
>>   { 'command': 'screendump', 'data': {'filename': 'str'} }
>> +
>> +##
>> +# @chardev_add:

The QMP command should be named 'chardev-add'.

>> +#
>> +# Add a chardev
>> +#
>> +# @id: the chardev's ID, must be unique
>> +# @backend: the chardev backend: "file", "socket", ...

Rather than making this an open-coded string, should it instead be a QMP
enum value?

>> +##
>> +# @chardev_del:

And this should be 'chardev-del' or even 'chardev-remove', as QMP
commands tend to favor legibility over abbreviations.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]