mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
Switch to using PartSize class for partition sizes
Every call of `ParseStringSize` is replaced by using an instance of the `PartUtils::PartSize` class. This commit also removes the now-unused previous size parsing functions. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
This commit is contained in:
parent
3a58ae5e8b
commit
d32733bf59
5 changed files with 17 additions and 124 deletions
|
@ -102,9 +102,14 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO
|
|||
if ( isEfi )
|
||||
{
|
||||
if ( gs->contains( "efiSystemPartitionSize" ) )
|
||||
uefisys_part_sizeB = PartUtils::parseSizeString( gs->value( "efiSystemPartitionSize" ).toString(), dev->capacity() );
|
||||
{
|
||||
PartUtils::PartSize part_size = PartUtils::PartSize( gs->value( "efiSystemPartitionSize" ).toString() );
|
||||
uefisys_part_sizeB = part_size.toBytes( dev->capacity() );
|
||||
}
|
||||
else
|
||||
{
|
||||
uefisys_part_sizeB = 300_MiB;
|
||||
}
|
||||
}
|
||||
|
||||
// Since sectors count from 0, if the space is 2048 sectors in size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue