diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-21 23:27:31 -0200 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2015-01-21 23:27:31 -0200 |
commit | 3383d8e5561dfc6fb2b65e0a194df94ccb5e08af (patch) | |
tree | dafba704561386b31b6b8af6dafb5b9a2ba7453c /SwapMeter.c | |
parent | 36b78328843d0dae0d0fadbd0e814a8a1546327c (diff) |
Sorry about the mega-patch.
This is a work-in-progress, code is currently broken.
(Some actions, and notably, the header, are missing.)
Diffstat (limited to 'SwapMeter.c')
-rw-r--r-- | SwapMeter.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/SwapMeter.c b/SwapMeter.c index 2cb86d5e..b8bb1814 100644 --- a/SwapMeter.c +++ b/SwapMeter.c @@ -8,7 +8,7 @@ in the source distribution for its full text. #include "SwapMeter.h" #include "CRT.h" -#include "ProcessList.h" +#include "Platform.h" #include <stdlib.h> #include <string.h> @@ -34,11 +34,8 @@ static void SwapMeter_humanNumber(char* buffer, const long int* value) { } static void SwapMeter_setValues(Meter* this, char* buffer, int len) { - long int usedSwap = this->pl->usedSwap; - this->total = this->pl->totalSwap; - this->values[0] = usedSwap; - - snprintf(buffer, len, "%ld/%ldMB", (long int) usedSwap / MEGABYTE, (long int) this->total / MEGABYTE); + Platform_setSwapValues(this); + snprintf(buffer, len, "%ld/%ldMB", (long int) this->values[0] / MEGABYTE, (long int) this->total / MEGABYTE); } static void SwapMeter_display(Object* cast, RichString* out) { |