From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfQ8Y-0005nj-9l for qemu-devel@nongnu.org; Fri, 25 Sep 2015 06:21:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZfQ8S-0003ER-7A for qemu-devel@nongnu.org; Fri, 25 Sep 2015 06:21:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZfQ8S-0003EB-23 for qemu-devel@nongnu.org; Fri, 25 Sep 2015 06:21:48 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id A793191740 for ; Fri, 25 Sep 2015 10:21:47 +0000 (UTC) Date: Fri, 25 Sep 2015 11:21:44 +0100 From: "Daniel P. Berrange" Message-ID: <20150925102144.GB13579@redhat.com> References: <1442582350-9179-1-git-send-email-berrange@redhat.com> <1442582350-9179-17-git-send-email-berrange@redhat.com> <56051ED2.1080808@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <56051ED2.1080808@redhat.com> Subject: Re: [Qemu-devel] [PATCH v1 16/16] io: add QIOChannelBuffer class Reply-To: "Daniel P. Berrange" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Gerd Hoffmann , qemu-devel@nongnu.org, "Dr. David Alan Gilbert" On Fri, Sep 25, 2015 at 12:15:46PM +0200, Paolo Bonzini wrote: > > > On 18/09/2015 15:19, Daniel P. Berrange wrote: > > + if (fds || nfds) { > > + error_setg_errno(errp, EINVAL, > > + "Channel does not support buffer descriptor passing"); > > + return -1; > > + } > > Typo (file descriptor passing) and the check could be hoisted to > io/channel.c by using features. > > In fact capabilities could perhaps be stored statically in struct > QIOChannel as a bitmap? In general capabilities are static per class, but the socket code is an exception, because whether you can do FD passing is a runtime check based on the type of socket you opened. I might still be able to hoist that up into the base class though, so will investigate.. 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 :|