cosmetics make use of real commands instead of their symlinks. fixed copy

* src/GParted_Core.cc: cosmetics
* src/reiserfs.cc: make use of real commands instead of their symlinks. fixed copy of reiserfs filsystem
  (the new size wasn't reported correctly)
This commit is contained in:
Bart Hakvoort 2004-11-22 15:59:40 +00:00
parent ebcb8f07cf
commit 7dd48df0b2
3 changed files with 16 additions and 7 deletions

View File

@ -1,3 +1,9 @@
2004-11-22 Bart Hakvoort <gparted@users.sf.net>
* src/GParted_Core.cc: cosmetics
* src/reiserfs.cc: make use of real commands instead of their symlinks. fixed copy of reiserfs filsystem
(the new size wasn't reported correctly)
2004-11-22 Bart Hakvoort <gparted@users.sf.net> 2004-11-22 Bart Hakvoort <gparted@users.sf.net>
* src/ext2.cc, * src/ext2.cc,

View File

@ -500,13 +500,11 @@ bool GParted_Core::Resize_Container_Partition( const Glib::ustring & device_path
constraint = ped_constraint_any( device ); constraint = ped_constraint_any( device );
if ( constraint ) if ( constraint )
{ {
if ( ped_disk_set_partition_geom ( disk, c_partition, constraint, partition_new .sector_start, partition_new .sector_end ) ) if ( ped_disk_set_partition_geom ( disk, c_partition, constraint, partition_new .sector_start, partition_new .sector_end ) )
return_value = Commit( disk ) ; return_value = Commit( disk ) ;
ped_constraint_destroy ( constraint ); ped_constraint_destroy ( constraint );
} }
} }
close_device_and_disk( device, disk ) ; close_device_and_disk( device, disk ) ;

View File

@ -30,7 +30,7 @@ FS reiserfs::get_filesystem_support( )
if ( ! system( "which debugreiserfs 1>/dev/null 2>/dev/null" ) ) if ( ! system( "which debugreiserfs 1>/dev/null 2>/dev/null" ) )
fs .read = true ; fs .read = true ;
if ( ! system( "which mkfs.reiserfs 1>/dev/null 2>/dev/null" ) ) if ( ! system( "which mkreiserfs 1>/dev/null 2>/dev/null" ) )
fs .create = true ; fs .create = true ;
if ( ! system( "which reiserfsck 1>/dev/null 2>/dev/null" ) ) if ( ! system( "which reiserfsck 1>/dev/null 2>/dev/null" ) )
@ -40,7 +40,8 @@ FS reiserfs::get_filesystem_support( )
if ( ! system( "which resize_reiserfs 1>/dev/null 2>/dev/null" ) && fs .read && fs .check ) if ( ! system( "which resize_reiserfs 1>/dev/null 2>/dev/null" ) && fs .read && fs .check )
fs .resize = true ; fs .resize = true ;
if ( ! system( "which dd 1>/dev/null 2>/dev/null" ) ) //we need to call resize_reiserfs after a copy to get proper used/unused
if ( ! system( "which dd 1>/dev/null 2>/dev/null" ) && fs .resize )
fs .copy = true ; fs .copy = true ;
return fs ; return fs ;
@ -76,7 +77,7 @@ void reiserfs::Set_Used_Sectors( Partition & partition )
bool reiserfs::Create( const Glib::ustring device_path, const Partition & new_partition ) bool reiserfs::Create( const Glib::ustring device_path, const Partition & new_partition )
{ {
return Execute_Command( "mkfs.reiserfs -q " + new_partition .partition ) ; return Execute_Command( "mkreiserfs -q " + new_partition .partition ) ;
} }
bool reiserfs::Resize( const Partition & partition_new, bool fill_partition ) bool reiserfs::Resize( const Partition & partition_new, bool fill_partition )
@ -91,7 +92,11 @@ bool reiserfs::Resize( const Partition & partition_new, bool fill_partition )
bool reiserfs::Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path ) bool reiserfs::Copy( const Glib::ustring & src_part_path, const Glib::ustring & dest_part_path )
{ {
return Execute_Command( "dd bs=8192 if=" + src_part_path + " of=" + dest_part_path ) ; //copy partition
Execute_Command( "dd bs=8192 if=" + src_part_path + " of=" + dest_part_path ) ;
//and set proper used/unused
return Execute_Command( "resize_reiserfs " + dest_part_path ) ;
} }
bool reiserfs::Check_Repair( const Partition & partition ) bool reiserfs::Check_Repair( const Partition & partition )