members ;
- switch ( filesystem_ptn.filesystem )
+ switch (filesystem_ptn.fstype)
{
case FS_BTRFS:
members = btrfs::get_members( filesystem_ptn.get_path() );
@@ -446,7 +446,7 @@ void Dialog_Partition_Info::Display_Info()
2, top++, 1, 1);
}
- if ( filesystem_ptn.filesystem == FS_LVM2_PV )
+ if (filesystem_ptn.fstype == FS_LVM2_PV)
{
// Logical Volumes
grid->attach(*Utils::mk_label("" + Glib::ustring(_("Logical Volumes:")) + "", true, false, false, Gtk::ALIGN_START),
@@ -508,7 +508,7 @@ void Dialog_Partition_Info::Display_Info()
// One blank line
grid->attach(*Utils::mk_label(""), 0, top++, 6, 1);
- if ( partition.filesystem == FS_LUKS )
+ if (partition.fstype == FS_LUKS)
{
// ENCRYPTION DETAIL SECTION
// Encryption headline
@@ -518,7 +518,7 @@ void Dialog_Partition_Info::Display_Info()
// Encryption
grid->attach(*Utils::mk_label("" + Glib::ustring(_("Encryption:")) + ""),
1, top, 1, 1);
- grid->attach(*Utils::mk_label(Utils::get_filesystem_string(partition.filesystem), true, false, true),
+ grid->attach(*Utils::mk_label(Utils::get_filesystem_string(partition.fstype), true, false, true),
2, top++, 1, 1);
// LUKS path
@@ -564,7 +564,7 @@ void Dialog_Partition_Info::Display_Info()
grid->attach(*Utils::mk_label(partition.get_path(), true, false, true),
2, top++, 1, 1);
- if (partition.filesystem != FS_UNALLOCATED && partition.status != STAT_NEW)
+ if (partition.fstype != FS_UNALLOCATED && partition.status != STAT_NEW)
{
// Name
grid->attach(*Utils::mk_label("" + Glib::ustring(_("Name:")) + ""),
diff --git a/src/Dialog_Partition_Resize_Move.cc b/src/Dialog_Partition_Resize_Move.cc
index 44878623..bd9457b3 100644
--- a/src/Dialog_Partition_Resize_Move.cc
+++ b/src/Dialog_Partition_Resize_Move.cc
@@ -62,7 +62,7 @@ void Dialog_Partition_Resize_Move::set_data( const Partition & selected_partitio
}
// Set partition color
- Gdk::RGBA partition_color(Utils::get_color(selected_partition.filesystem));
+ Gdk::RGBA partition_color(Utils::get_color(selected_partition.fstype));
frame_resizer_base->set_rgb_partition_color( partition_color );
//store the original values
@@ -82,9 +82,9 @@ void Dialog_Partition_Resize_Move::Resize_Move_Normal( const PartitionVector & p
// Don't permit shrinking an existing file system (other than linux-swap) when the
// usage is unknown as that sets the minimum resize.
- if ( ! new_partition->sector_usage_known() &&
- new_partition->status != STAT_NEW &&
- new_partition->filesystem != FS_LINUX_SWAP )
+ if (! new_partition->sector_usage_known() &&
+ new_partition->status != STAT_NEW &&
+ new_partition->fstype != FS_LINUX_SWAP )
fs.shrink = FS::NONE;
//Disable resizing as it's currently disallowed for the file system in this partition.
diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc
index aab13a7b..f114258c 100644
--- a/src/Dialog_Progress.cc
+++ b/src/Dialog_Progress.cc
@@ -488,7 +488,7 @@ void Dialog_Progress::write_partition_details(const Partition& partition, std::o
<< "" << partition.sector_end << " | "
<< "" << Glib::build_path(", ", partition.flags) << " | "
<< "" << partition.name << " | "
- << "" << Utils::get_filesystem_string(partition.filesystem) << " | "
+ << "" << Utils::get_filesystem_string(partition.fstype) << " | "
<< "" << partition.get_filesystem_label() << " | "
<< "" << Glib::build_path(", ", partition.get_mountpoints()) << " | "
<< "" << std::endl;
diff --git a/src/Dialog_Rescue_Data.cc b/src/Dialog_Rescue_Data.cc
index f4755bb5..a38afdc6 100644
--- a/src/Dialog_Rescue_Data.cc
+++ b/src/Dialog_Rescue_Data.cc
@@ -111,18 +111,18 @@ void Dialog_Rescue_Data::create_list_of_fs()
for(unsigned int i=0;ipartitions.size();i++)
{
- if (this->partitions[i].filesystem == FS_UNALLOCATED ||
- this->partitions[i].filesystem == FS_UNKNOWN ||
- this->partitions[i].filesystem == FS_UNFORMATTED ||
- this->partitions[i].filesystem == FS_EXTENDED ||
- this->partitions[i].type == TYPE_EXTENDED ||
- this->partitions[i].type == TYPE_UNALLOCATED )
+ if (this->partitions[i].fstype == FS_UNALLOCATED ||
+ this->partitions[i].fstype == FS_UNKNOWN ||
+ this->partitions[i].fstype == FS_UNFORMATTED ||
+ this->partitions[i].fstype == FS_EXTENDED ||
+ this->partitions[i].type == TYPE_EXTENDED ||
+ this->partitions[i].type == TYPE_UNALLOCATED )
{
continue;
}
- std::string fs_name=Utils::get_filesystem_string( this->partitions[i].filesystem );
- if(this->partitions[i].filesystem==FS_EXT2)
+ std::string fs_name = Utils::get_filesystem_string(this->partitions[i].fstype);
+ if (this->partitions[i].fstype == FS_EXT2)
{
fs_name+="/3/4, ReiserFs or XFS";
}
diff --git a/src/DrawingAreaVisualDisk.cc b/src/DrawingAreaVisualDisk.cc
index af3ade32..1dd9b2b1 100644
--- a/src/DrawingAreaVisualDisk.cc
+++ b/src/DrawingAreaVisualDisk.cc
@@ -92,7 +92,7 @@ void DrawingAreaVisualDisk::set_static_data( const PartitionVector & partitions,
Sector partition_length = partitions[ t ] .get_sector_length() ;
visual_partitions .back() .fraction = partition_length / static_cast( length ) ;
- Glib::ustring color_str = Utils::get_color( partitions[t].get_filesystem_partition().filesystem );
+ Glib::ustring color_str = Utils::get_color(partitions[t].get_filesystem_partition().fstype);
visual_partitions.back().color.set( color_str );
if (partitions[t].type == TYPE_EXTENDED)
@@ -148,8 +148,8 @@ void DrawingAreaVisualDisk::calc_usage( std::vector & visual_p
{
for ( unsigned int t = 0 ; t < visual_partitions .size() ; t++ )
{
- if ( visual_partitions[t].partition_ptr->filesystem != FS_UNALLOCATED &&
- visual_partitions[t].partition_ptr->type != TYPE_EXTENDED )
+ if (visual_partitions[t].partition_ptr->fstype != FS_UNALLOCATED &&
+ visual_partitions[t].partition_ptr->type != TYPE_EXTENDED )
{
if ( visual_partitions[t].partition_ptr->sector_usage_known() )
{
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index cfaa20eb..30fea4e6 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -1039,8 +1039,8 @@ void GParted_Core::set_partition_label_and_uuid( Partition & partition )
// For SWRaid members only get the label and UUID from SWRaid_Info. Never use
// values from FS_Info to avoid showing incorrect information in cases where blkid
// reports the wrong values.
- if (partition.filesystem == FS_LINUX_SWRAID ||
- partition.filesystem == FS_ATARAID )
+ if (partition.fstype == FS_LINUX_SWRAID ||
+ partition.fstype == FS_ATARAID )
{
Glib::ustring label = SWRaid_Info::get_label( partition_path );
if ( ! label.empty() )
@@ -1329,10 +1329,10 @@ FSType GParted_Core::detect_filesystem( PedDevice * lp_device, PedPartition * lp
void GParted_Core::read_label( Partition & partition )
{
FileSystem* p_filesystem = NULL;
- switch ( get_fs( partition.filesystem ).read_label )
+ switch (get_fs(partition.fstype).read_label)
{
case FS::EXTERNAL:
- p_filesystem = get_filesystem_object( partition.filesystem );
+ p_filesystem = get_filesystem_object(partition.fstype);
if ( p_filesystem )
p_filesystem->read_label( partition );
break;
@@ -1345,10 +1345,10 @@ void GParted_Core::read_label( Partition & partition )
void GParted_Core::read_uuid( Partition & partition )
{
FileSystem* p_filesystem = NULL;
- switch ( get_fs( partition.filesystem ).read_uuid )
+ switch (get_fs(partition.fstype).read_uuid)
{
case FS::EXTERNAL:
- p_filesystem = get_filesystem_object( partition.filesystem );
+ p_filesystem = get_filesystem_object(partition.fstype);
if ( p_filesystem )
p_filesystem->read_uuid( partition );
break;
@@ -1415,19 +1415,19 @@ void GParted_Core::set_mountpoints( Partition & partition )
{
DMRaid dmraid ; //Use cache of dmraid device information
- if ( partition.filesystem == FS_LVM2_PV )
+ if (partition.fstype == FS_LVM2_PV)
{
Glib::ustring vgname = LVM2_PV_Info::get_vg_name( partition.get_path() );
if ( ! vgname.empty() )
partition.add_mountpoint( vgname );
}
- else if ( partition.filesystem == FS_LINUX_SWRAID )
+ else if (partition.fstype == FS_LINUX_SWRAID)
{
Glib::ustring array_path = SWRaid_Info::get_array( partition.get_path() );
if ( ! array_path.empty() )
partition.add_mountpoint( array_path );
}
- else if (partition.filesystem == FS_ATARAID)
+ else if (partition.fstype == FS_ATARAID)
{
Glib::ustring array_path = SWRaid_Info::get_array(partition.get_path());
if (! array_path.empty())
@@ -1441,14 +1441,14 @@ void GParted_Core::set_mountpoints( Partition & partition )
partition.add_mountpoint(array_path);
}
}
- else if ( partition.filesystem == FS_LUKS )
+ else if (partition.fstype == FS_LUKS)
{
LUKS_Mapping mapping = LUKS_Info::get_cache_entry( partition.get_path() );
if ( ! mapping.name.empty() )
partition.add_mountpoint( DEV_MAPPER_PATH + mapping.name );
}
// Swap spaces don't have mount points so don't bother trying to add them.
- else if ( partition.filesystem != FS_LINUX_SWAP )
+ else if (partition.fstype != FS_LINUX_SWAP)
{
if ( partition.busy )
{
@@ -1492,7 +1492,7 @@ void GParted_Core::set_mountpoints( Partition & partition )
bool GParted_Core::set_mountpoints_helper( Partition & partition, const Glib::ustring & path )
{
Glib::ustring search_path ;
- if ( partition .filesystem == FS_BTRFS )
+ if (partition.fstype == FS_BTRFS)
search_path = btrfs::get_mount_device( path ) ;
else
search_path = path ;
@@ -1553,15 +1553,15 @@ bool GParted_Core::is_busy( FSType fstype, const Glib::ustring & path )
void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
{
- if ( supported_filesystem( partition.filesystem ) )
+ if (supported_filesystem(partition.fstype))
{
FileSystem* p_filesystem = NULL;
if ( partition.busy )
{
- switch( get_fs( partition.filesystem ).online_read )
+ switch(get_fs(partition.fstype).online_read)
{
case FS::EXTERNAL:
- p_filesystem = get_filesystem_object( partition.filesystem );
+ p_filesystem = get_filesystem_object(partition.fstype);
if ( p_filesystem )
p_filesystem->set_used_sectors( partition );
break;
@@ -1574,10 +1574,10 @@ void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
}
else // Not busy file system
{
- switch( get_fs( partition.filesystem ).read )
+ switch(get_fs(partition.fstype).read)
{
case FS::EXTERNAL:
- p_filesystem = get_filesystem_object( partition.filesystem );
+ p_filesystem = get_filesystem_object(partition.fstype);
if ( p_filesystem )
p_filesystem->set_used_sectors( partition );
break;
@@ -1605,16 +1605,16 @@ void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
Glib::ustring temp = _("Unable to read the contents of this file system!");
temp += "\n";
temp += _("Because of this some operations may be unavailable.");
- if ( ! Utils::get_filesystem_software( partition.filesystem ).empty() )
+ if (! Utils::get_filesystem_software(partition.fstype).empty())
{
temp += "\n";
temp += _("The cause might be a missing software package.");
temp += "\n";
/*TO TRANSLATORS: looks like The following list of software packages is required for NTFS file system support: ntfsprogs. */
temp += Glib::ustring::compose( _("The following list of software packages is required for %1 file system support: %2."),
- Utils::get_filesystem_string( partition.filesystem ),
- Utils::get_filesystem_software( partition.filesystem )
- );
+ Utils::get_filesystem_string(partition.fstype),
+ Utils::get_filesystem_software(partition.fstype)
+ );
}
partition.push_back_message( temp );
}
@@ -1623,7 +1623,7 @@ void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
/* TO TRANSLATORS: looks like 1.28GiB of unallocated space within the partition. */
Glib::ustring temp = Glib::ustring::compose( _("%1 of unallocated space within the partition."),
Utils::format_size( unallocated, partition.sector_size ) );
- FS fs = get_fs( partition.filesystem );
+ FS fs = get_fs(partition.fstype);
if ( fs.check != FS::NONE && fs.grow != FS::NONE )
{
temp += "\n";
@@ -1640,7 +1640,7 @@ void GParted_Core::set_used_sectors( Partition & partition, PedDisk* lp_disk )
if ( filesystem_resize_disallowed( partition ) )
{
- Glib::ustring temp = get_filesystem_object( partition.filesystem )
+ Glib::ustring temp = get_filesystem_object(partition.fstype)
->get_custom_text( CTEXT_RESIZE_DISALLOWED_WARNING );
if ( ! temp.empty() )
partition.push_back_message( temp );
@@ -1719,7 +1719,7 @@ bool GParted_Core::create( Partition & new_partition, OperationDetail & operatio
}
else
{
- FS_Limits fs_limits = get_filesystem_limits( new_partition.filesystem, new_partition );
+ FS_Limits fs_limits = get_filesystem_limits(new_partition.fstype, new_partition);
success = create_partition( new_partition, operationdetail,
fs_limits.min_size / new_partition.sector_size );
}
@@ -1732,10 +1732,10 @@ bool GParted_Core::create( Partition & new_partition, OperationDetail & operatio
return false;
}
- if ( new_partition.type == TYPE_EXTENDED ||
- new_partition.filesystem == FS_UNFORMATTED )
+ if (new_partition.type == TYPE_EXTENDED ||
+ new_partition.fstype == FS_UNFORMATTED )
return true;
- else if ( new_partition.filesystem == FS_CLEARED )
+ else if (new_partition.fstype == FS_CLEARED)
return erase_filesystem_signatures( new_partition, operationdetail );
else
return erase_filesystem_signatures( new_partition, operationdetail )
@@ -1806,7 +1806,7 @@ bool GParted_Core::create_partition( Partition & new_partition, OperationDetail
if ( constraint )
{
if ( min_size > 0
- && new_partition .filesystem != FS_XFS // Permit copying to smaller xfs partition
+ && new_partition.fstype != FS_XFS // Permit copying to smaller xfs partition
)
constraint ->min_size = min_size ;
@@ -1856,7 +1856,7 @@ bool GParted_Core::create_partition( Partition & new_partition, OperationDetail
bool GParted_Core::create_filesystem( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a create file system only step"),
@@ -1867,11 +1867,11 @@ bool GParted_Core::create_filesystem( const Partition & partition, OperationDeta
operationdetail .add_child( OperationDetail( Glib::ustring::compose(
/*TO TRANSLATORS: looks like create new ext3 file system */
_("create new %1 file system"),
- Utils::get_filesystem_string( partition .filesystem ) ) ) ) ;
+ Utils::get_filesystem_string(partition.fstype))));
bool succes = false ;
FileSystem* p_filesystem = NULL ;
- switch ( get_fs( partition .filesystem ) .create )
+ switch (get_fs(partition.fstype).create)
{
case FS::NONE:
break ;
@@ -1880,7 +1880,7 @@ bool GParted_Core::create_filesystem( const Partition & partition, OperationDeta
case FS::LIBPARTED:
break ;
case FS::EXTERNAL:
- succes = ( p_filesystem = get_filesystem_object( partition .filesystem ) ) &&
+ succes = (p_filesystem = get_filesystem_object(partition.fstype)) &&
p_filesystem ->create( partition, operationdetail .get_last_child() ) ;
break ;
@@ -1895,7 +1895,7 @@ bool GParted_Core::create_filesystem( const Partition & partition, OperationDeta
bool GParted_Core::format( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a format file system only step"),
@@ -1903,7 +1903,7 @@ bool GParted_Core::format( const Partition & partition, OperationDetail & operat
return false;
}
- if ( partition .filesystem == FS_CLEARED )
+ if (partition.fstype == FS_CLEARED)
return erase_filesystem_signatures(partition, operationdetail)
&& set_partition_type(partition, operationdetail);
else
@@ -1955,7 +1955,7 @@ bool GParted_Core::delete_partition( const Partition & partition, OperationDetai
bool GParted_Core::remove_filesystem( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a delete file system only step"),
@@ -1966,7 +1966,7 @@ bool GParted_Core::remove_filesystem( const Partition & partition, OperationDeta
bool success = true ;
FileSystem* p_filesystem = NULL ;
- switch ( get_fs( partition .filesystem ) .remove )
+ switch (get_fs(partition.fstype ).remove)
{
case FS::EXTERNAL:
//Run file system specific remove method to delete the file system. Most
@@ -1974,8 +1974,8 @@ bool GParted_Core::remove_filesystem( const Partition & partition, OperationDeta
// recovery from accidental partition deletion.
operationdetail .add_child( OperationDetail( Glib::ustring::compose(
_("delete %1 file system"),
- Utils::get_filesystem_string( partition .filesystem ) ) ) ) ;
- success = ( p_filesystem = get_filesystem_object( partition .filesystem ) ) &&
+ Utils::get_filesystem_string(partition.fstype))));
+ success = (p_filesystem = get_filesystem_object(partition.fstype)) &&
p_filesystem ->remove( partition, operationdetail .get_last_child() ) ;
operationdetail.get_last_child().set_success_and_capture_errors( success );
break ;
@@ -1988,7 +1988,7 @@ bool GParted_Core::remove_filesystem( const Partition & partition, OperationDeta
bool GParted_Core::label_filesystem( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a label file system only step"),
@@ -2007,10 +2007,10 @@ bool GParted_Core::label_filesystem( const Partition & partition, OperationDetai
bool succes = false ;
FileSystem* p_filesystem = NULL ;
- switch ( get_fs( partition.filesystem ).write_label )
+ switch (get_fs(partition.fstype).write_label)
{
case FS::EXTERNAL:
- succes = ( p_filesystem = get_filesystem_object( partition.filesystem ) )
+ succes = (p_filesystem = get_filesystem_object(partition.fstype))
&& p_filesystem->write_label( partition, operationdetail.get_last_child() );
break;
@@ -2051,7 +2051,7 @@ bool GParted_Core::name_partition( const Partition & partition, OperationDetail
bool GParted_Core::change_filesystem_uuid( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a change file system UUID only step"),
@@ -2073,10 +2073,10 @@ bool GParted_Core::change_filesystem_uuid( const Partition & partition, Operatio
bool succes = false ;
FileSystem* p_filesystem = NULL ;
- switch ( get_fs( partition.filesystem ).write_uuid )
+ switch (get_fs(partition.fstype).write_uuid)
{
case FS::EXTERNAL:
- succes = ( p_filesystem = get_filesystem_object( partition.filesystem ) )
+ succes = (p_filesystem = get_filesystem_object(partition.fstype))
&& p_filesystem->write_uuid( partition, operationdetail.get_last_child() );
break;
@@ -2218,7 +2218,7 @@ bool GParted_Core::move( const Partition & partition_old,
if ( ! success )
return false;
- if ( partition_new.filesystem == FS_LINUX_SWAP )
+ if (partition_new.fstype == FS_LINUX_SWAP)
// linux-swap is recreated, not moved
return recreate_linux_swap_filesystem( partition_new, operationdetail );
@@ -2248,7 +2248,7 @@ bool GParted_Core::move_filesystem( const Partition & partition_old,
bool succes = false ;
FileSystem* p_filesystem = NULL ;
Sector total_done = 0;
- switch ( get_fs( partition_old .filesystem ) .move )
+ switch (get_fs(partition_old.fstype).move)
{
case FS::NONE:
break ;
@@ -2283,7 +2283,7 @@ bool GParted_Core::move_filesystem( const Partition & partition_old,
case FS::LIBPARTED:
break ;
case FS::EXTERNAL:
- succes = ( p_filesystem = get_filesystem_object( partition_new .filesystem ) ) &&
+ succes = (p_filesystem = get_filesystem_object(partition_new.fstype)) &&
p_filesystem ->move( partition_old
, partition_new
, operationdetail .get_last_child()
@@ -2382,7 +2382,7 @@ bool GParted_Core::resize( const Partition & partition_old,
return false ;
}
- if ( partition_new.filesystem == FS_LUKS )
+ if (partition_new.fstype == FS_LUKS)
return resize_encryption( partition_old, partition_new, operationdetail );
else
return resize_plain( partition_old, partition_new, operationdetail );
@@ -2392,7 +2392,7 @@ bool GParted_Core::resize_encryption( const Partition & partition_old,
const Partition & partition_new,
OperationDetail & operationdetail )
{
- if ( partition_old.filesystem != FS_LUKS )
+ if (partition_old.fstype != FS_LUKS)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition does not contain LUKS encryption for a resize encryption only step"),
@@ -2421,7 +2421,7 @@ bool GParted_Core::resize_encryption( const Partition & partition_old,
const Partition & filesystem_ptn_new = partition_new.get_filesystem_partition();
- if ( filesystem_ptn_new.filesystem == FS_LINUX_SWAP )
+ if (filesystem_ptn_new.fstype == FS_LINUX_SWAP)
{
// LUKS is resized, but linux-swap is recreated, not resized
if ( delta < 0LL ) // shrink
@@ -2461,7 +2461,7 @@ bool GParted_Core::resize_plain( const Partition & partition_old,
const Partition & partition_new,
OperationDetail & operationdetail )
{
- if ( partition_old.filesystem == FS_LUKS && partition_old.busy )
+ if (partition_old.fstype == FS_LUKS && partition_old.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a resize file system only step"),
@@ -2469,7 +2469,7 @@ bool GParted_Core::resize_plain( const Partition & partition_old,
return false;
}
- if ( partition_new.filesystem == FS_LINUX_SWAP )
+ if (partition_new.fstype == FS_LINUX_SWAP)
{
// linux-swap is recreated, not resized
return resize_move_partition( partition_old, partition_new, operationdetail, true )
@@ -2732,7 +2732,7 @@ bool GParted_Core::shrink_encryption( const Partition & partition_old,
const Partition & partition_new,
OperationDetail & operationdetail )
{
- if ( ! ( partition_old.filesystem == FS_LUKS && partition_old.busy ) )
+ if (! (partition_old.fstype == FS_LUKS && partition_old.busy))
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition does not contain open LUKS encryption for a shrink encryption only step"),
@@ -2748,7 +2748,7 @@ bool GParted_Core::shrink_encryption( const Partition & partition_old,
bool GParted_Core::maximize_encryption( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem != FS_LUKS )
+ if (partition.fstype != FS_LUKS)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition does not contain LUKS encryption for a maximize encryption only step"),
@@ -2763,7 +2763,7 @@ bool GParted_Core::maximize_encryption( const Partition & partition, OperationDe
// operation these growing checks are merely retesting those performed to allow
// the operation to be queued in the first place. See
// Win_GParted::set_valid_operations().
- if ( get_fs( partition.filesystem ).grow == FS::NONE )
+ if (get_fs(partition.fstype).grow == FS::NONE)
{
operationdetail.get_last_child().add_child( OperationDetail(
_("growing is not available for this encryption volume"),
@@ -2781,7 +2781,7 @@ bool GParted_Core::shrink_filesystem( const Partition & partition_old,
const Partition & partition_new,
OperationDetail & operationdetail )
{
- if ( partition_old.filesystem == FS_LUKS && partition_old.busy )
+ if (partition_old.fstype == FS_LUKS && partition_old.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a shrink file system only step"),
@@ -2809,7 +2809,7 @@ bool GParted_Core::shrink_filesystem( const Partition & partition_old,
bool GParted_Core::maximize_filesystem( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a maximize file system only step"),
@@ -2825,7 +2825,7 @@ bool GParted_Core::maximize_filesystem( const Partition & partition, OperationDe
// to allow the operation to be queued in the first place. See
// Win_GParted::set_valid_operations() and
// Dialog_Partition_Resize_Move::Resize_Move_Normal().
- if (get_fs(partition.filesystem).grow == FS::NONE)
+ if (get_fs(partition.fstype).grow == FS::NONE)
{
operationdetail .get_last_child() .add_child(
OperationDetail( _("growing is not available for this file system"),
@@ -2837,7 +2837,7 @@ bool GParted_Core::maximize_filesystem( const Partition & partition, OperationDe
else if ( filesystem_resize_disallowed( partition ) )
{
Glib::ustring msg = _("growing the file system is currently disallowed") ;
- Glib::ustring custom_msg = get_filesystem_object( partition .filesystem )
+ Glib::ustring custom_msg = get_filesystem_object(partition.fstype)
->get_custom_text( CTEXT_RESIZE_DISALLOWED_WARNING ) ;
if ( ! custom_msg .empty() )
{
@@ -2856,7 +2856,7 @@ bool GParted_Core::maximize_filesystem( const Partition & partition, OperationDe
bool GParted_Core::recreate_linux_swap_filesystem( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem != FS_LINUX_SWAP )
+ if (partition.fstype != FS_LINUX_SWAP)
{
operationdetail.add_child( OperationDetail(
/* TO TRANSLATORS: looks like not a linux-swap file system for a recreate linux-swap only step */
@@ -2887,7 +2887,7 @@ bool GParted_Core::resize_filesystem_implement( const Partition & partition_old,
{
bool fill_partition = false;
- const FS & fs_cap = get_fs( partition_new.filesystem );
+ const FS& fs_cap = get_fs(partition_new.fstype);
FS::Support action = FS::NONE;
if ( partition_new.get_sector_length() >= partition_old.get_sector_length() )
{
@@ -2917,7 +2917,7 @@ bool GParted_Core::resize_filesystem_implement( const Partition & partition_old,
break;
#endif
case FS::EXTERNAL:
- success = ( p_filesystem = get_filesystem_object( partition_new.filesystem ) ) &&
+ success = (p_filesystem = get_filesystem_object(partition_new.fstype)) &&
p_filesystem->resize( partition_new,
operationdetail.get_last_child(),
fill_partition );
@@ -2937,7 +2937,7 @@ bool GParted_Core::copy( const Partition & partition_src,
Partition & filesystem_ptn_dst = partition_dst.get_filesystem_partition();
if ( filesystem_ptn_dst.get_byte_length() < filesystem_ptn_src.get_byte_length()
- && filesystem_ptn_src.filesystem != FS_XFS // Permit copying to smaller xfs partition
+ && filesystem_ptn_src.fstype != FS_XFS // Permit copying to smaller xfs partition
)
{
operationdetail .add_child( OperationDetail(
@@ -2971,7 +2971,7 @@ bool GParted_Core::copy( const Partition & partition_src,
if ( ! success )
return false;
- if ( filesystem_ptn_dst.filesystem == FS_LINUX_SWAP )
+ if (filesystem_ptn_dst.fstype == FS_LINUX_SWAP)
{
// linux-swap is recreated, not copied
return recreate_linux_swap_filesystem( filesystem_ptn_dst, operationdetail );
@@ -2989,14 +2989,14 @@ bool GParted_Core::copy_filesystem( const Partition & partition_src,
Partition & partition_dst,
OperationDetail & operationdetail )
{
- if ( partition_src.filesystem == FS_LUKS && partition_src.busy )
+ if (partition_src.fstype == FS_LUKS && partition_src.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("source partition contains open LUKS encryption for a file system copy only step"),
STATUS_ERROR, FONT_ITALIC ) );
return false;
}
- if ( partition_dst.filesystem == FS_LUKS && partition_dst.busy )
+ if (partition_dst.fstype == FS_LUKS && partition_dst.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("destination partition contains open LUKS encryption for a file system copy only step"),
@@ -3011,7 +3011,7 @@ bool GParted_Core::copy_filesystem( const Partition & partition_src,
bool success = false;
FileSystem* p_filesystem = NULL;
- switch ( get_fs( partition_dst.filesystem ).copy )
+ switch (get_fs(partition_dst.fstype).copy)
{
case FS::GPARTED:
success = copy_filesystem_internal( partition_src,
@@ -3025,7 +3025,7 @@ bool GParted_Core::copy_filesystem( const Partition & partition_src,
break;
case FS::EXTERNAL:
- success = ( p_filesystem = get_filesystem_object( partition_dst.filesystem ) ) &&
+ success = (p_filesystem = get_filesystem_object(partition_dst.fstype)) &&
p_filesystem->copy( partition_src,
partition_dst,
operationdetail.get_last_child() );
@@ -3245,7 +3245,7 @@ void GParted_Core::rollback_move_filesystem( const Partition & partition_src,
bool GParted_Core::check_repair_filesystem( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for a check file system only step"),
@@ -3265,7 +3265,7 @@ bool GParted_Core::check_repair_filesystem( const Partition & partition, Operati
bool succes = false ;
FileSystem* p_filesystem = NULL ;
- switch ( get_fs( partition .filesystem ) .check )
+ switch (get_fs(partition.fstype).check)
{
case FS::NONE:
operationdetail .get_last_child() .add_child(
@@ -3281,7 +3281,7 @@ bool GParted_Core::check_repair_filesystem( const Partition & partition, Operati
case FS::LIBPARTED:
break ;
case FS::EXTERNAL:
- succes = ( p_filesystem = get_filesystem_object( partition .filesystem ) ) &&
+ succes = (p_filesystem = get_filesystem_object(partition.fstype)) &&
p_filesystem ->check_repair( partition, operationdetail .get_last_child() ) ;
break ;
@@ -3297,7 +3297,7 @@ bool GParted_Core::check_repair_filesystem( const Partition & partition, Operati
bool GParted_Core::check_repair_maximize( const Partition & partition,
OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS )
+ if (partition.fstype == FS_LUKS)
{
// Pretend that the LUKS partition is closed so that
// resize_filesystem_implement() checks the offline .grow capability
@@ -3347,20 +3347,20 @@ bool GParted_Core::set_partition_type( const Partition & partition, OperationDet
PedPartition* lp_partition = ped_disk_get_partition_by_sector( lp_disk, partition.get_sector() );
if ( lp_partition )
{
- Glib::ustring fs_type = Utils::get_filesystem_string( partition.filesystem );
+ Glib::ustring fs_type = Utils::get_filesystem_string(partition.fstype);
// Lookup libparted file system type using GParted's name, as most
// match. Exclude cleared as the name won't be recognised by
// libparted and get_filesystem_string() has also translated it.
PedFileSystemType *lp_fs_type = NULL;
- if (partition.filesystem != FS_CLEARED)
+ if (partition.fstype != FS_CLEARED)
lp_fs_type = ped_file_system_type_get(fs_type.c_str());
// If not found, and FS is udf, then try ntfs.
// Actually MBR 07 IFS (Microsoft Installable File System) or
// GPT BDP (Windows Basic Data Partition).
// Ref: https://serverfault.com/a/829172
- if (! lp_fs_type && partition.filesystem == FS_UDF)
+ if (! lp_fs_type && partition.fstype == FS_UDF)
lp_fs_type = ped_file_system_type_get( "ntfs" );
// default is Linux (83)
@@ -3369,7 +3369,7 @@ bool GParted_Core::set_partition_type( const Partition & partition, OperationDet
bool supports_lvm_flag = ped_partition_is_flag_available( lp_partition, PED_PARTITION_LVM );
- if ( lp_fs_type && partition.filesystem != FS_LVM2_PV )
+ if (lp_fs_type && partition.fstype != FS_LVM2_PV)
{
// Also clear any libparted LVM flag so that it doesn't
// override the file system type
@@ -3387,7 +3387,7 @@ bool GParted_Core::set_partition_type( const Partition & partition, OperationDet
return_value = true;
}
}
- else if ( partition.filesystem == FS_LVM2_PV )
+ else if (partition.fstype == FS_LVM2_PV)
{
if ( supports_lvm_flag &&
ped_partition_set_flag( lp_partition, PED_PARTITION_LVM, 1 ) &&
@@ -3499,7 +3499,7 @@ bool GParted_Core::calibrate_partition( Partition & partition, OperationDetail &
STATUS_NONE,
FONT_ITALIC ) ) ;
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
const Partition & encrypted = dynamic_cast( &partition )->get_encrypted();
operationdetail.get_last_child().add_child( OperationDetail(
@@ -3635,7 +3635,7 @@ FS_Limits GParted_Core::get_filesystem_limits( FSType fstype, const Partition &
bool GParted_Core::filesystem_resize_disallowed( const Partition & partition )
{
- if ( partition .filesystem == FS_LVM2_PV )
+ if (partition.fstype == FS_LVM2_PV)
{
//The LVM2 PV can't be resized when it's a member of an export VG
Glib::ustring vgname = LVM2_PV_Info::get_vg_name( partition.get_path() );
@@ -3648,7 +3648,7 @@ bool GParted_Core::filesystem_resize_disallowed( const Partition & partition )
bool GParted_Core::erase_filesystem_signatures( const Partition & partition, OperationDetail & operationdetail )
{
- if ( partition.filesystem == FS_LUKS && partition.busy )
+ if (partition.fstype == FS_LUKS && partition.busy)
{
operationdetail.add_child( OperationDetail(
GPARTED_BUG + ": " + _("partition contains open LUKS encryption for an erase file system signatures only step"),
@@ -3886,7 +3886,7 @@ bool GParted_Core::update_bootsector( const Partition & partition, OperationDeta
{
//only for ntfs atm...
//FIXME: this should probably be done in the fs classes...
- if ( partition .filesystem == FS_NTFS )
+ if (partition.fstype == FS_NTFS)
{
//The NTFS file system stores a value in the boot record called the
// Number of Hidden Sectors. This value must match the partition start
@@ -3897,7 +3897,7 @@ bool GParted_Core::update_bootsector( const Partition & partition, OperationDeta
operationdetail .add_child( OperationDetail(
/*TO TRANSLATORS: update boot sector of ntfs file system on /dev/sdd1 */
Glib::ustring::compose( _("update boot sector of %1 file system on %2"),
- Utils::get_filesystem_string( partition .filesystem ),
+ Utils::get_filesystem_string(partition.fstype),
partition .get_path() ) ) ) ;
//convert start sector to hex string
diff --git a/src/OperationFormat.cc b/src/OperationFormat.cc
index d87253c5..9fd04df3 100644
--- a/src/OperationFormat.cc
+++ b/src/OperationFormat.cc
@@ -45,7 +45,7 @@ void OperationFormat::apply_to_visual( PartitionVector & partitions )
g_assert( partition_original != NULL ); // Bug: Not initialised by constructor or reset later
g_assert( partition_new != NULL ); // Bug: Not initialised by constructor or reset later
- if ( partition_original->type == TYPE_UNPARTITIONED && partition_new->filesystem == FS_CLEARED )
+ if (partition_original->type == TYPE_UNPARTITIONED && partition_new->fstype == FS_CLEARED)
{
// Make format to cleared whole disk device file system preview as
// unallocated device, matching what happens when implemented.
diff --git a/src/Partition.cc b/src/Partition.cc
index f9155f48..ebf3b25c 100644
--- a/src/Partition.cc
+++ b/src/Partition.cc
@@ -41,7 +41,7 @@ void Partition::Reset()
status = STAT_REAL;
type = TYPE_UNALLOCATED;
alignment = ALIGN_STRICT ;
- filesystem = FS_UNALLOCATED;
+ fstype = FS_UNALLOCATED;
have_filesystem_label = false;
uuid .clear() ;
name.clear();
@@ -62,7 +62,7 @@ void Partition::Set( const Glib::ustring & device_path,
const Glib::ustring & partition,
int partition_number,
PartitionType type,
- FSType filesystem,
+ FSType fstype,
Sector sector_start,
Sector sector_end,
Byte_Value sector_size,
@@ -73,7 +73,7 @@ void Partition::Set( const Glib::ustring & device_path,
this->path = partition;
this ->partition_number = partition_number;
this ->type = type;
- this ->filesystem = filesystem;
+ this->fstype = fstype;
this ->sector_start = sector_start;
this ->sector_end = sector_end;
this ->sector_size = sector_size;
diff --git a/src/PartitionLUKS.cc b/src/PartitionLUKS.cc
index dfefb5e5..012c9ad9 100644
--- a/src/PartitionLUKS.cc
+++ b/src/PartitionLUKS.cc
@@ -49,7 +49,7 @@ Partition * PartitionLUKS::clone_as_plain() const
Partition * plain_ptn = new Partition( *this );
// Copy over file system attributes.
- plain_ptn->filesystem = this->encrypted.filesystem;
+ plain_ptn->fstype = this->encrypted.fstype;
plain_ptn->uuid = this->encrypted.uuid;
plain_ptn->busy = this->encrypted.busy;
plain_ptn->fs_block_size = this->encrypted.fs_block_size;
@@ -247,7 +247,7 @@ Partition & PartitionLUKS::get_filesystem_partition()
const Glib::ustring PartitionLUKS::get_filesystem_string() const
{
if ( busy )
- return Utils::get_filesystem_string( true, encrypted.filesystem );
+ return Utils::get_filesystem_string(true, encrypted.fstype);
return Utils::get_encrypted_string();
}
diff --git a/src/TreeView_Detail.cc b/src/TreeView_Detail.cc
index e64dc9f1..e34075ed 100644
--- a/src/TreeView_Detail.cc
+++ b/src/TreeView_Detail.cc
@@ -187,7 +187,7 @@ void TreeView_Detail::create_row( const Gtk::TreeRow & treerow,
show_names = true;
// file system
- treerow[treeview_detail_columns.color] = Utils::get_color_as_pixbuf( filesystem_ptn.filesystem, 16, 16 );
+ treerow[treeview_detail_columns.color] = Utils::get_color_as_pixbuf(filesystem_ptn.fstype, 16, 16);
treerow[treeview_detail_columns.filesystem] = partition.get_filesystem_string();
// mount point
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 2ffb00b1..159afcb4 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -1057,7 +1057,7 @@ void Win_GParted::Refresh_Visual()
copied_partition = display_partitions[t].clone();
}
- if ( display_partitions[t].filesystem == FS_UNALLOCATED )
+ if (display_partitions[t].fstype == FS_UNALLOCATED)
{
current_size = display_partitions[t].get_sector_length();
if ( current_size > largest_unalloc_size )
@@ -1078,7 +1078,7 @@ void Win_GParted::Refresh_Visual()
copied_partition = display_partitions[t].logicals[u].clone();
}
- if ( display_partitions[t].logicals[u].filesystem == FS_UNALLOCATED )
+ if (display_partitions[t].logicals[u].fstype == FS_UNALLOCATED)
{
current_size = display_partitions[t].logicals[u].get_sector_length();
if ( current_size > largest_unalloc_size )
@@ -1195,14 +1195,14 @@ void Win_GParted::set_valid_operations()
const Partition & selected_filesystem = selected_partition_ptr->get_filesystem_partition();
// Get file system and LUKS encryption capabilities
- const FS & fs_cap = gparted_core.get_fs( selected_filesystem.filesystem );
+ const FS& fs_cap = gparted_core.get_fs(selected_filesystem.fstype);
const FS & enc_cap = gparted_core.get_fs( FS_LUKS );
//if there's something, there's some info ;)
allow_info( true ) ;
// Set appropriate name for the open/close crypt menu item.
- if ( selected_partition_ptr->filesystem == FS_LUKS )
+ if (selected_partition_ptr->fstype == FS_LUKS)
{
dynamic_cast(partitionmenu_items[MENU_TOGGLE_CRYPT_BUSY]->get_child())
->set_label( luks_filesystem_object->get_custom_text( selected_partition_ptr->busy
@@ -1210,9 +1210,9 @@ void Win_GParted::set_valid_operations()
: CTEXT_ACTIVATE_FILESYSTEM ) );
}
// Set appropriate name for the file system active/deactivate menu item.
- if ( selected_partition_ptr->filesystem != FS_LUKS || selected_partition_ptr->busy )
+ if (selected_partition_ptr->fstype != FS_LUKS || selected_partition_ptr->busy)
{
- const FileSystem * filesystem_object = gparted_core.get_filesystem_object( selected_filesystem.filesystem );
+ const FileSystem *filesystem_object = gparted_core.get_filesystem_object(selected_filesystem.fstype);
if ( filesystem_object )
{
dynamic_cast(partitionmenu_items[MENU_TOGGLE_FS_BUSY]->get_child())
@@ -1230,21 +1230,21 @@ void Win_GParted::set_valid_operations()
}
// Only permit encryption open/close when available
- if ( selected_partition_ptr->status == STAT_REAL &&
- selected_partition_ptr->filesystem == FS_LUKS &&
- ! selected_filesystem.busy )
+ if (selected_partition_ptr->status == STAT_REAL &&
+ selected_partition_ptr->fstype == FS_LUKS &&
+ ! selected_filesystem.busy )
allow_toggle_crypt_busy_state( true );
// Only permit file system mount/unmount and swapon/swapoff when available
if ( selected_partition_ptr->status == STAT_REAL
&& selected_partition_ptr->type != TYPE_EXTENDED
- && selected_filesystem.filesystem != FS_LVM2_PV
- && selected_filesystem.filesystem != FS_LINUX_SWRAID
- && selected_filesystem.filesystem != FS_ATARAID
- && selected_filesystem.filesystem != FS_LUKS
+ && selected_filesystem.fstype != FS_LVM2_PV
+ && selected_filesystem.fstype != FS_LINUX_SWRAID
+ && selected_filesystem.fstype != FS_ATARAID
+ && selected_filesystem.fstype != FS_LUKS
&& ( selected_filesystem.busy
|| selected_filesystem.get_mountpoints().size() /* Have mount point(s) */
- || selected_filesystem.filesystem == FS_LINUX_SWAP
+ || selected_filesystem.fstype == FS_LINUX_SWAP
)
)
allow_toggle_fs_busy_state( true );
@@ -1254,7 +1254,7 @@ void Win_GParted::set_valid_operations()
// with "Volume group "VGNAME" is exported", otherwise user won't know why the
// inactive PV can't be activated.
if ( selected_partition_ptr->status == STAT_REAL
- && selected_filesystem.filesystem == FS_LVM2_PV // Active VGNAME from mount point
+ && selected_filesystem.fstype == FS_LVM2_PV // Active VGNAME from mount point
&& ( selected_filesystem.busy || selected_filesystem.get_mountpoints().size() > 0 )
)
allow_toggle_fs_busy_state( true );
@@ -1280,12 +1280,12 @@ void Win_GParted::set_valid_operations()
selected_filesystem.busy )
{
// Can the plain file system be online resized?
- if ( selected_partition_ptr->filesystem != FS_LUKS &&
- ( fs_cap.online_grow || fs_cap.online_shrink ) )
+ if (selected_partition_ptr->fstype != FS_LUKS &&
+ (fs_cap.online_grow || fs_cap.online_shrink) )
allow_resize( true );
// Is resizing an open LUKS mapping and the online file system within
// supported?
- if ( selected_partition_ptr->filesystem == FS_LUKS &&
+ if ( selected_partition_ptr->fstype == FS_LUKS &&
selected_partition_ptr->busy &&
( ( enc_cap.online_grow && fs_cap.online_grow ) ||
( enc_cap.online_shrink && fs_cap.online_shrink ) ) )
@@ -1301,7 +1301,7 @@ void Win_GParted::set_valid_operations()
return ;
// UNALLOCATED space within a partition table or UNALLOCATED whole disk device
- if ( selected_partition_ptr->filesystem == FS_UNALLOCATED )
+ if (selected_partition_ptr->fstype == FS_UNALLOCATED)
allow_new( true );
// UNALLOCATED space within a partition table
@@ -1314,11 +1314,11 @@ void Win_GParted::set_valid_operations()
// implemented.
if ( copied_partition != NULL &&
! devices[current_device].readonly &&
- copied_partition->filesystem != FS_LUKS )
+ copied_partition->fstype != FS_LUKS )
{
const Partition & copied_filesystem_ptn = copied_partition->get_filesystem_partition();
Byte_Value required_size ;
- if ( copied_filesystem_ptn.filesystem == FS_XFS )
+ if (copied_filesystem_ptn.fstype == FS_XFS)
required_size = copied_filesystem_ptn.estimated_min_size() *
copied_filesystem_ptn.sector_size;
else
@@ -1386,7 +1386,7 @@ void Win_GParted::set_valid_operations()
if ( ( selected_partition_ptr->type == TYPE_PRIMARY ||
selected_partition_ptr->type == TYPE_LOGICAL ||
selected_partition_ptr->type == TYPE_UNPARTITIONED ) &&
- selected_partition_ptr->filesystem != FS_UNALLOCATED )
+ selected_partition_ptr->fstype != FS_UNALLOCATED )
{
allow_format( true ) ;
@@ -1402,17 +1402,17 @@ void Win_GParted::set_valid_operations()
if ( ! devices[current_device].readonly )
{
// Can the plain file system be resized or moved?
- if ( selected_partition_ptr->filesystem != FS_LUKS &&
- ( fs_cap.grow || fs_cap.shrink || fs_cap.move ) )
+ if (selected_partition_ptr->fstype != FS_LUKS &&
+ (fs_cap.grow || fs_cap.shrink || fs_cap.move) )
allow_resize( true );
// Is growing or moving this closed LUKS mapping permitted?
- if ( selected_partition_ptr->filesystem == FS_LUKS &&
- ! selected_partition_ptr->busy &&
- ( enc_cap.grow || enc_cap.move ) )
+ if (selected_partition_ptr->fstype == FS_LUKS &&
+ ! selected_partition_ptr->busy &&
+ (enc_cap.grow || enc_cap.move) )
allow_resize( true );
// Is resizing an open LUKS mapping and the file system within
// supported?
- if ( selected_partition_ptr->filesystem == FS_LUKS &&
+ if ( selected_partition_ptr->fstype == FS_LUKS &&
selected_partition_ptr->busy &&
( ( enc_cap.online_grow && fs_cap.grow ) ||
( enc_cap.online_shrink && fs_cap.shrink ) ) )
@@ -1421,9 +1421,9 @@ void Win_GParted::set_valid_operations()
// Only allow copying of real partitions, excluding closed encryption
// (which are only copied while open).
- if ( selected_partition_ptr->status == STAT_REAL &&
- selected_filesystem.filesystem != FS_LUKS &&
- fs_cap.copy )
+ if (selected_partition_ptr->status == STAT_REAL &&
+ selected_filesystem.fstype != FS_LUKS &&
+ fs_cap.copy )
allow_copy( true ) ;
//only allow labelling of real partitions that support labelling
@@ -1436,9 +1436,9 @@ void Win_GParted::set_valid_operations()
// Generate Mount on submenu, except for LVM2 PVs borrowing mount point to
// display the VGNAME and read-only supported LUKS.
- if ( selected_filesystem.filesystem != FS_LVM2_PV &&
- selected_filesystem.filesystem != FS_LUKS &&
- selected_filesystem.get_mountpoints().size() )
+ if (selected_filesystem.fstype != FS_LVM2_PV &&
+ selected_filesystem.fstype != FS_LUKS &&
+ selected_filesystem.get_mountpoints().size() )
{
partitionmenu_items[MENU_MOUNT]->unset_submenu();
@@ -1987,11 +1987,11 @@ void Win_GParted::activate_resize()
}
Partition * working_ptn;
- const FSType fstype = selected_filesystem_ptn.filesystem;
+ const FSType fstype = selected_filesystem_ptn.fstype;
FS fs_cap = gparted_core.get_fs( fstype );
FS_Limits fs_limits = gparted_core.get_filesystem_limits( fstype, selected_filesystem_ptn );
- if ( selected_partition_ptr->filesystem == FS_LUKS && selected_partition_ptr->busy )
+ if (selected_partition_ptr->fstype == FS_LUKS && selected_partition_ptr->busy)
{
const FS & enc_cap = gparted_core.get_fs( FS_LUKS );
@@ -2122,8 +2122,8 @@ void Win_GParted::activate_paste()
g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid display partition object
// Unrecognised whole disk device (See GParted_Core::set_device_from_disk(), "unrecognized")
- if ( selected_partition_ptr->type == TYPE_UNPARTITIONED &&
- selected_partition_ptr->filesystem == FS_UNALLOCATED )
+ if (selected_partition_ptr->type == TYPE_UNPARTITIONED &&
+ selected_partition_ptr->fstype == FS_UNALLOCATED )
{
show_disklabel_unrecognized( devices [current_device ] .get_path() ) ;
return ;
@@ -2136,7 +2136,7 @@ void Win_GParted::activate_paste()
if ( ! max_amount_prim_reached() )
{
FS_Limits fs_limits = gparted_core.get_filesystem_limits(
- copied_filesystem_ptn.filesystem,
+ copied_filesystem_ptn.fstype,
copied_filesystem_ptn );
// We don't want the messages, mount points or name of the source
@@ -2147,7 +2147,7 @@ void Win_GParted::activate_paste()
part_temp->name.clear();
Dialog_Partition_Copy dialog(devices[current_device],
- gparted_core.get_fs(copied_filesystem_ptn.filesystem),
+ gparted_core.get_fs(copied_filesystem_ptn.fstype),
fs_limits,
*selected_partition_ptr,
*part_temp);
@@ -2183,8 +2183,8 @@ void Win_GParted::activate_paste()
bool shown_dialog = false ;
// VGNAME from mount mount
- if ( selected_filesystem_ptn.filesystem == FS_LVM2_PV &&
- ! selected_filesystem_ptn.get_mountpoint().empty() )
+ if (selected_filesystem_ptn.fstype == FS_LVM2_PV &&
+ ! selected_filesystem_ptn.get_mountpoint().empty() )
{
if ( ! remove_non_empty_lvm2_pv_dialog( OPERATION_COPY ) )
return ;
@@ -2192,7 +2192,7 @@ void Win_GParted::activate_paste()
}
Partition * partition_new;
- if ( selected_partition_ptr->filesystem == FS_LUKS && ! selected_partition_ptr->busy )
+ if (selected_partition_ptr->fstype == FS_LUKS && ! selected_partition_ptr->busy)
{
// Pasting into a closed LUKS encrypted partition will overwrite
// the encryption replacing it with a non-encrypted file system.
@@ -2221,7 +2221,7 @@ void Win_GParted::activate_paste()
// Sub-block so that filesystem_ptn_new reference goes out of
// scope before partition_new pointer is deallocated.
Partition & filesystem_ptn_new = partition_new->get_filesystem_partition();
- filesystem_ptn_new.filesystem = copied_filesystem_ptn.filesystem;
+ filesystem_ptn_new.fstype = copied_filesystem_ptn.fstype;
filesystem_ptn_new.set_filesystem_label( copied_filesystem_ptn.get_filesystem_label() );
filesystem_ptn_new.uuid = copied_filesystem_ptn.uuid;
Sector new_size = filesystem_ptn_new.get_sector_length();
@@ -2294,8 +2294,8 @@ void Win_GParted::activate_new()
g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid display partition object
// Unrecognised whole disk device (See GParted_Core::set_device_from_disk(), "unrecognized")
- if ( selected_partition_ptr->type == TYPE_UNPARTITIONED &&
- selected_partition_ptr->filesystem == FS_UNALLOCATED )
+ if (selected_partition_ptr->type == TYPE_UNPARTITIONED &&
+ selected_partition_ptr->fstype == FS_UNALLOCATED )
{
show_disklabel_unrecognized( devices [current_device ] .get_path() ) ;
}
@@ -2335,7 +2335,7 @@ void Win_GParted::activate_delete()
g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid display partition object
// VGNAME from mount mount
- if ( selected_partition_ptr->filesystem == FS_LVM2_PV && ! selected_partition_ptr->get_mountpoint().empty() )
+ if (selected_partition_ptr->fstype == FS_LVM2_PV && ! selected_partition_ptr->get_mountpoint().empty())
{
if ( ! remove_non_empty_lvm2_pv_dialog( OPERATION_DELETE ) )
return ;
@@ -2383,7 +2383,7 @@ void Win_GParted::activate_delete()
/*TO TRANSLATORS: dialogtitle, looks like Delete /dev/hda2 (ntfs, 2345 MiB) */
dialog.set_title( Glib::ustring::compose( _("Delete %1 (%2, %3)"),
selected_partition_ptr->get_path(),
- Utils::get_filesystem_string( selected_partition_ptr->filesystem ),
+ Utils::get_filesystem_string(selected_partition_ptr->fstype),
Utils::format_size( selected_partition_ptr->get_sector_length(), selected_partition_ptr->sector_size ) ) );
dialog .add_button( Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL );
dialog .add_button( Gtk::Stock::DELETE, Gtk::RESPONSE_OK );
@@ -2460,7 +2460,7 @@ void Win_GParted::activate_format( FSType new_fs )
const Partition & filesystem_ptn = selected_partition_ptr->get_filesystem_partition();
// For non-empty LVM2 PV confirm overwrite before continuing. VGNAME from mount mount.
- if ( filesystem_ptn.filesystem == FS_LVM2_PV && ! filesystem_ptn.get_mountpoint().empty() )
+ if (filesystem_ptn.fstype == FS_LVM2_PV && ! filesystem_ptn.get_mountpoint().empty())
{
if ( ! remove_non_empty_lvm2_pv_dialog( OPERATION_FORMAT ) )
return ;
@@ -2468,7 +2468,7 @@ void Win_GParted::activate_format( FSType new_fs )
// Compose Partition object to represent the format operation.
Partition * temp_ptn;
- if ( selected_partition_ptr->filesystem == FS_LUKS && ! selected_partition_ptr->busy )
+ if (selected_partition_ptr->fstype == FS_LUKS && ! selected_partition_ptr->busy)
{
// Formatting a closed LUKS encrypted partition will erase the encryption
// replacing it with a non-encrypted file system. Start with a plain
@@ -2515,7 +2515,7 @@ void Win_GParted::activate_format( FSType new_fs )
// Generate minimum and maximum partition size limits for the new file system.
FS_Limits fs_limits = gparted_core.get_filesystem_limits( new_fs, temp_ptn->get_filesystem_partition() );
bool encrypted = false;
- if ( selected_partition_ptr->filesystem == FS_LUKS && selected_partition_ptr->busy )
+ if (selected_partition_ptr->fstype == FS_LUKS && selected_partition_ptr->busy)
{
encrypted = true;
// Calculate the actual overhead rather than just using the size of the
@@ -2847,21 +2847,21 @@ void Win_GParted::toggle_fs_busy_state()
Glib::ustring pulse_msg;
Glib::ustring failure_msg;
const Partition & filesystem_ptn = selected_partition_ptr->get_filesystem_partition();
- if ( filesystem_ptn.filesystem == FS_LINUX_SWAP && filesystem_ptn.busy )
+ if (filesystem_ptn.fstype == FS_LINUX_SWAP && filesystem_ptn.busy)
{
action = SWAPOFF;
disallowed_msg = _("The swapoff action cannot be performed when there are operations pending for the partition.");
pulse_msg = Glib::ustring::compose( _("Deactivating swap on %1"), filesystem_ptn.get_path() );
failure_msg = _("Could not deactivate swap");
}
- else if ( filesystem_ptn.filesystem == FS_LINUX_SWAP && ! filesystem_ptn.busy )
+ else if (filesystem_ptn.fstype == FS_LINUX_SWAP && ! filesystem_ptn.busy)
{
action = SWAPON;
disallowed_msg = _("The swapon action cannot be performed when there are operations pending for the partition.");
pulse_msg = Glib::ustring::compose( _("Activating swap on %1"), filesystem_ptn.get_path() );
failure_msg = _("Could not activate swap");
}
- else if ( filesystem_ptn.filesystem == FS_LVM2_PV && filesystem_ptn.busy )
+ else if (filesystem_ptn.fstype == FS_LVM2_PV && filesystem_ptn.busy)
{
action = DEACTIVATE_VG;
disallowed_msg = _("The deactivate Volume Group action cannot be performed when there are operations pending for the partition.");
@@ -2869,7 +2869,7 @@ void Win_GParted::toggle_fs_busy_state()
filesystem_ptn.get_mountpoint() ); // VGNAME from point point
failure_msg = _("Could not deactivate Volume Group");
}
- else if ( filesystem_ptn.filesystem == FS_LVM2_PV && ! filesystem_ptn.busy )
+ else if (filesystem_ptn.fstype == FS_LVM2_PV && ! filesystem_ptn.busy)
{
action = ACTIVATE_VG;
disallowed_msg = _("The activate Volume Group action cannot be performed when there are operations pending for the partition.");
@@ -2971,7 +2971,7 @@ void Win_GParted::activate_mount_partition( unsigned int index )
{
error_msg = "# " + cmd + "\n" + error + "";
- Glib::ustring type = Utils::get_filesystem_kernel_name( filesystem_ptn.filesystem );
+ Glib::ustring type = Utils::get_filesystem_kernel_name(filesystem_ptn.fstype);
if ( ! type.empty() )
{
// Second try mounting specifying the GParted determined file
@@ -3266,7 +3266,7 @@ void Win_GParted::activate_change_uuid()
g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid display partition object
const Partition & filesystem_ptn = selected_partition_ptr->get_filesystem_partition();
- const FileSystem * filesystem_object = gparted_core.get_filesystem_object( filesystem_ptn.filesystem );
+ const FileSystem *filesystem_object = gparted_core.get_filesystem_object(filesystem_ptn.fstype);
if ( filesystem_object->get_custom_text( CTEXT_CHANGE_UUID_WARNING ) != "" )
{
int i ;
@@ -3294,7 +3294,7 @@ void Win_GParted::activate_change_uuid()
// Sub-block so that temp_filesystem_ptn reference goes out of scope
// before temp_ptn pointer is deallocated.
Partition & temp_filesystem_ptn = temp_ptn->get_filesystem_partition();
- if ( temp_filesystem_ptn.filesystem == FS_NTFS )
+ if (temp_filesystem_ptn.fstype == FS_NTFS)
// Explicitly ask for half, so that the user will be aware of it
// Also, keep this kind of policy out of the NTFS code.
temp_filesystem_ptn.uuid = UUID_RANDOM_NTFS_HALF;
diff --git a/src/udf.cc b/src/udf.cc
index 1c420a59..48625ea0 100644
--- a/src/udf.cc
+++ b/src/udf.cc
@@ -70,7 +70,7 @@ FS udf::get_filesystem_support()
FS_Limits udf::get_filesystem_limits( const Partition & partition ) const
{
- if ( partition.filesystem == FS_UDF && partition.fs_block_size > 0 )
+ if (partition.fstype == FS_UDF && partition.fs_block_size > 0)
// Resizing existing UDF file system
return FS_Limits( MIN_UDF_BLOCKS * partition.fs_block_size, MAX_UDF_BLOCKS * partition.fs_block_size );
else