From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:43374) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0YV2-0005hs-Qt for qemu-devel@nongnu.org; Mon, 05 Sep 2011 08:42:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R0YUy-0001WD-Pd for qemu-devel@nongnu.org; Mon, 05 Sep 2011 08:42:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11252) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R0YUy-0001W1-E2 for qemu-devel@nongnu.org; Mon, 05 Sep 2011 08:42:00 -0400 Message-ID: <4E64C445.5010402@redhat.com> Date: Mon, 05 Sep 2011 14:44:53 +0200 From: Kevin Wolf MIME-Version: 1.0 References: <1314981490-24200-1-git-send-email-dan@berrange.com> In-Reply-To: <1314981490-24200-1-git-send-email-dan@berrange.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] Display logical disk size in 'info block' output List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org Am 02.09.2011 18:38, schrieb Daniel P. Berrange: > From: "Daniel P. Berrange" > > To aid in knowing whether a 'block_resize' was succesful, display > the logical disk size in bytes, in the 'info block' output > > In v2: > - Replace sectors with bytes > > Signed-off-by: Daniel P. Berrange > --- > block.c | 6 ++++-- > qmp-commands.hx | 1 + > 2 files changed, 5 insertions(+), 2 deletions(-) > > diff --git a/block.c b/block.c > index 03a21d8..03102ad 100644 > --- a/block.c > +++ b/block.c > @@ -1844,6 +1844,7 @@ static void bdrv_print_dict(QObject *obj, void *opaque) > > monitor_printf(mon, " file="); > monitor_print_filename(mon, qdict_get_str(qdict, "file")); > + monitor_printf(mon, " length=%" PRId64, qdict_get_int(qdict, "length")); What about using get_human_readable_size() here? Or maybe we should rather introduce an option that selects readable units or bytes for all of the statistics? (The latter would be a separate patch, obviously) Looks good to me otherwise, so if you don't like my suggestion I'll merge it as it is. Kevin