"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/fat16.cc" between
gparted-1.1.0.tar.gz and gparted-1.2.0.tar.gz

About: GParted is a graphical partition editor for creating, reorganizing, and deleting disk partitions (using GNU libparted).

fat16.cc  (gparted-1.1.0):fat16.cc  (gparted-1.2.0)
skipping to change at line 74 skipping to change at line 74
fs.read_uuid = FS::EXTERNAL; fs.read_uuid = FS::EXTERNAL;
if (! Glib::find_program_in_path("minfo").empty()) if (! Glib::find_program_in_path("minfo").empty())
fs.read = FS::EXTERNAL; fs.read = FS::EXTERNAL;
} }
//find out if we can create fat file systems //find out if we can create fat file systems
if ( ! Glib::find_program_in_path( "mkfs.fat" ) .empty() ) if ( ! Glib::find_program_in_path( "mkfs.fat" ) .empty() )
{ {
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() ) {
fs .read_label = FS::EXTERNAL ; fs .read_label = FS::EXTERNAL ;
fs .write_label = FS::EXTERNAL ; fs .write_label = FS::EXTERNAL ;
fs .write_uuid = FS::EXTERNAL ; fs .write_uuid = FS::EXTERNAL ;
} }
#ifdef HAVE_LIBPARTED_FS_RESIZE #ifdef HAVE_LIBPARTED_FS_RESIZE
//resizing of start and endpoint are provided by libparted //resizing of start and endpoint are provided by libparted
skipping to change at line 265 skipping to change at line 252
Glib::ustring cmd = "mlabel -s -n :: -i " + Glib::shell_quote( partition. get_path() ); Glib::ustring cmd = "mlabel -s -n :: -i " + Glib::shell_quote( partition. get_path() );
return ! execute_command( cmd, operationdetail, EXEC_CHECK_STATUS ); return ! execute_command( cmd, operationdetail, EXEC_CHECK_STATUS );
} }
bool fat16::create( const Partition & new_partition, OperationDetail & operation detail ) bool fat16::create( const Partition & new_partition, OperationDetail & operation detail )
{ {
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 " + lab return ! execute_command("mkfs.fat -F" + fat_size + " -v -I " + label_arg
el_args + s +
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 & operati ondetail ) bool fat16::check_repair( const Partition & partition, OperationDetail & operati ondetail )
{ {
exit_status = execute_command( check_cmd + " -a -w -v " + Glib::shell_quo exit_status = execute_command("fsck.fat -a -w -v " + Glib::shell_quote(pa
te( partition .get_path() ), rtition.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;
} }
//Private methods //Private methods
const Glib::ustring fat16::sanitize_label( const Glib::ustring &label ) const const Glib::ustring fat16::sanitize_label( const Glib::ustring &label ) const
{ {
Glib::ustring uppercase_label = label.uppercase(); Glib::ustring uppercase_label = label.uppercase();
 End of changes. 4 change blocks. 
22 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)