From 4bb6b0d869fe0685a38ea33a5b0cd6e914aee1fe Mon Sep 17 00:00:00 2001 From: reinelt <> Date: Fri, 10 Mar 2000 17:36:02 +0000 Subject: [lcd4linux @ 2000-03-10 17:36:02 by reinelt] first unstable but running release --- system.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'system.c') diff --git a/system.c b/system.c index 8529d89..bca5fd4 100644 --- a/system.c +++ b/system.c @@ -1,4 +1,4 @@ -/* $Id: system.c,v 1.4 2000/03/10 10:49:53 reinelt Exp $ +/* $Id: system.c,v 1.5 2000/03/10 17:36:02 reinelt Exp $ * * system status retreivement * @@ -20,6 +20,10 @@ * * * $Log: system.c,v $ + * Revision 1.5 2000/03/10 17:36:02 reinelt + * + * first unstable but running release + * * Revision 1.4 2000/03/10 10:49:53 reinelt * * MatrixOrbital driver finished @@ -87,7 +91,7 @@ #include #include "system.h" -#include "config.h" +#include "cfg.h" #include "filter.h" char *System(void) @@ -174,7 +178,7 @@ int Load (double *load1, double *load2, double *load3) if (time(NULL)==now) return 0; time(&now); - + if (fd==-2) { fd=open("/proc/loadavg", O_RDONLY); if (fd==-1) { @@ -377,7 +381,7 @@ int Sensor (int index, double *val, double *min, double *max) static double max_buf[SENSORS]={0.0,}; static time_t now[SENSORS]={0,}; - if (index<0 || index>=SENSORS) return -1; + if (index<1 || index>=SENSORS) return -1; *val=val_buf[index]; *min=min_buf[index]; -- cgit v1.2.3