OpenBSD: missing headers, typos

cpu.h: underscores in get_cpu_count()
load.cc: underscores in get_cpu_count(), typos
memory.cc: missing headers
This commit is contained in:
Pawel "l0ner" Soltys 2015-01-20 02:44:21 +01:00
parent ae5c71441b
commit 3a78f44e39
3 changed files with 6 additions and 4 deletions

@ -11,6 +11,6 @@
#define CPUSTATES 5
float cpu_percentage( unsigned );
uint8_t getCpuCount();
uint8_t get_cpu_count();
#endif

@ -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<unsigned int>(
averages[0] / cpu_count * 0.5f * 100.0f);

@ -21,6 +21,7 @@
#include <sstream>
#include <string>
#include <sys/mount.h> // VFS_* which we use to get cache
#include <sys/sysctl.h>
#include <sys/types.h>
#include <sys/vmmeter.h> // vmtotal struct
@ -28,6 +29,7 @@
#include "error.h"
#include "memory.h"
#include "../luts.h"
#include "../conversions.h"
static int pageshift;