[gnome-disk-utility] fix volume hole detection, logical partitions start at five, not four



commit dfd25192912a22a833bafcbdaf4c7f887447f07a
Author: David Zeuthen <davidz redhat com>
Date:   Mon Apr 6 13:51:00 2009 -0400

    fix volume hole detection, logical partitions start at five, not four
---
 src/gdu/gdu-pool.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/src/gdu/gdu-pool.c b/src/gdu/gdu-pool.c
index 50b3bb0..8435822 100644
--- a/src/gdu/gdu-pool.c
+++ b/src/gdu/gdu-pool.c
@@ -436,6 +436,11 @@ get_holes (GduPool        *pool,
                 partition_size = gdu_device_partition_get_size (partition_device);
                 partition_number = gdu_device_partition_get_number (partition_device);
 
+                //g_print ("  considering partition number %d at offset=%lldMB size=%lldMB\n",
+                //         partition_number,
+                //         partition_offset / (1000 * 1000),
+                //         partition_size / (1000 * 1000));
+
                 /* only consider partitions in the given space */
                 if (partition_offset <= start)
                         continue;
@@ -444,7 +449,7 @@ get_holes (GduPool        *pool,
 
                 /* ignore logical partitions if requested */
                 if (ignore_logical) {
-                        if (strcmp (scheme, "mbr") == 0 && partition_number >= 4)
+                        if (strcmp (scheme, "mbr") == 0 && partition_number > 4)
                                 continue;
                 }
 



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