diff options
author | Nathan Scott <nathans@redhat.com> | 2023-05-02 16:56:18 +1000 |
---|---|---|
committer | Nathan Scott <nathans@redhat.com> | 2023-05-08 13:06:38 +1000 |
commit | 72235d8e098d9d79029dca65122605741e1aafad (patch) | |
tree | 96593b8bd9dc95dc5ab321bd363d36351cbd0a99 /openbsd/Platform.c | |
parent | 0bdade1b6cb40c5bd374a93ac0489058a7421bb5 (diff) |
Adapt platform code for the new Machine base class
Move host-centric data to new derived <Platform>Machine classes,
separate from process-list-centric data.
Diffstat (limited to 'openbsd/Platform.c')
-rw-r--r-- | openbsd/Platform.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/openbsd/Platform.c b/openbsd/Platform.c index 03c36856..94e71928 100644 --- a/openbsd/Platform.c +++ b/openbsd/Platform.c @@ -35,7 +35,6 @@ in the source distribution for its full text. #include "MemoryMeter.h" #include "MemorySwapMeter.h" #include "Meter.h" -#include "ProcessList.h" #include "Settings.h" #include "SignalsPanel.h" #include "SwapMeter.h" @@ -43,8 +42,8 @@ in the source distribution for its full text. #include "TasksMeter.h" #include "UptimeMeter.h" #include "XUtils.h" +#include "openbsd/OpenBSDMachine.h" #include "openbsd/OpenBSDProcess.h" -#include "openbsd/OpenBSDProcessList.h" const ScreenDefaults Platform_defaultScreens[] = { @@ -182,8 +181,8 @@ int Platform_getMaxPid(void) { double Platform_setCPUValues(Meter* this, unsigned int cpu) { const Machine* host = this->host; - const OpenBSDProcessList* pl = (const OpenBSDProcessList*) host->pl; - const CPUData* cpuData = &(pl->cpuData[cpu]); + const OpenBSDMachine* ohost = (const OpenBSDMachine*) host; + const CPUData* cpuData = &(ohost->cpuData[cpu]); double total; double totalPercent; double* v = this->values; @@ -217,7 +216,7 @@ double Platform_setCPUValues(Meter* this, unsigned int cpu) { v[CPU_METER_TEMPERATURE] = NAN; - v[CPU_METER_FREQUENCY] = (pl->cpuSpeed != -1) ? pl->cpuSpeed : NAN; + v[CPU_METER_FREQUENCY] = (ohost->cpuSpeed != -1) ? ohost->cpuSpeed : NAN; return totalPercent; } |