From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53057 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PGaTd-0000ls-OP for qemu-devel@nongnu.org; Thu, 11 Nov 2010 11:58:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PGaTc-0005y0-BR for qemu-devel@nongnu.org; Thu, 11 Nov 2010 11:58:21 -0500 Received: from mail-qy0-f173.google.com ([209.85.216.173]:52810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PGaTc-0005xp-8L for qemu-devel@nongnu.org; Thu, 11 Nov 2010 11:58:20 -0500 Received: by qyl33 with SMTP id 33so24013qyl.4 for ; Thu, 11 Nov 2010 08:58:19 -0800 (PST) Message-ID: <4CDC20A7.5070307@codemonkey.ws> Date: Thu, 11 Nov 2010 10:58:15 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH 2/3] QMP: Introduce Human Monitor passthrough command References: <1288362514-31407-1-git-send-email-lcapitulino@redhat.com> <1288362514-31407-3-git-send-email-lcapitulino@redhat.com> <20101110113637.05d5a202@doriath> <20101111155555.GM22152@redhat.com> <4CDC1A37.9020306@codemonkey.ws> <20101111163952.GN22152@redhat.com> In-Reply-To: <20101111163952.GN22152@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: Luiz Capitulino , Markus Armbruster , qemu-devel@nongnu.org On 11/11/2010 10:39 AM, Daniel P. Berrange wrote: > IIUC, the FDs sent/received via struct cmsghdr are in a strictly > ordered array, so why not just define a placeholder syntax for > the commands that maps to the array indexes. eg > > netdev_add tap,fd=$0,vhost_fd=$1,id=hostnet0 > > The '$' sign is not valid for a normal FD number, so use of a $0, > $1, $2, etc can reliably be substituted with the real FD number from > the cmsghdr array elements 0, 1, 2, etc > Character devices are streaming so it's hard to refer to array indexes in a single message. You could count it for the entire session but session boundaries aren't really well defined. I don't think it's an obvious win. Regards, Anthony Liguori > Regards, > Daniel >