[gparted] Include extended partitions in the count of active partitions



commit c6d29aa7e8456d688e5efea21d4b363cb92a54be
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Fri Aug 19 12:16:30 2016 +0100

    Include extended partitions in the count of active partitions
    
    Trying to create a new partition table on a device with active
    partitions reports the number of active partitions in the error dialog.
    However when there is a busy logical partition the number of reported
    busy partitions will be one less than the number of partitions in the
    main UI showing the busy symbol.
    
    GParted considers extended partitions as busy when any of the logical
    partitions it contains as busy.  Display in the main UI reflects this.
    
    Fix Win_GParted::active_partitions_on_device_count() to not exclude
    extended partitions from the count.

 src/Win_GParted.cc |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 13b3244..44c7102 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -2837,9 +2837,8 @@ int  Win_GParted::active_partitions_on_device_count( const Device & device )
        //Count the active partitions on the device
        for ( unsigned int k=0; k < device .partitions .size(); k++ )
        {
-               //Count the active primary partitions
+               // Count the active primary and extended partitions
                if (   device .partitions[ k ] .busy
-                   && device .partitions[ k ] .type != TYPE_EXTENDED
                    && device .partitions[ k ] .type != TYPE_UNALLOCATED
                   )
                        active_count++ ;


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