[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:
Arnaud Ferraris 2019-01-07 17:26:12 +01:00
parent b2bf873ede
commit f863912a2f
2 changed files with 3 additions and 1 deletions

View file

@ -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;

View file

@ -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.