From b1967e72114a8d9da257ef3d99023c3bf444d2f3 Mon Sep 17 00:00:00 2001 From: Mike Fleetwood Date: Sat, 20 Aug 2016 08:41:35 +0100 Subject: [PATCH] Allow Partition > New on unallocated whole disk devices again (#788308) Fix up following switch from whole_device flag to TYPE_UNPARTITIONED. Again use FS_UNALLOCATED to determine if a partition represents unallocated space and creation of a new partition should be allowed. This is so that trying to create a new partition on a whole disk device shows the "No partition table found on device /dev/DEV" warning again. Bug 788308 - Remove whole_device partition flag --- src/Win_GParted.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc index 305c2af1..02dfe043 100644 --- a/src/Win_GParted.cc +++ b/src/Win_GParted.cc @@ -1153,11 +1153,13 @@ void Win_GParted::set_valid_operations() if ( selected_filesystem.busy ) return ; - // UNALLOCATED + // UNALLOCATED space within a partition table or UNALLOCATED whole disk device + if ( selected_partition_ptr->filesystem == FS_UNALLOCATED ) + allow_new( true ); + + // UNALLOCATED space within a partition table if ( selected_partition_ptr->type == TYPE_UNALLOCATED ) { - allow_new( true ); - // Find out if there is a partition to be copied and if it fits inside this unallocated space // FIXME: // Temporarily disable copying of encrypted content into new partitions