Simplify XFS copy specific code progress bar usage (#760709)
Remove starting and stopping the progress bar in xfs::copy(). The progress bar will be automatically started in xfs::copy_progress() callback when run_progressbar() is called; and automatically stopped in FileSystem::execute_command() when it calls stop_progress() at the end. Note that this will now not initialise the progress bar from zero immediately that the XFS copy is started, but instead 0.5 seconds into the copy when xfs::copy_progress() timed callback is called for the first time. Bug 760709 - Add progress bars to XFS and EXT2/3/4 file system specific copy methods
This commit is contained in:
parent
438b35aed9
commit
075154b4e8
|
@ -254,14 +254,11 @@ bool xfs::copy( const Partition & src_part,
|
|||
|
||||
if ( success )
|
||||
{
|
||||
if ( src_used > 0LL )
|
||||
operationdetail.run_progressbar( 0.0, (double)src_used, PROGRESSBAR_TEXT_COPY_BYTES );
|
||||
success &= ! execute_command( "sh -c 'xfsdump -J - " + src_mount_point +
|
||||
" | xfsrestore -J - " + dest_mount_point + "'",
|
||||
operationdetail,
|
||||
EXEC_CHECK_STATUS|EXEC_CANCEL_SAFE|EXEC_PROGRESS_TIMED,
|
||||
static_cast<TimedSlot>( sigc::mem_fun( *this, &xfs::copy_progress ) ) );
|
||||
operationdetail.stop_progressbar();
|
||||
|
||||
success &= ! execute_command( "umount -v " + dest_part.get_path(), operationdetail,
|
||||
EXEC_CHECK_STATUS );
|
||||
|
|
Loading…
Reference in New Issue