qemu-devel
[Top][All Lists]
Advanced

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

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


From: Corey Bryant
Subject: Re: [Qemu-devel] [PATCH 3/4] qemu-config: Add -drive fd and opaque options
Date: Fri, 05 Oct 2012 14:44:45 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1



On 10/05/2012 02:30 PM, Eric Blake wrote:
On 10/05/2012 12:25 PM, Blue Swirl wrote:
On Fri, Oct 5, 2012 at 6:07 PM, Corey Bryant <address@hidden> wrote:
These new options can be used for passing drive file descriptors
on the command line, instead of using the file option to specify
a file name.

These new command line options mirror the existing add-fd QMP
command which allows an fd to be passed to QEMU via SCM_RIGHTS and
added to an fd set.  The opaque option is also available with
add-fd, and allows a free-form string to be stored in the fd set
along with the fd.


+            .name = "opaque",

'opaque' is not very descriptive and it's also not obvious (except
from the help text) that it's only interesting for file descriptors.
How about fd_name, fd_tag or fd_descr?

Hmm, since opaque is per-fd in the existing monitor command, that means
my proposal needs a slight modification to:

  -fdset set=1,fd=24,opaque="rdonly",fd=25,opaque="rdwr"

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"

--
Regards,
Corey Bryant


or some other way where we can specify multiple fds and multiple opaque
strings per set.

At any rate, this just proves that we need to nail down the command line
implementation to something that is easy enough to use, before coding up
something that locks us in to bad design.





reply via email to

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