Rename fat16 member variable to m_specific_fstype

To make it clear it is a member variable and continue the theme that
variables of type FSType have fstype in their name [1][2].

[1] 58fb230fb0
    Also rename FS.filesystem member to fstype (!52)
[2] b0f92be638
    Rename Partition.filesystem member to fstype (!52)

To make it clear m_old_mkudffs is a member variable.
This commit is contained in:
Mike Fleetwood 2024-08-04 13:26:30 +01:00
parent 84aee63650
commit 63c6b33aee
2 changed files with 8 additions and 6 deletions

View File

@ -27,10 +27,8 @@ namespace GParted
class fat16 : public FileSystem
{
const enum FSType specific_type;
public:
fat16(enum FSType type) : specific_type(type) {};
fat16(enum FSType fstype) : m_specific_fstype(fstype) {};
const Glib::ustring & get_custom_text( CUSTOM_TEXT ttype, int index = 0 ) const;
FS get_filesystem_support() ;
@ -45,8 +43,11 @@ public:
private:
const Glib::ustring sanitize_label( const Glib::ustring & label ) const;
static Glib::ustring remove_spaces(const Glib::ustring& str);
const enum FSType m_specific_fstype;
};
} //GParted
#endif /* GPARTED_FAT16_H */

View File

@ -51,9 +51,10 @@ const Glib::ustring & fat16::get_custom_text( CUSTOM_TEXT ttype, int index ) con
}
}
FS fat16::get_filesystem_support()
{
FS fs( specific_type );
FS fs(m_specific_fstype);
// hack to disable silly mtools warnings
setenv( "MTOOLS_SKIP_CHECK", "1", 0 );
@ -248,7 +249,7 @@ bool fat16::write_uuid( const Partition & partition, OperationDetail & operation
bool fat16::create( const Partition & new_partition, OperationDetail & operationdetail )
{
Glib::ustring fat_size = specific_type == FS_FAT16 ? "16" : "32" ;
Glib::ustring fat_size = m_specific_fstype == FS_FAT16 ? "16" : "32";
Glib::ustring label_args = new_partition.get_filesystem_label().empty() ? "" :
"-n " + Glib::shell_quote( sanitize_label( new_partition.get_filesystem_label() ) ) + " ";
return ! execute_command("mkfs.fat -F" + fat_size + " -v -I " + label_args +
@ -291,7 +292,7 @@ const Glib::ustring fat16::sanitize_label( const Glib::ustring &label ) const
new_label.push_back( uppercase_label[i] );
// Pad with spaces to prevent mlabel writing corrupted labels. See bug #700228.
new_label .resize( Utils::get_filesystem_label_maxlength( specific_type ), ' ' ) ;
new_label.resize( Utils::get_filesystem_label_maxlength(m_specific_fstype), ' ');
return new_label ;
}