Made set_used_sectors method less meddlesome for FAT16/32

Removed the "-a" flag from the dosfsck command that is used to
determine the number of used sectors in FAT16 and FAT32 file systems.

Related to GParted bug #569921
This commit is contained in:
Curtis Gedak 2009-08-11 15:33:59 -06:00
parent 6d90d0fbcd
commit 6fa8ad4818
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Bart Hakvoort
/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Bart Hakvoort
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -63,7 +63,7 @@ FS fat16::get_filesystem_support()
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 -v " + partition .get_path(), output, error, true ) ;
if ( exit_status == 0 || exit_status == 1 || exit_status == 256 )
{
//free clusters

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2004, 2005, 2006, 2007, 2008 Bart Hakvoort
/* Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Bart Hakvoort
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -63,7 +63,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 -a -v " + partition .get_path(), output, error, true ) ;
exit_status = Utils::execute_command( "dosfsck -v " + partition .get_path(), output, error, true ) ;
if ( exit_status == 0 || exit_status == 1 || exit_status == 256 )
{
//free clusters