Changed 'bool Create( const Glib::ustring & device_path, const Partition &
* 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.
This commit is contained in:
parent
67cd381a03
commit
c87cba6ee5
|
@ -1,3 +1,8 @@
|
||||||
|
2004-12-28 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
|
* 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 <hakvoort@cvs.gnome.org>
|
2004-12-28 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
* include/GParted_Core.h,
|
* include/GParted_Core.h,
|
||||||
|
|
|
@ -84,7 +84,7 @@ public:
|
||||||
|
|
||||||
virtual FS get_filesystem_support( ) = 0 ;
|
virtual FS get_filesystem_support( ) = 0 ;
|
||||||
virtual void Set_Used_Sectors( Partition & partition ) = 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 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 Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) = 0 ;
|
||||||
virtual bool Check_Repair( const Partition & partition ) = 0 ;
|
virtual bool Check_Repair( const Partition & partition ) = 0 ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ext2 : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ext3 : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class fat16 : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class fat32 : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( );
|
FS get_filesystem_support( );
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class hfs : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class jfs : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class linux_swap : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ntfs : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -31,7 +31,7 @@ class reiserfs : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -29,7 +29,7 @@ class xfs : public FileSystem
|
||||||
public:
|
public:
|
||||||
FS get_filesystem_support( ) ;
|
FS get_filesystem_support( ) ;
|
||||||
void Set_Used_Sectors( Partition & partition ) ;
|
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 Resize( const Partition & partition_new, bool fill_partition = false ) ;
|
||||||
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
bool Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) ;
|
||||||
bool Check_Repair( const Partition & partition ) ;
|
bool Check_Repair( const Partition & partition ) ;
|
||||||
|
|
|
@ -343,7 +343,7 @@ bool GParted_Core::Create( const Device & device, Partition & new_partition )
|
||||||
if ( ! p_filesystem )
|
if ( ! p_filesystem )
|
||||||
return true ;
|
return true ;
|
||||||
|
|
||||||
return p_filesystem ->Create( device .path, new_partition ) ;
|
return p_filesystem ->Create( new_partition ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false ;
|
return false ;
|
||||||
|
@ -364,7 +364,7 @@ bool GParted_Core::Convert_FS( const Glib::ustring & device_path, const Partitio
|
||||||
|
|
||||||
set_proper_filesystem( partition .filesystem ) ;
|
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 )
|
bool GParted_Core::Delete( const Glib::ustring & device_path, const Partition & partition )
|
||||||
|
|
|
@ -78,7 +78,7 @@ void ext2::Set_Used_Sectors( Partition & partition )
|
||||||
partition .Set_Unused( free_blocks * blocksize / 512 ) ;
|
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 ) ;
|
return ! Execute_Command( "mkfs.ext2 " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ void ext3::Set_Used_Sectors( Partition & partition )
|
||||||
partition .Set_Unused( free_blocks * blocksize / 512 ) ;
|
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 ) ;
|
return ! Execute_Command( "mkfs.ext3 " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ) ;
|
return ! Execute_Command( "mkdosfs -F16 " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ) ;
|
return ! Execute_Command( "mkdosfs -F32 " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ void hfs::Set_Used_Sectors( Partition & partition )
|
||||||
pclose( f ) ;
|
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 ) ;
|
return ! Execute_Command( "hformat " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ) ;
|
return ! Execute_Command( "mkfs.jfs -q " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 ) ;
|
return ! Execute_Command( "mkswap " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool linux_swap::Resize( const Partition & partition_new, bool fill_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 )
|
bool linux_swap::Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path )
|
||||||
|
|
|
@ -74,7 +74,7 @@ void ntfs::Set_Used_Sectors( Partition & partition )
|
||||||
pclose( f ) ;
|
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 ) ;
|
return ! Execute_Command( "mkntfs -Q " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ void reiserfs::Set_Used_Sectors( Partition & partition )
|
||||||
partition .Set_Unused( free_blocks * blocksize / 512 ) ;
|
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 ) ;
|
return ! Execute_Command( "mkreiserfs -q " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,7 +88,7 @@ void xfs::Set_Used_Sectors( Partition & partition )
|
||||||
partition .Set_Unused( free_blocks * blocksize / 512 ) ;
|
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 ) ;
|
return ! Execute_Command( "mkfs.xfs -f " + new_partition .partition ) ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue