[gparted] Disable manipulation operations on "none" partition tables (#741430)



commit dd049e8b4b46eb810de60bcfc454de75bd65a527
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date:   Sun Dec 28 13:18:58 2014 +0000

    Disable manipulation operations on "none" partition tables (#741430)
    
    At this time we are providing read-only support for file systems on
    whole disk devices.  Also all manipulation operations fail at the
    calibrate step with libparted error "unrecognised disk label", and
    manage flags is for real partitions only.
    
    Bug 741430 - GParted cannot recognise LVM signature on unpartitioned
                 drive

 src/Win_GParted.cc |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 7e454d5..4e6a47e 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -974,7 +974,12 @@ void Win_GParted::set_valid_operations()
 
        //if there's something, there's some info ;)
        allow_info( true ) ;
-       
+
+       // No manipulation operations are currently supported on file systems using the
+       // whole disk device.
+       if ( devices[current_device].disktype == "none" )
+               return;
+
        //flag managing..
        if ( selected_partition .type != GParted::TYPE_UNALLOCATED && selected_partition .status == 
GParted::STAT_REAL )
                allow_manage_flags( true ) ; 


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