Query unallocated space via libparted (#499202)
Update the implementation using libparted to set the file system size and free space, thus allowing the unallocated space in the partition to be calculated, for the following unmounted file systems: hfs, hfs+ (Requires libparted <= 2.4 or libparted >= 3.1, as the needed functionality did not exist in libparted 3.0). Bug #499202 - gparted does not see the difference if partition size differs from filesystem size
This commit is contained in:
parent
e6290dbbcf
commit
30385cbd37
|
@ -1586,7 +1586,8 @@ void GParted_Core::LP_set_used_sectors( Partition & partition )
|
||||||
constraint = ped_file_system_get_resize_constraint( fs ) ;
|
constraint = ped_file_system_get_resize_constraint( fs ) ;
|
||||||
if ( constraint )
|
if ( constraint )
|
||||||
{
|
{
|
||||||
partition .Set_Unused( partition .get_sector_length() - constraint ->min_size ) ;
|
partition .set_sector_usage( fs ->geom ->length,
|
||||||
|
fs ->geom ->length - constraint ->min_size ) ;
|
||||||
|
|
||||||
ped_constraint_destroy( constraint );
|
ped_constraint_destroy( constraint );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue