mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[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
1 changed files with 2 additions and 1 deletions
|
@ -156,7 +156,8 @@ HostInfoJob::exec()
|
|||
gs->insert( "hostOSName", hostOSName() );
|
||||
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 )
|
||||
{
|
||||
gs->insert( "hostRAMMiB", ram );
|
||||
|
|
Loading…
Add table
Reference in a new issue