From 1155fa6dabf93f9d305f16241a122b1954852514 Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Thu, 14 Jan 2010 10:47:21 -0700 Subject: [PATCH] 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 e9eb81bc..735ad311 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 82f25e0e..689768b4 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