mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[partition] export PartitionActions::bytesToSectors for future use
As we move some of the partition creation code away from PartitionActions, we will need the bytesToSectors function. Rather than copying it, we export it in the PartitionActions namespace, so that other classes can use it. Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
This commit is contained in:
parent
b2bf873ede
commit
f863912a2f
2 changed files with 3 additions and 1 deletions
|
@ -90,7 +90,7 @@ alignBytesToBlockSize( qint64 bytes, qint64 blocksize )
|
|||
return blocks * blocksize;
|
||||
}
|
||||
|
||||
constexpr qint64
|
||||
qint64
|
||||
bytesToSectors( qint64 bytes, qint64 blocksize )
|
||||
{
|
||||
return alignBytesToBlockSize( alignBytesToBlockSize( bytes, blocksize), MiBtoBytes(1) ) / blocksize;
|
||||
|
|
|
@ -72,6 +72,8 @@ namespace Choices
|
|||
|
||||
} // namespace Choices
|
||||
|
||||
qint64 bytesToSectors( qint64 bytes, qint64 blocksize );
|
||||
|
||||
/**
|
||||
* @brief doAutopartition sets up an autopartitioning operation on the given Device.
|
||||
* @param core a pointer to the PartitionCoreModule instance.
|
||||
|
|
Loading…
Add table
Reference in a new issue