All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrange" <berrange@redhat.com>
To: Corey Bryant <coreyb@linux.vnet.ibm.com>
Cc: kwolf@redhat.com, aliguori@us.ibm.com,
	stefanha@linux.vnet.ibm.com, qemu-devel@nongnu.org,
	Luiz Capitulino <lcapitulino@redhat.com>,
	eblake@redhat.com
Subject: Re: [Qemu-devel] [PATCH 1/3] qmp/hmp: Add QMP getfd command that returns fd
Date: Fri, 8 Jun 2012 11:46:48 +0100	[thread overview]
Message-ID: <20120608104648.GC2289@redhat.com> (raw)
In-Reply-To: <4FCF6367.8020409@linux.vnet.ibm.com>

On Wed, Jun 06, 2012 at 10:04:23AM -0400, Corey Bryant wrote:
> 
> 
> On 06/05/2012 02:30 PM, Luiz Capitulino wrote:
> >On Mon,  4 Jun 2012 09:10:08 -0400
> >Corey Bryant<coreyb@linux.vnet.ibm.com>  wrote:
> >
> >>This patch adds QMP support for the getfd command using the QAPI framework.
> >>Like the HMP getfd command, it is used to pass a file descriptor via
> >>SCM_RIGHTS.  However, the QMP getfd command also returns the received file
> >>descriptor, which is a difference in behavior from the HMP getfd command,
> >>which returns nothing.
> >
> >I have a few comments regarding the qapi conversion below, but something
> >important to discuss is that returning an int the way you're doing it is
> >certainly incompatible.
> 
> Thanks for your feedback.
> 
> >
> >Today, we return a dict on success:
> >
> >  { "return": {} }
> >
> >But this patch changes it to:
> >
> >  { "return": 42 }
> >
> >There are two ways to do this without breaking compatibility:
> >
> >  1. Add a new command (say get-file-descriptor)
> 
> What do you think about using getfd2 for the command name?  I'm
> thinking getfd2 may be more obvious that it corresponds to closefd.
> That assumes we'll use the same array internally to store fds and
> closefd can be used to close the fd opened by
> get-file-descriptor/getfd2.

How about calling it 'passfd' instead ?  I have always thought
the name 'getfd' to be a little wierd really, since we're not
getting an FD from QEMU, we're passing it one that we have.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

  parent reply	other threads:[~2012-06-08 10:47 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-04 13:10 [Qemu-devel] [PATCH 0/3] file descriptor passing using getfd over QMP Corey Bryant
2012-06-04 13:10 ` [Qemu-devel] [PATCH 1/3] qmp/hmp: Add QMP getfd command that returns fd Corey Bryant
2012-06-04 14:45   ` Kevin Wolf
2012-06-04 15:57     ` Corey Bryant
2012-06-05 18:30   ` Luiz Capitulino
2012-06-06 14:04     ` Corey Bryant
2012-06-06 17:50       ` Luiz Capitulino
2012-06-06 19:42         ` Corey Bryant
2012-06-08 10:46       ` Daniel P. Berrange [this message]
2012-06-08 13:17         ` Corey Bryant
2012-06-04 13:10 ` [Qemu-devel] [PATCH 2/3] block: Add support to "open" /dev/fd/X filenames Corey Bryant
2012-06-04 14:32   ` Eric Blake
2012-06-04 15:51     ` Corey Bryant
2012-06-04 16:03       ` Eric Blake
2012-06-04 16:28         ` Corey Bryant
2012-06-04 16:36           ` Eric Blake
2012-06-04 16:40             ` Corey Bryant
2012-06-04 14:54   ` Kevin Wolf
2012-06-04 16:07     ` Corey Bryant
2012-06-04 13:10 ` [Qemu-devel] [PATCH 3/3] Sample server that opens image files for QEMU Corey Bryant
2012-06-04 15:01   ` Kevin Wolf
2012-06-04 16:15     ` Corey Bryant

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=20120608104648.GC2289@redhat.com \
    --to=berrange@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=coreyb@linux.vnet.ibm.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@linux.vnet.ibm.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.