Am 02.09.2011 18:38, schrieb Daniel P. Berrange: > From: "Daniel P. Berrange" <d...@berrange.com> > > 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 <d...@berrange.com> > --- > 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