mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-27 01:15:38 -04:00
[partition] Use GiB consistently in code
This commit is contained in:
parent
962776804c
commit
79934aa513
1 changed files with 5 additions and 5 deletions
|
@ -148,7 +148,7 @@ canBeResized( Partition* candidate )
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ok = false;
|
bool ok = false;
|
||||||
double requiredStorageGB = getRequiredStorageGiB( ok );
|
double requiredStorageGiB = getRequiredStorageGiB( ok );
|
||||||
if ( !ok )
|
if ( !ok )
|
||||||
{
|
{
|
||||||
cDebug() << Logger::SubEntry << "NO, requiredStorageGiB is not set correctly.";
|
cDebug() << Logger::SubEntry << "NO, requiredStorageGiB is not set correctly.";
|
||||||
|
@ -156,9 +156,9 @@ canBeResized( Partition* candidate )
|
||||||
}
|
}
|
||||||
|
|
||||||
// We require a little more for partitioning overhead and swap file
|
// We require a little more for partitioning overhead and swap file
|
||||||
double advisedStorageGB = requiredStorageGB + 0.5 + 2.0;
|
double advisedStorageGiB = requiredStorageGiB + 0.5 + 2.0;
|
||||||
qint64 availableStorageB = candidate->available();
|
qint64 availableStorageB = candidate->available();
|
||||||
qint64 advisedStorageB = CalamaresUtils::GiBtoBytes( advisedStorageGB );
|
qint64 advisedStorageB = CalamaresUtils::GiBtoBytes( advisedStorageGiB );
|
||||||
|
|
||||||
if ( availableStorageB > advisedStorageB )
|
if ( availableStorageB > advisedStorageB )
|
||||||
{
|
{
|
||||||
|
@ -170,9 +170,9 @@ canBeResized( Partition* candidate )
|
||||||
Logger::CDebug deb;
|
Logger::CDebug deb;
|
||||||
deb << Logger::SubEntry << "NO, insufficient storage";
|
deb << Logger::SubEntry << "NO, insufficient storage";
|
||||||
deb << Logger::Continuation << "Required storage B:" << advisedStorageB
|
deb << Logger::Continuation << "Required storage B:" << advisedStorageB
|
||||||
<< QString( "(%1GB)" ).arg( advisedStorageGB );
|
<< QString( "(%1GiB)" ).arg( advisedStorageGiB );
|
||||||
deb << Logger::Continuation << "Available storage B:" << availableStorageB
|
deb << Logger::Continuation << "Available storage B:" << availableStorageB
|
||||||
<< QString( "(%1GB)" ).arg( availableStorageB / 1024 / 1024 / 1024 )
|
<< QString( "(%1GiB)" ).arg( CalamaresUtils::BytesToGiB( availableStorageB ) )
|
||||||
<< "for" << convenienceName( candidate ) << "length:" << candidate->length()
|
<< "for" << convenienceName( candidate ) << "length:" << candidate->length()
|
||||||
<< "sectorsUsed:" << candidate->sectorsUsed() << "fsType:" << candidate->fileSystem().name();
|
<< "sectorsUsed:" << candidate->sectorsUsed() << "fsType:" << candidate->fileSystem().name();
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue