qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH V3 06/11] qmp: add interface query-images.


From: Wenchao Xia
Subject: Re: [Qemu-devel] [PATCH V3 06/11] qmp: add interface query-images.
Date: Tue, 15 Jan 2013 18:27:37 +0800
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130107 Thunderbird/17.0.2



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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]