[gparted] Allow Partition > New on unallocated whole disk devices again (#788308)
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Allow Partition > New on unallocated whole disk devices again (#788308)
- Date: Tue, 3 Oct 2017 16:36:13 +0000 (UTC)
commit b1967e72114a8d9da257ef3d99023c3bf444d2f3
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sat Aug 20 08:41:35 2016 +0100
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 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 305c2af..02dfe04 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]