qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "sochin.jiang" <sochin.jiang@huawei.com>
To: armbru@redhat.com, kwolf@redhat.com, mreitz@redhat.com
Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org,
	sochin.jiang@huawei.com, eric.fangyi@huawei.com,
	subo7@huawei.com, xieyingtai@huawei.com, lina.lulina@huawei.com,
	zhangshuai13@huawei.com, lizhengui@huawei.com
Subject: [Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info
Date: Tue, 6 Jun 2017 15:03:19 +0800	[thread overview]
Message-ID: <1496732599-7977-1-git-send-email-sochin.jiang@huawei.com> (raw)

From: "sochin.jiang" <sochin.jiang@huawei.com>

 Supplement the omitted 'disk size' bytes information when using

 'qemu-img info',it is useful in some occasion. Anyhow, it looks

 strange that 'virtual size' has bytes while actual 'disk size'

 does not.

Signed-off-by: sochin.jiang <sochin.jiang@huawei.com>
---
 block/qapi.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/block/qapi.c b/block/qapi.c
index a40922e..9bb5956 100644
--- a/block/qapi.c
+++ b/block/qapi.c
@@ -703,10 +703,11 @@ void bdrv_image_info_dump(fprintf_function func_fprintf, void *f,
                  "image: %s\n"
                  "file format: %s\n"
                  "virtual size: %s (%" PRId64 " bytes)\n"
-                 "disk size: %s\n",
+                 "disk size: %s (%" PRId64 " bytes)\n",
                  info->filename, info->format, size_buf,
                  info->virtual_size,
-                 dsize_buf);
+                 dsize_buf,
+                 info->actual_size);
 
     if (info->has_encrypted && info->encrypted) {
         func_fprintf(f, "encrypted: yes\n");
-- 
1.8.3.1

             reply	other threads:[~2017-06-06  7:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-06  7:03 sochin.jiang [this message]
2017-06-06 13:53 ` [Qemu-devel] [PATCH] qemu-img: supplement the omitted 'disk size' bytes info sochin.jiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1496732599-7977-1-git-send-email-sochin.jiang@huawei.com \
    --to=sochin.jiang@huawei.com \
    --cc=armbru@redhat.com \
    --cc=eric.fangyi@huawei.com \
    --cc=kwolf@redhat.com \
    --cc=lina.lulina@huawei.com \
    --cc=lizhengui@huawei.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=subo7@huawei.com \
    --cc=xieyingtai@huawei.com \
    --cc=zhangshuai13@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).