qemu-img: supplement the omitted 'disk size' bytes info
PATCH 1/1 qemu-img: supplement the omitted 'disk size' bytes info
From: "sochin.jiang" <[email protected]>
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 <[email protected]>
--- block/qapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
block/qapi.c +3 -2
@@ -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" );
Signature · 1 line
1.8.3.1
Please ignore this patch, I realize that there are some unfixed problems, like iotest, etc.
Quoted 33 lines · sochin.jiang
From: "sochin.jiang" <[email protected]>
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 <[email protected]>--- block/qapi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)block/qapi.c +3
-2@@ -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" );