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
This commit is contained in:
Mike Fleetwood 2016-08-20 08:41:35 +01:00 committed by Curtis Gedak
parent fa5ed1fb90
commit b1967e7211
1 changed files with 5 additions and 3 deletions

View File

@ -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