[libvirt] [PATCH] Fix size reporting for disk pools without partitions

The attached patch updates parthelper to print size information for a disk device if it doesn't have any allocated partitions. The current code starts by requesting the first partition, then iterating from there. But if there is no first partition, that whole info reporting thing never happens :) Seems to produce desired results for partitioned and unpartitioned devices. Thanks, Cole

On Tue, Aug 12, 2008 at 11:58:23PM -0400, Cole Robinson wrote:
The attached patch updates parthelper to print size information for a disk device if it doesn't have any allocated partitions.
The current code starts by requesting the first partition, then iterating from there. But if there is no first partition, that whole info reporting thing never happens :)
Seems to produce desired results for partitioned and unpartitioned devices.
Ooh, nice one finding this bug. ACK Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

On Tue, Aug 12, 2008 at 11:58:23PM -0400, Cole Robinson wrote:
The attached patch updates parthelper to print size information for a disk device if it doesn't have any allocated partitions.
The current code starts by requesting the first partition, then iterating from there. But if there is no first partition, that whole info reporting thing never happens :)
Seems to produce desired results for partitioned and unpartitioned devices.
Sounds fine, applied and commited, thanks ! sorry for the delay ! Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (3)
-
Cole Robinson
-
Daniel P. Berrange
-
Daniel Veillard