diff --git a/ChangeLog b/ChangeLog index 02eae5b6..18769468 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-28 Bart Hakvoort + + * The Filesystemclasses: Changed 'bool Create( const Glib::ustring & device_path, const Partition & new_partition )' + to 'bool Create( const Partition & new_partition )'. Since i now use external tools for all filesystems, the partitionpath will suffice. + 2004-12-28 Bart Hakvoort * include/GParted_Core.h, diff --git a/include/FileSystem.h b/include/FileSystem.h index 731d17c1..cb16f460 100644 --- a/include/FileSystem.h +++ b/include/FileSystem.h @@ -84,7 +84,7 @@ public: virtual FS get_filesystem_support( ) = 0 ; virtual void Set_Used_Sectors( Partition & partition ) = 0 ; - virtual bool Create( const Glib::ustring device_path, const Partition & new_partition ) = 0 ; + virtual bool Create( const Partition & new_partition ) = 0 ; virtual bool Resize( const Partition & partition_new, bool fill_partition = false ) = 0 ; virtual bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) = 0 ; virtual bool Check_Repair( const Partition & partition ) = 0 ; diff --git a/include/ext2.h b/include/ext2.h index a8b96cf3..9271056c 100644 --- a/include/ext2.h +++ b/include/ext2.h @@ -29,7 +29,7 @@ class ext2 : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/ext3.h b/include/ext3.h index 4c29c42c..ce645284 100644 --- a/include/ext3.h +++ b/include/ext3.h @@ -29,7 +29,7 @@ class ext3 : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/fat16.h b/include/fat16.h index d1e1a6e8..8da90a65 100644 --- a/include/fat16.h +++ b/include/fat16.h @@ -29,7 +29,7 @@ class fat16 : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/fat32.h b/include/fat32.h index 52282919..62ffe656 100644 --- a/include/fat32.h +++ b/include/fat32.h @@ -29,7 +29,7 @@ class fat32 : public FileSystem public: FS get_filesystem_support( ); void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/hfs.h b/include/hfs.h index 174cb88c..40445693 100644 --- a/include/hfs.h +++ b/include/hfs.h @@ -29,7 +29,7 @@ class hfs : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/jfs.h b/include/jfs.h index cc22f38e..7f5023a3 100644 --- a/include/jfs.h +++ b/include/jfs.h @@ -29,7 +29,7 @@ class jfs : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/linux_swap.h b/include/linux_swap.h index 6052ab1d..b1a8e08f 100644 --- a/include/linux_swap.h +++ b/include/linux_swap.h @@ -29,7 +29,7 @@ class linux_swap : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/ntfs.h b/include/ntfs.h index 1df91647..1c8cbe39 100644 --- a/include/ntfs.h +++ b/include/ntfs.h @@ -29,7 +29,7 @@ class ntfs : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/reiserfs.h b/include/reiserfs.h index 80f7e253..3c40ab79 100644 --- a/include/reiserfs.h +++ b/include/reiserfs.h @@ -31,7 +31,7 @@ class reiserfs : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/include/xfs.h b/include/xfs.h index c1b763de..e47f96e8 100644 --- a/include/xfs.h +++ b/include/xfs.h @@ -29,7 +29,7 @@ class xfs : public FileSystem public: FS get_filesystem_support( ) ; void Set_Used_Sectors( Partition & partition ) ; - bool Create( const Glib::ustring device_path, const Partition & new_partition ) ; + bool Create( const Partition & new_partition ) ; bool Resize( const Partition & partition_new, bool fill_partition = false ) ; bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ; bool Check_Repair( const Partition & partition ) ; diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 5a160e93..aad17bf1 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -343,7 +343,7 @@ bool GParted_Core::Create( const Device & device, Partition & new_partition ) if ( ! p_filesystem ) return true ; - return p_filesystem ->Create( device .path, new_partition ) ; + return p_filesystem ->Create( new_partition ) ; } return false ; @@ -364,7 +364,7 @@ bool GParted_Core::Convert_FS( const Glib::ustring & device_path, const Partitio set_proper_filesystem( partition .filesystem ) ; - return p_filesystem ->Create( device_path, partition ) ; + return p_filesystem ->Create( partition ) ; } bool GParted_Core::Delete( const Glib::ustring & device_path, const Partition & partition ) diff --git a/src/ext2.cc b/src/ext2.cc index c97ed53a..e8a7b937 100644 --- a/src/ext2.cc +++ b/src/ext2.cc @@ -78,7 +78,7 @@ void ext2::Set_Used_Sectors( Partition & partition ) partition .Set_Unused( free_blocks * blocksize / 512 ) ; } -bool ext2::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool ext2::Create( const Partition & new_partition ) { return ! Execute_Command( "mkfs.ext2 " + new_partition .partition ) ; } diff --git a/src/ext3.cc b/src/ext3.cc index 61fb0b97..e150a2fc 100644 --- a/src/ext3.cc +++ b/src/ext3.cc @@ -78,7 +78,7 @@ void ext3::Set_Used_Sectors( Partition & partition ) partition .Set_Unused( free_blocks * blocksize / 512 ) ; } -bool ext3::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool ext3::Create( const Partition & new_partition ) { return ! Execute_Command( "mkfs.ext3 " + new_partition .partition ) ; } diff --git a/src/fat16.cc b/src/fat16.cc index 18192f0a..3d047e5f 100644 --- a/src/fat16.cc +++ b/src/fat16.cc @@ -78,7 +78,7 @@ void fat16::Set_Used_Sectors( Partition & partition ) } } -bool fat16::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool fat16::Create( const Partition & new_partition ) { return ! Execute_Command( "mkdosfs -F16 " + new_partition .partition ) ; } diff --git a/src/fat32.cc b/src/fat32.cc index d19fc654..432827f3 100644 --- a/src/fat32.cc +++ b/src/fat32.cc @@ -77,7 +77,7 @@ void fat32::Set_Used_Sectors( Partition & partition ) } } -bool fat32::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool fat32::Create( const Partition & new_partition ) { return ! Execute_Command( "mkdosfs -F32 " + new_partition .partition ) ; } diff --git a/src/hfs.cc b/src/hfs.cc index ccc5f21e..064e2543 100644 --- a/src/hfs.cc +++ b/src/hfs.cc @@ -64,7 +64,7 @@ void hfs::Set_Used_Sectors( Partition & partition ) pclose( f ) ; } -bool hfs::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool hfs::Create( const Partition & new_partition ) { return ! Execute_Command( "hformat " + new_partition .partition ) ; } diff --git a/src/jfs.cc b/src/jfs.cc index ab351225..3c554a6d 100644 --- a/src/jfs.cc +++ b/src/jfs.cc @@ -63,7 +63,7 @@ void jfs::Set_Used_Sectors( Partition & partition ) { } -bool jfs::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool jfs::Create( const Partition & new_partition ) { return ! Execute_Command( "mkfs.jfs -q " + new_partition .partition ) ; } diff --git a/src/linux_swap.cc b/src/linux_swap.cc index ee7ee760..e6d72d0c 100644 --- a/src/linux_swap.cc +++ b/src/linux_swap.cc @@ -46,14 +46,14 @@ void linux_swap::Set_Used_Sectors( Partition & partition ) { } -bool linux_swap::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool linux_swap::Create( const Partition & new_partition ) { return ! Execute_Command( "mkswap " + new_partition .partition ) ; } bool linux_swap::Resize( const Partition & partition_new, bool fill_partition ) { - return Create( "", partition_new ) ; + return Create( partition_new ) ; } bool linux_swap::Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) diff --git a/src/ntfs.cc b/src/ntfs.cc index a816dee5..f0f04a63 100644 --- a/src/ntfs.cc +++ b/src/ntfs.cc @@ -74,7 +74,7 @@ void ntfs::Set_Used_Sectors( Partition & partition ) pclose( f ) ; } -bool ntfs::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool ntfs::Create( const Partition & new_partition ) { return ! Execute_Command( "mkntfs -Q " + new_partition .partition ) ; } diff --git a/src/reiserfs.cc b/src/reiserfs.cc index f789cab2..737da41a 100644 --- a/src/reiserfs.cc +++ b/src/reiserfs.cc @@ -82,7 +82,7 @@ void reiserfs::Set_Used_Sectors( Partition & partition ) partition .Set_Unused( free_blocks * blocksize / 512 ) ; } -bool reiserfs::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool reiserfs::Create( const Partition & new_partition ) { return ! Execute_Command( "mkreiserfs -q " + new_partition .partition ) ; } diff --git a/src/xfs.cc b/src/xfs.cc index e7e6b500..bb94db93 100644 --- a/src/xfs.cc +++ b/src/xfs.cc @@ -88,7 +88,7 @@ void xfs::Set_Used_Sectors( Partition & partition ) partition .Set_Unused( free_blocks * blocksize / 512 ) ; } -bool xfs::Create( const Glib::ustring device_path, const Partition & new_partition ) +bool xfs::Create( const Partition & new_partition ) { return ! Execute_Command( "mkfs.xfs -f " + new_partition .partition ) ; }