Implement check operation on encrypted file systems (#774818)

Just update the code describing and implementing the check operation.
No need to update the code composing the operation in
Win_GParted::activate_check() as that is incredibly simple, just cloning
the Partition object and doesn't need changing.

Note that for encrypted file systems this does:
1) runs FSCK on the encrypted file system;
2) grows the file system to fill the encrypted mapping.
At this time it does not grow the encryption mapping to fill the
partition.  That will be added after resize/move has been implemented.

Bug 774818 - Implement LUKS read-write actions NOT requiring a
             passphrase
This commit is contained in:
Mike Fleetwood 2016-09-09 10:05:32 +01:00 committed by Curtis Gedak
parent 49c0564601
commit df05a9785f
3 changed files with 4 additions and 4 deletions

View File

@ -592,9 +592,9 @@ bool GParted_Core::apply_operation_to_disk( Operation * operation )
case OPERATION_CHECK: case OPERATION_CHECK:
success = calibrate_partition( operation->get_partition_original(), success = calibrate_partition( operation->get_partition_original(),
operation->operation_detail ) operation->operation_detail )
&& check_repair_filesystem( operation->get_partition_original(), && check_repair_filesystem( operation->get_partition_original().get_filesystem_partition(),
operation->operation_detail ) operation->operation_detail )
&& maximize_filesystem( operation->get_partition_original(), && maximize_filesystem( operation->get_partition_original().get_filesystem_partition(),
operation->operation_detail ); operation->operation_detail );
break; break;

View File

@ -48,7 +48,7 @@ void OperationCheck::create_description()
/*TO TRANSLATORS: looks like Check and repair file system (ext3) on /dev/hda4 */ /*TO TRANSLATORS: looks like Check and repair file system (ext3) on /dev/hda4 */
description = String::ucompose( _("Check and repair file system (%1) on %2"), description = String::ucompose( _("Check and repair file system (%1) on %2"),
Utils::get_filesystem_string( partition_original->filesystem ), partition_original->get_filesystem_string(),
partition_original->get_path() ); partition_original->get_path() );
} }

View File

@ -1275,7 +1275,7 @@ void Win_GParted::set_valid_operations()
allow_paste( true ); allow_paste( true );
//see if we can somehow check/repair this file system.... //see if we can somehow check/repair this file system....
if ( fs.check && selected_partition_ptr->status == STAT_REAL ) if ( selected_partition_ptr->status == STAT_REAL && fs_cap.check )
allow_check( true ) ; allow_check( true ) ;
} }
} }