[libvirt] [PATCH v7] virsh: Add more human-friendly output of domblkstat command

Eric Blake eblake at redhat.com
Mon Sep 19 21:08:58 UTC 2011


On 09/19/2011 03:04 PM, Peter Krempa wrote:
>> - vshPrint(ctl, "%s %s %s\n", device, field, value);
>> + vshPrint(ctl, "%-*s %s %s\n", human ? 31 : 0,
> I think this is not completely correct

D'oh - you're right.  I justified the wrong field.  That's what I get 
for writing the email with only a compile, rather than a runtime, test.

> (but the trick with the "*" is
> really nice), as
> the first field is the device name and the second one is field name,
> that should be
> formatted nice. When "human" is true, device is set to an empty string
> and only the
> field name is printed.
>
> vshPrint(ctl, "%s %-*s %s\n", device,
> human ? 31 : 0, field value);
>
>> + device, field, value);
>> VIR_FREE(value);
>> }
> I give my incompetent ACK with that fixed :)

Yes, your layout is what I intended.  I'll push with that fix.  Thanks 
for the review - that's why we have them!  And now you can feel a bit 
more competent, for having caught a bug before it went into the 
repository :)

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org




More information about the libvir-list mailing list