Received: from eggs.gnu.org ([2001:4830:134:3::10]:44106) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZvnqP-0003Ph-65 for qemu-devel@nongnu.org; Mon, 09 Nov 2015 09:54:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZvnqL-0005kW-QN for qemu-devel@nongnu.org; Mon, 09 Nov 2015 09:54:53 -0500 From: Alberto Garcia In-Reply-To: <1444985866-12969-5-git-send-email-wency@cn.fujitsu.com> References: <1444985866-12969-1-git-send-email-wency@cn.fujitsu.com> <1444985866-12969-5-git-send-email-wency@cn.fujitsu.com> Date: Mon, 09 Nov 2015 15:54:46 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v6 4/4] hmp: add monitor command to add/remove a child List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wen Congyang , qemu devel , Eric Blake , Markus Armbruster , Kevin Wolf , Stefan Hajnoczi Cc: qemu block , Jiang Yunhong , Dong Eddie , "Dr. David Alan Gilbert" , Luiz Capitulino , Gonglei , Yang Hongyang , zhanghailiang On Fri 16 Oct 2015 10:57:46 AM CEST, Wen Congyang wrote: > + .name = "blockdev_change", > + .args_type = "op:s,parent:B,child:B?,node:?", > + .params = "operation parent [child] [node]", [...] > + /* > + * FIXME: we must specify the parameter child, otherwise, > + * we can't specify the parameter node. > + */ > + if (op == CHANGE_OPERATION_ADD) { > + has_child = false; > + } So if you want to perform the 'add' operation you must pass both 'child' and 'node' but the former will be discarded. I don't think you really need to do this for the HMP interface, but it's anyway one more good reason to merge 'child' and 'node'. Berto