availability of 'tune2fs' command wasn't detected correctly. fixed make

* src/ext3.cc: availability of 'tune2fs' command wasn't detected correctly. fixed
* src/fat32.cc: make use of dosfs tools (mkdosfs -F32) instead of libparted's Fat-creator.
* po/POTFILES.in: added src/GParted_Core.cc
This commit is contained in:
Bart Hakvoort 2004-11-17 14:12:18 +00:00
parent 4ccf831ec7
commit 410ab30975
6 changed files with 19 additions and 32 deletions

View File

@ -1,3 +1,8 @@
2004-11-17 Bart Hakvoort <gparted@users.sf.net>
* src/ext3.cc: availability of 'tune2fs' command wasn't detected correctly. fixed
* src/fat32.cc: make use of dosfs tools (mkdosfs -F32) instead of libparted's Fat-creator.
2004-11-17 Bart Hakvoort <gparted@users.sf.net> 2004-11-17 Bart Hakvoort <gparted@users.sf.net>
* Rewrote a large part of gparteds internal code. Filesystemssupport is now much more separated from the rest of gparted and * Rewrote a large part of gparteds internal code. Filesystemssupport is now much more separated from the rest of gparted and

View File

@ -1,3 +1,7 @@
2004-11-17 Bart Hakvoort <gparted@users.sf.net>
* POTFILES.in: added src/GParted_Core.cc
2004-11-09 Miloslav Trmac <mitr@volny.cz> 2004-11-09 Miloslav Trmac <mitr@volny.cz>
* cs.po: Updated Czech translation. * cs.po: Updated Czech translation.

View File

@ -8,6 +8,7 @@ src/Dialog_Partition_Info.cc
src/Dialog_Partition_New.cc src/Dialog_Partition_New.cc
src/Dialog_Partition_Resize_Move.cc src/Dialog_Partition_Resize_Move.cc
src/Dialog_Progress.cc src/Dialog_Progress.cc
src/GParted_Core.cc
src/Operation.cc src/Operation.cc
src/Partition.cc src/Partition.cc
src/TreeView_Detail.cc src/TreeView_Detail.cc

View File

@ -27,7 +27,7 @@ FS ext3::get_filesystem_support( )
fs .filesystem = "ext3" ; fs .filesystem = "ext3" ;
if ( ! system( "which tune2fs 1>/dev/null 2>/dev/null" ) ) ; if ( ! system( "which tune2fs 1>/dev/null 2>/dev/null" ) )
fs .create = true ; fs .create = true ;
fs .resize = true ; fs .resize = true ;

View File

@ -26,7 +26,12 @@ FS fat32::get_filesystem_support( )
FS fs ; FS fs ;
fs .filesystem = "fat32" ; fs .filesystem = "fat32" ;
fs .create = true ;
//find out if we can create fat32 filesystems
if ( ! system( "which mkdosfs 1>/dev/null 2>/dev/null" ) )
fs .create = true ;
//resing of start and endpoint are provided by libparted
fs .resize = true ; fs .resize = true ;
fs .move = true ; fs .move = true ;
@ -35,35 +40,7 @@ FS fat32::get_filesystem_support( )
bool fat32::Create( const Glib::ustring device_path, const Partition & new_partition ) bool fat32::Create( const Glib::ustring device_path, const Partition & new_partition )
{ {
bool return_value = false ; return Execute_Command( "mkdosfs -F32 " + new_partition .partition ) ;
if ( open_device_and_disk( device_path, device, disk ) )
{
PedPartition *c_part = NULL ;
PedFileSystemType *fs_type = NULL ;
PedFileSystem *fs = NULL ;
c_part = ped_disk_get_partition_by_sector( disk, (new_partition .sector_end + new_partition .sector_start) / 2 ) ;
if ( c_part )
{
fs_type = ped_file_system_type_get( "fat32" ) ;
if ( fs_type )
{
fs = ped_file_system_create( & c_part ->geom, fs_type, NULL );
if ( fs )
{
if ( ped_partition_set_system(c_part, fs_type ) )
return_value = Commit( disk ) ;
ped_file_system_close( fs );
}
}
}
close_device_and_disk( device, disk ) ;
}
return return_value ;
} }
bool fat32::Resize( const Glib::ustring device_path, const Partition & partition_old, const Partition & partition_new ) bool fat32::Resize( const Glib::ustring device_path, const Partition & partition_old, const Partition & partition_new )