Received: from eggs.gnu.org ([2001:4830:134:3::10]:58462) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDEQp-0003EG-Kw for qemu-devel@nongnu.org; Fri, 01 Aug 2014 11:07:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XDEQk-0003aP-Qo for qemu-devel@nongnu.org; Fri, 01 Aug 2014 11:07:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:58522) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XDEQk-0003a4-Gb for qemu-devel@nongnu.org; Fri, 01 Aug 2014 11:07:38 -0400 Date: Fri, 1 Aug 2014 12:07:13 -0300 From: Eduardo Habkost Message-ID: <20140801150713.GD28519@thinpad.lan.raisama.net> References: <1406271172-1192-1-git-send-email-arei.gonglei@huawei.com> <1406271172-1192-6-git-send-email-arei.gonglei@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1406271172-1192-6-git-send-email-arei.gonglei@huawei.com> Subject: Re: [Qemu-devel] [PATCH v2 5/7] qmp: add set-bootindex command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: arei.gonglei@huawei.com Cc: peter.maydell@linaro.org, weidong.huang@huawei.com, mst@redhat.com, aik@ozlabs.ru, qemu-devel@nongnu.org, lcapitulino@redhat.com, kraxel@redhat.com, dmitry@daynix.com, akong@redhat.com, armbru@redhat.com, lersek@redhat.com, marcel.a@redhat.com, somlo@cmu.edu, luonengjun@huawei.com, peter.huangpeng@huawei.com, alex.williamson@redhat.com, stefanha@redhat.com, imammedo@redhat.com, rth@twiddle.net, kwolf@redhat.com, agraf@suse.de, peter.crosthwaite@xilinx.com, Chenliang , pbonzini@redhat.com, afaerber@suse.de On Fri, Jul 25, 2014 at 02:52:50PM +0800, arei.gonglei@huawei.com wrote: > From: Gonglei > > Adds "set-bootindex id=xx,bootindex=xx,suffix=xx" QMP command. > > Example QMP command: > -> { "execute": "set-bootindex", "arguments": { "id": "ide0-0-1", "bootindex": 1, "suffix": "/disk@0"}} > <- { "return": {} } > > Signed-off-by: Gonglei > Signed-off-by: Chenliang > --- > qapi-schema.json | 16 ++++++++++++++++ > qmp-commands.hx | 24 ++++++++++++++++++++++++ > qmp.c | 17 +++++++++++++++++ > 3 files changed, 57 insertions(+) > > diff --git a/qapi-schema.json b/qapi-schema.json > index b11aad2..a9ef0be 100644 > --- a/qapi-schema.json > +++ b/qapi-schema.json > @@ -1704,6 +1704,22 @@ > { 'command': 'device_del', 'data': {'id': 'str'} } > > ## > +# @set-bootindex: > +# > +# set bootindex of a devcie > +# > +# @id: the name of the device > +# @bootindex: the bootindex of the device > +# @suffix: #optional a suffix of the device > +# > +# Returns: Nothing on success > +# If @id is not a valid device, DeviceNotFound > +# > +# Since: 2.2 > +## > +{ 'command': 'set-bootindex', 'data': {'id': 'str', 'bootindex': 'int', '*suffix': 'str'} } > + > +## I wonder if we could simply use qom-set for that. How many devices actually support having multiple bootindex entries with different suffixes? -- Eduardo