aboutsummaryrefslogtreecommitdiffstats
path: root/system.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-03-10 17:36:02 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2000-03-10 17:36:02 +0000
commit713dd4045fdc6312cb80a4aee9b17a3dd5cc1368 (patch)
tree19ec78ceacf92efbcd4f057e2cf27325dfd3b9b9 /system.c
parent32b5a154a49a57c94b26102105bc7adb308022e4 (diff)
downloadlcd4linux-713dd4045fdc6312cb80a4aee9b17a3dd5cc1368.tar.gz
[lcd4linux @ 2000-03-10 17:36:02 by reinelt]
first unstable but running release git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@9 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'system.c')
-rw-r--r--system.c12
1 files changed, 8 insertions, 4 deletions
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 <asm/param.h>
#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];