return true if filesystem was succesfully modified by dosfsck.

* src/fat16.cc,
  src/fat32.cc: return true if filesystem was succesfully modified by
  dosfsck.
This commit is contained in:
Bart Hakvoort 2006-09-09 11:11:32 +00:00
parent 7044410a08
commit 9010255c1c
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2006-09-09 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/fat16.cc,
src/fat32.cc: return true if filesystem was succesfully modified by
dosfsck.
2006-09-09 Bart Hakvoort <hakvoort@cvs.gnome.org> 2006-09-09 Bart Hakvoort <hakvoort@cvs.gnome.org>
* include/Dialog_Progress.h, * include/Dialog_Progress.h,

View File

@ -52,7 +52,7 @@ FS fat16::get_filesystem_support()
void fat16::set_used_sectors( Partition & partition ) void fat16::set_used_sectors( Partition & partition )
{ {
exit_status = Utils::execute_command( "dosfsck -a -v " + partition .get_path(), output, error, true ) ; exit_status = Utils::execute_command( "dosfsck -a -v " + partition .get_path(), output, error, true ) ;
if ( exit_status == 0 || exit_status == 1 ) if ( exit_status == 0 || exit_status == 1 || exit_status == 256 )
{ {
//free clusters //free clusters
index = output .find( ",", output .find( partition .get_path() ) + partition .get_path() .length() ) +1 ; index = output .find( ",", output .find( partition .get_path() ) + partition .get_path() .length() ) +1 ;
@ -100,7 +100,7 @@ bool fat16::check_repair( const Partition & partition, OperationDetail & operati
{ {
exit_status = execute_command( "dosfsck -a -w -v " + partition .get_path(), operationdetail ) ; exit_status = execute_command( "dosfsck -a -w -v " + partition .get_path(), operationdetail ) ;
return ( exit_status == 0 || exit_status == 1 ) ; return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
} }
} //GParted } //GParted

View File

@ -52,7 +52,7 @@ void fat32::set_used_sectors( Partition & partition )
{ {
//FIXME: i've encoutered a readonly fat32 filesystem.. this won't work with the -a ... best check also without the -a //FIXME: i've encoutered a readonly fat32 filesystem.. this won't work with the -a ... best check also without the -a
exit_status = Utils::execute_command( "dosfsck -a -v " + partition .get_path(), output, error, true ) ; exit_status = Utils::execute_command( "dosfsck -a -v " + partition .get_path(), output, error, true ) ;
if ( exit_status == 0 || exit_status == 1 ) if ( exit_status == 0 || exit_status == 1 || exit_status == 256 )
{ {
//free clusters //free clusters
index = output .find( ",", output .find( partition .get_path() ) + partition .get_path() .length() ) +1 ; index = output .find( ",", output .find( partition .get_path() ) + partition .get_path() .length() ) +1 ;
@ -100,7 +100,7 @@ bool fat32::check_repair( const Partition & partition, OperationDetail & operati
{ {
exit_status = execute_command( "dosfsck -a -w -v " + partition .get_path(), operationdetail ) ; exit_status = execute_command( "dosfsck -a -w -v " + partition .get_path(), operationdetail ) ;
return ( exit_status == 0 || exit_status == 1 ) ; return ( exit_status == 0 || exit_status == 1 || exit_status == 256 ) ;
} }
} //GParted } //GParted