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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
commit 4a52468112e698e6f3f7ba94141d1e315579d3cd
Author: Cole (Work Acct) <crobinso@xxxxxxxxxxxxxxxxxxxxx>
Date:   Tue Aug 12 21:28:46 2008 -0400

    Fix size reporting for disks without partitions.

diff --git a/src/parthelper.c b/src/parthelper.c
index 1cd7240..c699035 100644
--- a/src/parthelper.c
+++ b/src/parthelper.c
@@ -63,7 +63,7 @@ int main(int argc, char **argv)
     }
 
     /* Get the first partition, and then iterate over all */
-    part = ped_disk_get_partition(disk, 1);
+    part = ped_disk_next_partition(disk, NULL);
     while (part) {
         const char *type;
         const char *content;
--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]