mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 18:05:36 -04: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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue