From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:46615) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv3kd-0002fl-VN for qemu-devel@nongnu.org; Tue, 15 Jan 2013 05:28:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv3ka-0002Dj-S8 for qemu-devel@nongnu.org; Tue, 15 Jan 2013 05:28:15 -0500 Received: from e28smtp02.in.ibm.com ([122.248.162.2]:40395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv3ka-0002D9-61 for qemu-devel@nongnu.org; Tue, 15 Jan 2013 05:28:12 -0500 Received: from /spool/local by e28smtp02.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 15 Jan 2013 15:56:23 +0530 Received: from d28relay03.in.ibm.com (d28relay03.in.ibm.com [9.184.220.60]) by d28dlp03.in.ibm.com (Postfix) with ESMTP id CAC3F125804F for ; Tue, 15 Jan 2013 15:58:24 +0530 (IST) Received: from d28av05.in.ibm.com (d28av05.in.ibm.com [9.184.220.67]) by d28relay03.in.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r0FAS39G46596146 for ; Tue, 15 Jan 2013 15:58:03 +0530 Received: from d28av05.in.ibm.com (loopback [127.0.0.1]) by d28av05.in.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r0FAS5Of014514 for ; Tue, 15 Jan 2013 21:28:06 +1100 Message-ID: <50F52F19.7080400@linux.vnet.ibm.com> Date: Tue, 15 Jan 2013 18:27:37 +0800 From: Wenchao Xia MIME-Version: 1.0 References: <1358147387-8221-1-git-send-email-xiawenc@linux.vnet.ibm.com> <1358147387-8221-7-git-send-email-xiawenc@linux.vnet.ibm.com> <20130114163242.4a154f1d@doriath.home> In-Reply-To: <20130114163242.4a154f1d@doriath.home> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH V3 06/11] qmp: add interface query-images. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: aliguori@us.ibm.com, phrdina@redhat.com, stefanha@gmail.com, qemu-devel@nongnu.org, armbru@redhat.com, pbonzini@redhat.com > > When the device doesn't have an image, this returns: > > { > "device": "ide1-cd0", > "info": { > "virtual-size": 0, > "filename": "", > "format": "" > } > }, > > But it would be better to return an empty dict or even omit 'info' > completely. One more comment below. > Will make info as optional, thanks. >> + >> + return head; >> +} >> + >> BlockInfo *bdrv_query_block_info(BlockDriverState *bs) >> { >> BlockInfo *info = g_malloc0(sizeof(*info)); >> diff --git a/qapi-schema.json b/qapi-schema.json >> index 5dfa052..565737c 100644 >> --- a/qapi-schema.json >> +++ b/qapi-schema.json >> @@ -245,6 +245,22 @@ >> '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } } >> >> ## >> +# @DeviceImageInfo: >> +# >> +# Information about an image used by QEMU block device >> +# >> +# @device: name of the block device >> +# >> +# @info: info of the image used. > > Info is too generic, please call it 'image'. > OK.