[libvirt] [Qemu-devel] [PATCH 3/4] qemu-config: Add -drive fd and opaque options

Eric Blake eblake at redhat.com
Fri Oct 5 18:51:30 UTC 2012


On 10/05/2012 12:44 PM, Corey Bryant wrote:
> Yes, this makes more sense.  I'd like to mirror the add-fd QMP command
> as much as possible:
> 
> { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
>   'returns': 'AddfdInfo' }
> 
> So maybe we can make it:
> 
> -add-fd fd=24,fdset-id=1,opaque="rdonly" -add-fd
> fd=25,fdset-id=1,opaque="rdwr"

Sounds better.  Note that while fdset-id is optional in QMP, I think it
needs to be mandatory on the CLI (you're telling qemu to use an
inherited fd, but unless you know what set that fd belongs to, you can't
then refer to that fd elsewhere on the command line, and unlike the QMP
command, there is no venue for QMP to tell you what set was autocreated).

Bike-shedding: I think the command line can be slightly shorter with:

-add-fd fd=24,set=1,opaque=...

with no real loss in information (that is, s/fdset-id/set/), since our
command lines are already quite long.  But going longhand to match QMP
doesn't hurt my feelings (libvirt will be automating this all anyway, so
I won't really be typing it by hand).

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121005/65afb776/attachment-0001.sig>


More information about the libvir-list mailing list