Raise minimum supported dosfstools to 3.0.18 (!57)
This earlier commit [1] from 2013 recognised the new names for programs
in dosfstools >= 3.0.18, specifically mkfs.fat and fsck.fat. Now that
the oldest supported distributions use dosfstools >= 3.0.18 it is no
longer necessary to support using the old names of mkdosfs and dosfsck,
so remove that code.
Oldest supported Dosfstools
distributions Version
Debian 8 3.0.27
RHEL / CentOS 7 3.0.20
SLES 12 3.0.26
Ubuntu 14.04 LTS 3.0.26
[1] 1ae03dee95
Recognise new dosfstools program names (#704629)
Closes !57 - Raise minimum support dosfstools to 3.0.18 released
2013-06-06
This commit is contained in:
parent
b7dd5480cd
commit
a9015111b9
23
src/fat16.cc
23
src/fat16.cc
|
@ -72,24 +72,11 @@ FS fat16::get_filesystem_support()
|
||||||
{
|
{
|
||||||
fs.create = FS::EXTERNAL;
|
fs.create = FS::EXTERNAL;
|
||||||
fs.create_with_label = FS::EXTERNAL;
|
fs.create_with_label = FS::EXTERNAL;
|
||||||
create_cmd = "mkfs.fat" ;
|
|
||||||
}
|
|
||||||
else if ( ! Glib::find_program_in_path( "mkdosfs" ) .empty() )
|
|
||||||
{
|
|
||||||
fs.create = FS::EXTERNAL;
|
|
||||||
fs.create_with_label = FS::EXTERNAL;
|
|
||||||
create_cmd = "mkdosfs" ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! Glib::find_program_in_path( "fsck.fat" ) .empty() )
|
if ( ! Glib::find_program_in_path( "fsck.fat" ) .empty() )
|
||||||
{
|
{
|
||||||
fs.check = FS::EXTERNAL;
|
fs.check = FS::EXTERNAL;
|
||||||
check_cmd = "fsck.fat" ;
|
|
||||||
}
|
|
||||||
else if ( ! Glib::find_program_in_path( "dosfsck" ) .empty() )
|
|
||||||
{
|
|
||||||
fs.check = FS::EXTERNAL;
|
|
||||||
check_cmd = "dosfsck" ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! Glib::find_program_in_path( "mlabel" ) .empty() ) {
|
if ( ! Glib::find_program_in_path( "mlabel" ) .empty() ) {
|
||||||
|
@ -264,17 +251,17 @@ bool fat16::create( const Partition & new_partition, OperationDetail & operation
|
||||||
Glib::ustring fat_size = specific_type == FS_FAT16 ? "16" : "32" ;
|
Glib::ustring fat_size = specific_type == FS_FAT16 ? "16" : "32" ;
|
||||||
Glib::ustring label_args = new_partition.get_filesystem_label().empty() ? "" :
|
Glib::ustring label_args = new_partition.get_filesystem_label().empty() ? "" :
|
||||||
"-n " + Glib::shell_quote( sanitize_label( new_partition.get_filesystem_label() ) ) + " ";
|
"-n " + Glib::shell_quote( sanitize_label( new_partition.get_filesystem_label() ) ) + " ";
|
||||||
return ! execute_command( create_cmd + " -F" + fat_size + " -v -I " + label_args +
|
return ! execute_command("mkfs.fat -F" + fat_size + " -v -I " + label_args +
|
||||||
Glib::shell_quote( new_partition.get_path() ),
|
Glib::shell_quote(new_partition.get_path()),
|
||||||
operationdetail,
|
operationdetail,
|
||||||
EXEC_CHECK_STATUS|EXEC_CANCEL_SAFE );
|
EXEC_CHECK_STATUS|EXEC_CANCEL_SAFE);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool fat16::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
bool fat16::check_repair( const Partition & partition, OperationDetail & operationdetail )
|
||||||
{
|
{
|
||||||
exit_status = execute_command( check_cmd + " -a -w -v " + Glib::shell_quote( partition .get_path() ),
|
exit_status = execute_command("fsck.fat -a -w -v " + Glib::shell_quote(partition.get_path()),
|
||||||
operationdetail,
|
operationdetail,
|
||||||
EXEC_CANCEL_SAFE );
|
EXEC_CANCEL_SAFE);
|
||||||
bool success = ( exit_status == 0 || exit_status == 1 );
|
bool success = ( exit_status == 0 || exit_status == 1 );
|
||||||
set_status( operationdetail, success );
|
set_status( operationdetail, success );
|
||||||
return success;
|
return success;
|
||||||
|
|
Loading…
Reference in New Issue