[gnome-disk-utility] Handle partition setups with overlapping partitions



commit 23b7aa9033ec55b050356ce67ef0bebc03152b87
Author: David Zeuthen <zeuthen gmail com>
Date:   Sat Jul 14 15:14:03 2012 -0400

    Handle partition setups with overlapping partitions
    
    This is not supposed to happen but some disks are intentionally
    created like this in order to boot on as many different systems as
    possible. For example, see http://mjg59.dreamwidth.org/11285.html
    
    We handle this by simply just showing the partitions in order.
    
    http://people.freedesktop.org/~david/fedora-live-cd-fix-overlap-problems.png

 src/disks/gduvolumegrid.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/disks/gduvolumegrid.c b/src/disks/gduvolumegrid.c
index fda9f70..07202ec 100644
--- a/src/disks/gduvolumegrid.c
+++ b/src/disks/gduvolumegrid.c
@@ -1182,6 +1182,9 @@ recompute_grid_add_partitions (GduVolumeGrid  *grid,
       size = udisks_partition_get_size (partition);
       end = begin + size;
 
+      if (begin < prev_end)
+        begin = prev_end;
+
       if (begin - prev_end > free_space_slack)
         {
           element = g_new0 (GridElement, 1);



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