[gparted] Fix problem reading some FAT32 partitions (#605175)



commit 1155fa6dabf93f9d305f16241a122b1954852514
Author: Curtis Gedak <gedakc gmail com>
Date:   Thu Jan 14 10:47:21 2010 -0700

    Fix problem reading some FAT32 partitions (#605175)
    
    This problem was introduced with GParted 0.4.7 when the "-a"
    option was removed from the dosfsck command.  The dosfsck command
    is used to read the number of used sectors.  Instead we will now
    use the "-n" option which does not write any changes to the file
    system, and allows non-interactive operation.

 src/fat16.cc |    2 +-
 src/fat32.cc |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/fat16.cc b/src/fat16.cc
index e9eb81b..735ad31 100644
--- a/src/fat16.cc
+++ b/src/fat16.cc
@@ -64,7 +64,7 @@ FS fat16::get_filesystem_support()
 
 void fat16::set_used_sectors( Partition & partition ) 
 {
-	exit_status = Utils::execute_command( "dosfsck -v " + partition .get_path(), output, error, true ) ;
+	exit_status = Utils::execute_command( "dosfsck -n -v " + partition .get_path(), output, error, true ) ;
 	if ( exit_status == 0 || exit_status == 1 || exit_status == 256 )
 	{
 		//free clusters
diff --git a/src/fat32.cc b/src/fat32.cc
index 82f25e0..689768b 100644
--- a/src/fat32.cc
+++ b/src/fat32.cc
@@ -64,7 +64,7 @@ FS fat32::get_filesystem_support()
 void fat32::set_used_sectors( Partition & partition ) 
 {
 	//FIXME: i've encoutered a readonly fat32 file system.. this won't work with the -a ... best check also without the -a
-	exit_status = Utils::execute_command( "dosfsck -v " + partition .get_path(), output, error, true ) ;
+	exit_status = Utils::execute_command( "dosfsck -n -v " + partition .get_path(), output, error, true ) ;
 	if ( exit_status == 0 || exit_status == 1 || exit_status == 256 )
 	{
 		//free clusters



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]