Received: from [140.186.70.92] (port=56172 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OIOJB-0004LU-VS for qemu-devel@nongnu.org; Sat, 29 May 2010 11:50:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OIGck-00057u-Eg for qemu-devel@nongnu.org; Sat, 29 May 2010 03:38:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:63039) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OIGck-00057q-69 for qemu-devel@nongnu.org; Sat, 29 May 2010 03:38:26 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH v2 02/15] qdev: Fix scanning across single-bus devices References: Date: Sat, 29 May 2010 09:38:18 +0200 In-Reply-To: (Jan Kiszka's message of "Sat, 22 May 2010 10:17:59 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jan Kiszka Cc: Anthony Liguori , Juan Quintela , Jan Kiszka , qemu-devel@nongnu.org, Luiz Capitulino , Avi Kivity , Gerd Hoffmann [cc: kraxel] Jan Kiszka writes: > From: Jan Kiszka > > As long as we allow /dev.1 as shortcut for /dev1/bus1, we also have to > make sure that /dev1/dev2 works for /dev1/bus1/dev2/bus2 - as long as > there is only one child bus per device. We auto-root a path not starting with '/' via convention "first component is ID then" (I like that). We auto-complete a path ending with a device when we want a bus (a bit too clever). Auto-inserting bus names in the middle is too clever by half! Such cleverness can be convenient in the human monitor, but all it adds to QMP is complexity. I'm worried about possibly ambigous interpretation of paths. Would be bad if a path could name different node after we add something to the tree. I *think* your fine print makes that impossible, but it's not exactly obvious. Heck, I could be wrong. Wouldn't it be better to put the convenience into the interactive completion function? That way we keep it out of QMP. Subject is misleading, it's a feature, not a bug fix.