[hostinfo] Warnings--
- Physical memory can't be negative, so it is reported as an unsigned long, but the bytes-to-MiB functions do accept negative amounts. As long as no machine has more than 2**62 bytes of memory, we're good though.
This commit is contained in:
parent
a11280b427
commit
ad725b671e
@ -156,7 +156,8 @@ HostInfoJob::exec()
|
|||||||
gs->insert( "hostOSName", hostOSName() );
|
gs->insert( "hostOSName", hostOSName() );
|
||||||
gs->insert( "hostCPU", hostCPU() );
|
gs->insert( "hostCPU", hostCPU() );
|
||||||
|
|
||||||
auto ram = CalamaresUtils::BytesToMiB( CalamaresUtils::System::instance()->getTotalMemoryB().first );
|
// Memory can't be negative, so it's reported as unsigned long.
|
||||||
|
auto ram = CalamaresUtils::BytesToMiB( qint64( CalamaresUtils::System::instance()->getTotalMemoryB().first ) );
|
||||||
if ( ram )
|
if ( ram )
|
||||||
{
|
{
|
||||||
gs->insert( "hostRAMMiB", ram );
|
gs->insert( "hostRAMMiB", ram );
|
||||||
|
Loading…
Reference in New Issue
Block a user