From 580b076b79ce94c3ce9d04711f935c2294ed6ede Mon Sep 17 00:00:00 2001 From: "Pawel \"l0ner\" Soltys" Date: Tue, 20 Jan 2015 02:44:21 +0100 Subject: [PATCH] OpenBSD: missing headers, typos cpu.h: underscores in get_cpu_count() load.cc: underscores in get_cpu_count(), typos memory.cc: missing headers --- openbsd/cpu.h | 4 ++-- openbsd/load.cc | 4 ++-- openbsd/memory.cc | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/openbsd/cpu.h b/openbsd/cpu.h index 5a6a641..6cc5786 100644 --- a/openbsd/cpu.h +++ b/openbsd/cpu.h @@ -10,7 +10,7 @@ #define CP_IDLE 4 #define CPUSTATES 5 -float cpu_percentage(unsigned); -uint8_t getCpuCount(); +float cpu_percentage( unsigned ); +uint8_t get_cpu_count(); #endif diff --git a/openbsd/load.cc b/openbsd/load.cc index 8434400..3b01e5e 100644 --- a/openbsd/load.cc +++ b/openbsd/load.cc @@ -33,7 +33,7 @@ std::string load_string( bool use_colors = false ) { std::stringstream ss; // Only get 3 load averages - cont int nelem = 3; + const int nelem = 3; double averages[nelem]; // based on: opensource.apple.com/source/Libc/Libc-262/gen/getloadavg.c @@ -46,7 +46,7 @@ std::string load_string( bool use_colors = false ) if( use_colors ) { // may not work - uint8_t cpu_count = getCpuCount(); + uint8_t cpu_count = get_cpu_count(); unsigned load_percent = static_cast( averages[0] / cpu_count * 0.5f * 100.0f); diff --git a/openbsd/memory.cc b/openbsd/memory.cc index d42ef80..9586acf 100644 --- a/openbsd/memory.cc +++ b/openbsd/memory.cc @@ -21,6 +21,7 @@ #include #include +#include // VFS_* which we use to get cache #include #include #include // vmtotal struct @@ -28,6 +29,7 @@ #include "error.h" #include "memory.h" #include "../luts.h" +#include "../conversions.h" static int pageshift;