Also rename FS.filesystem member to fstype (!52)
Closes !52 - Rename members and variables currently named 'filesystem'
This commit is contained in:
parent
b0f92be638
commit
58fb230fb0
|
@ -61,7 +61,7 @@ struct FS
|
||||||
EXTERNAL = 3
|
EXTERNAL = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
FSType filesystem;
|
FSType fstype;
|
||||||
Support busy; // How to determine if partition/file system is busy
|
Support busy; // How to determine if partition/file system is busy
|
||||||
Support read; // Can and how to read sector usage while inactive
|
Support read; // Can and how to read sector usage while inactive
|
||||||
Support read_label;
|
Support read_label;
|
||||||
|
@ -80,7 +80,7 @@ struct FS
|
||||||
Support online_grow;
|
Support online_grow;
|
||||||
Support online_shrink;
|
Support online_shrink;
|
||||||
|
|
||||||
FS( FSType fstype = FS_UNSUPPORTED ) : filesystem( fstype )
|
FS(FSType fstype_ = FS_UNSUPPORTED) : fstype(fstype_)
|
||||||
{
|
{
|
||||||
busy = read = read_label = write_label = read_uuid = write_uuid = create =
|
busy = read = read_label = write_label = read_uuid = write_uuid = create =
|
||||||
create_with_label = grow = shrink = move = check = copy = remove = online_read =
|
create_with_label = grow = shrink = move = check = copy = remove = online_read =
|
||||||
|
|
|
@ -170,14 +170,14 @@ void DialogFeatures::load_filesystems(const std::vector<FS>& fss)
|
||||||
// Fill the features chart with fully supported file systems.
|
// Fill the features chart with fully supported file systems.
|
||||||
for (unsigned i = 0; i < fss.size(); i++)
|
for (unsigned i = 0; i < fss.size(); i++)
|
||||||
{
|
{
|
||||||
if (GParted_Core::supported_filesystem(fss[i].filesystem))
|
if (GParted_Core::supported_filesystem(fss[i].fstype))
|
||||||
load_one_filesystem(fss[i]);
|
load_one_filesystem(fss[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Find and add "other" at the end, for all the basic supported file systems.
|
// Find and add "other" at the end, for all the basic supported file systems.
|
||||||
for (unsigned i = 0; i < fss.size(); i++)
|
for (unsigned i = 0; i < fss.size(); i++)
|
||||||
{
|
{
|
||||||
if (fss[i].filesystem == FS_OTHER)
|
if (fss[i].fstype == FS_OTHER)
|
||||||
{
|
{
|
||||||
load_one_filesystem(fss[i]);
|
load_one_filesystem(fss[i]);
|
||||||
break;
|
break;
|
||||||
|
@ -189,7 +189,7 @@ void DialogFeatures::load_filesystems(const std::vector<FS>& fss)
|
||||||
void DialogFeatures::load_one_filesystem(const FS& fs)
|
void DialogFeatures::load_one_filesystem(const FS& fs)
|
||||||
{
|
{
|
||||||
treerow = *( liststore_filesystems ->append() );
|
treerow = *( liststore_filesystems ->append() );
|
||||||
treerow[ treeview_filesystems_columns .filesystem ] = Utils::get_filesystem_string( fs .filesystem ) ;
|
treerow[treeview_filesystems_columns.filesystem] = Utils::get_filesystem_string(fs.fstype);
|
||||||
|
|
||||||
treerow[ treeview_filesystems_columns .create ] = fs .create ? icon_yes : icon_no ;
|
treerow[ treeview_filesystems_columns .create ] = fs .create ? icon_yes : icon_no ;
|
||||||
treerow[ treeview_filesystems_columns .grow ] = fs .grow ? icon_yes : icon_no ;
|
treerow[ treeview_filesystems_columns .grow ] = fs .grow ? icon_yes : icon_no ;
|
||||||
|
@ -202,9 +202,10 @@ void DialogFeatures::load_one_filesystem(const FS& fs)
|
||||||
treerow[ treeview_filesystems_columns .label ] = fs .write_label ? icon_yes : icon_no ;
|
treerow[ treeview_filesystems_columns .label ] = fs .write_label ? icon_yes : icon_no ;
|
||||||
treerow[ treeview_filesystems_columns .uuid ] = fs .write_uuid ? icon_yes : icon_no ;
|
treerow[ treeview_filesystems_columns .uuid ] = fs .write_uuid ? icon_yes : icon_no ;
|
||||||
|
|
||||||
treerow[ treeview_filesystems_columns .software ] = Utils::get_filesystem_software( fs .filesystem ) ;
|
treerow[treeview_filesystems_columns.software] = Utils::get_filesystem_software(fs.fstype);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DialogFeatures::~DialogFeatures()
|
DialogFeatures::~DialogFeatures()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ void Dialog_Partition_Copy::set_data( const Partition & selected_partition, cons
|
||||||
fs_limits.max_size = copied_partition.get_byte_length();
|
fs_limits.max_size = copied_partition.get_byte_length();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fs.filesystem == FS_XFS) // Bit hackish, but most effective, since it's a unique situation.
|
if (fs.fstype == FS_XFS) // Bit hackish, but most effective, since it's a unique situation.
|
||||||
fs_limits.min_size = std::max( fs_limits.min_size, min_resize * copied_partition.sector_size );
|
fs_limits.min_size = std::max( fs_limits.min_size, min_resize * copied_partition.sector_size );
|
||||||
else
|
else
|
||||||
fs_limits.min_size = COPIED_LENGTH_MB * MEBIBYTE;
|
fs_limits.min_size = COPIED_LENGTH_MB * MEBIBYTE;
|
||||||
|
|
|
@ -72,26 +72,26 @@ void Dialog_Partition_New::set_data( const Device & device,
|
||||||
this->FILESYSTEMS.clear();
|
this->FILESYSTEMS.clear();
|
||||||
for ( unsigned i = 0 ; i < FILESYSTEMS.size() ; i ++ )
|
for ( unsigned i = 0 ; i < FILESYSTEMS.size() ; i ++ )
|
||||||
{
|
{
|
||||||
if ( GParted_Core::supported_filesystem( FILESYSTEMS[i].filesystem ) &&
|
if (GParted_Core::supported_filesystem(FILESYSTEMS[i].fstype) &&
|
||||||
FILESYSTEMS[i].filesystem != FS_LUKS )
|
FILESYSTEMS[i].fstype != FS_LUKS )
|
||||||
this->FILESYSTEMS.push_back( FILESYSTEMS[i] );
|
this->FILESYSTEMS.push_back( FILESYSTEMS[i] );
|
||||||
}
|
}
|
||||||
|
|
||||||
FS fs_tmp ;
|
FS fs_tmp ;
|
||||||
//... add FS_CLEARED
|
//... add FS_CLEARED
|
||||||
fs_tmp .filesystem = FS_CLEARED ;
|
fs_tmp.fstype = FS_CLEARED;
|
||||||
fs_tmp .create = FS::GPARTED ;
|
fs_tmp .create = FS::GPARTED ;
|
||||||
this ->FILESYSTEMS .push_back( fs_tmp ) ;
|
this ->FILESYSTEMS .push_back( fs_tmp ) ;
|
||||||
|
|
||||||
//... add FS_UNFORMATTED
|
//... add FS_UNFORMATTED
|
||||||
fs_tmp.filesystem = FS_UNFORMATTED;
|
fs_tmp.fstype = FS_UNFORMATTED;
|
||||||
fs_tmp .create = FS::GPARTED ;
|
fs_tmp .create = FS::GPARTED ;
|
||||||
this ->FILESYSTEMS .push_back( fs_tmp ) ;
|
this ->FILESYSTEMS .push_back( fs_tmp ) ;
|
||||||
|
|
||||||
// ... finally add FS_EXTENDED. Needed so that when creating an extended
|
// ... finally add FS_EXTENDED. Needed so that when creating an extended
|
||||||
// partition it is identified correctly before the operation is applied.
|
// partition it is identified correctly before the operation is applied.
|
||||||
fs_tmp = FS();
|
fs_tmp = FS();
|
||||||
fs_tmp.filesystem = FS_EXTENDED;
|
fs_tmp.fstype = FS_EXTENDED;
|
||||||
fs_tmp.create = FS::NONE;
|
fs_tmp.create = FS::NONE;
|
||||||
this ->FILESYSTEMS .push_back( fs_tmp ) ;
|
this ->FILESYSTEMS .push_back( fs_tmp ) ;
|
||||||
|
|
||||||
|
@ -244,7 +244,7 @@ const Partition & Dialog_Partition_New::Get_New_Partition()
|
||||||
new_partition->Set( device_path,
|
new_partition->Set( device_path,
|
||||||
Glib::ustring::compose( _("New Partition #%1"), new_count ),
|
Glib::ustring::compose( _("New Partition #%1"), new_count ),
|
||||||
new_count, part_type,
|
new_count, part_type,
|
||||||
FILESYSTEMS[combo_filesystem.get_active_row_number()].filesystem,
|
FILESYSTEMS[combo_filesystem.get_active_row_number()].fstype,
|
||||||
new_start, new_end,
|
new_start, new_end,
|
||||||
sector_size,
|
sector_size,
|
||||||
inside_extended, false );
|
inside_extended, false );
|
||||||
|
@ -352,7 +352,7 @@ void Dialog_Partition_New::combobox_changed(bool type)
|
||||||
if ( ! type )
|
if ( ! type )
|
||||||
{
|
{
|
||||||
fs = FILESYSTEMS[combo_filesystem.get_active_row_number()];
|
fs = FILESYSTEMS[combo_filesystem.get_active_row_number()];
|
||||||
fs_limits = GParted_Core::get_filesystem_limits( fs.filesystem, *new_partition );
|
fs_limits = GParted_Core::get_filesystem_limits(fs.fstype, *new_partition);
|
||||||
|
|
||||||
if ( fs_limits.min_size < MEBIBYTE )
|
if ( fs_limits.min_size < MEBIBYTE )
|
||||||
fs_limits.min_size = MEBIBYTE;
|
fs_limits.min_size = MEBIBYTE;
|
||||||
|
@ -389,12 +389,12 @@ void Dialog_Partition_New::combobox_changed(bool type)
|
||||||
frame_resizer_base->override_default_rgb_unused_color(color_temp);
|
frame_resizer_base->override_default_rgb_unused_color(color_temp);
|
||||||
|
|
||||||
//Partition color
|
//Partition color
|
||||||
color_temp.set(Utils::get_color(fs.filesystem));
|
color_temp.set(Utils::get_color(fs.fstype));
|
||||||
frame_resizer_base->set_rgb_partition_color(color_temp);
|
frame_resizer_base->set_rgb_partition_color(color_temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Maximum length of the file system label varies according to the selected file system type.
|
// Maximum length of the file system label varies according to the selected file system type.
|
||||||
filesystem_label_entry.set_max_length( Utils::get_filesystem_label_maxlength( fs.filesystem ) );
|
filesystem_label_entry.set_max_length(Utils::get_filesystem_label_maxlength(fs.fstype));
|
||||||
|
|
||||||
frame_resizer_base->redraw();
|
frame_resizer_base->redraw();
|
||||||
}
|
}
|
||||||
|
@ -410,18 +410,18 @@ void Dialog_Partition_New::build_filesystems_combo(bool only_unformatted)
|
||||||
for ( unsigned int t = 0 ; t < FILESYSTEMS .size( ) ; t++ )
|
for ( unsigned int t = 0 ; t < FILESYSTEMS .size( ) ; t++ )
|
||||||
{
|
{
|
||||||
//skip extended
|
//skip extended
|
||||||
if (FILESYSTEMS[t].filesystem == FS_EXTENDED)
|
if (FILESYSTEMS[t].fstype == FS_EXTENDED)
|
||||||
continue ;
|
continue ;
|
||||||
combo_filesystem.items().push_back(Utils::get_filesystem_string(FILESYSTEMS[t].filesystem));
|
combo_filesystem.items().push_back(Utils::get_filesystem_string(FILESYSTEMS[t].fstype));
|
||||||
combo_filesystem.items().back().set_sensitive(
|
combo_filesystem.items().back().set_sensitive(
|
||||||
! only_unformatted && FILESYSTEMS[ t ] .create &&
|
! only_unformatted && FILESYSTEMS[ t ] .create &&
|
||||||
new_partition->get_byte_length() >= get_filesystem_min_limit( FILESYSTEMS[t].filesystem ) );
|
new_partition->get_byte_length() >= get_filesystem_min_limit(FILESYSTEMS[t].fstype));
|
||||||
//use ext4/3/2 as first/second/third choice default file system
|
//use ext4/3/2 as first/second/third choice default file system
|
||||||
//(Depends on ordering in FILESYSTEMS for preference)
|
//(Depends on ordering in FILESYSTEMS for preference)
|
||||||
if ( ( FILESYSTEMS[ t ] .filesystem == FS_EXT2 ||
|
if ((FILESYSTEMS[t].fstype == FS_EXT2 ||
|
||||||
FILESYSTEMS[ t ] .filesystem == FS_EXT3 ||
|
FILESYSTEMS[t].fstype == FS_EXT3 ||
|
||||||
FILESYSTEMS[ t ] .filesystem == FS_EXT4 ) &&
|
FILESYSTEMS[t].fstype == FS_EXT4 ) &&
|
||||||
combo_filesystem.items().back().sensitive() )
|
combo_filesystem.items().back().sensitive() )
|
||||||
{
|
{
|
||||||
first_creatable_fs = combo_filesystem.items().size() - 1;
|
first_creatable_fs = combo_filesystem.items().size() - 1;
|
||||||
set_first=true;
|
set_first=true;
|
||||||
|
|
|
@ -149,7 +149,7 @@ const FS& SupportedFileSystems::get_fs_support(FSType fstype) const
|
||||||
{
|
{
|
||||||
for (unsigned int i = 0; i < m_fs_support.size(); i++)
|
for (unsigned int i = 0; i < m_fs_support.size(); i++)
|
||||||
{
|
{
|
||||||
if (m_fs_support[i].filesystem == fstype)
|
if (m_fs_support[i].fstype == fstype)
|
||||||
return m_fs_support[i];
|
return m_fs_support[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -534,9 +534,9 @@ Gtk::Menu * Win_GParted::create_format_menu()
|
||||||
|
|
||||||
for ( unsigned int t = 0 ; t < fss .size() ; t++ )
|
for ( unsigned int t = 0 ; t < fss .size() ; t++ )
|
||||||
{
|
{
|
||||||
if ( GParted_Core::supported_filesystem( fss[t].filesystem ) &&
|
if (GParted_Core::supported_filesystem(fss[t].fstype) &&
|
||||||
fss[t].filesystem != FS_LUKS )
|
fss[t].fstype != FS_LUKS )
|
||||||
create_format_menu_add_item( fss[t].filesystem, fss[t].create );
|
create_format_menu_add_item(fss[t].fstype, fss[t].create);
|
||||||
}
|
}
|
||||||
//Add cleared at the end of the list
|
//Add cleared at the end of the list
|
||||||
create_format_menu_add_item( FS_CLEARED, true ) ;
|
create_format_menu_add_item( FS_CLEARED, true ) ;
|
||||||
|
|
|
@ -107,7 +107,7 @@ FS fat16::get_filesystem_support()
|
||||||
fs.copy = FS::GPARTED;
|
fs.copy = FS::GPARTED;
|
||||||
fs .online_read = FS::GPARTED ;
|
fs .online_read = FS::GPARTED ;
|
||||||
|
|
||||||
if ( fs .filesystem == FS_FAT16 )
|
if (fs.fstype == FS_FAT16)
|
||||||
{
|
{
|
||||||
fs_limits.min_size = 16 * MEBIBYTE;
|
fs_limits.min_size = 16 * MEBIBYTE;
|
||||||
fs_limits.max_size = (4096 - 1) * MEBIBYTE; // Maximum seems to be just less than 4096 MiB.
|
fs_limits.max_size = (4096 - 1) * MEBIBYTE; // Maximum seems to be just less than 4096 MiB.
|
||||||
|
|
|
@ -346,8 +346,8 @@ std::vector<FSType> SupportedFileSystemsTest::get_supported_fstypes()
|
||||||
const std::vector<FS>& fss = s_supported_filesystems->get_all_fs_support();
|
const std::vector<FS>& fss = s_supported_filesystems->get_all_fs_support();
|
||||||
for (unsigned int i = 0; i < fss.size(); i++)
|
for (unsigned int i = 0; i < fss.size(); i++)
|
||||||
{
|
{
|
||||||
if (s_supported_filesystems->supported_filesystem(fss[i].filesystem))
|
if (s_supported_filesystems->supported_filesystem(fss[i].fstype))
|
||||||
v.push_back(fss[i].filesystem);
|
v.push_back(fss[i].fstype);
|
||||||
}
|
}
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue