aboutsummaryrefslogtreecommitdiffstats
path: root/system.c
diff options
context:
space:
mode:
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-09 04:16:06 +0000
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>2004-01-09 04:16:06 +0000
commit9dc6ff97fe8e9c911dfee409114fc5428adf858a (patch)
tree97337d07d0693302ca3031d256bff023a4d18f82 /system.c
parent1cf54b00c151235704b41d192650a8e75c4ac905 (diff)
downloadlcd4linux-9dc6ff97fe8e9c911dfee409114fc5428adf858a.tar.gz
[lcd4linux @ 2004-01-09 04:16:06 by reinelt]
added 'section' argument to cfg_get(), but NULLed it on all calls by now. git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@298 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to '')
-rw-r--r--system.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/system.c b/system.c
index f013ddd..7fc0919 100644
--- a/system.c
+++ b/system.c
@@ -1,4 +1,4 @@
-/* $Id: system.c,v 1.31 2003/12/01 07:08:51 reinelt Exp $
+/* $Id: system.c,v 1.32 2004/01/09 04:16:06 reinelt Exp $
*
* system status retreivement
*
@@ -22,6 +22,9 @@
*
*
* $Log: system.c,v $
+ * Revision 1.32 2004/01/09 04:16:06 reinelt
+ * added 'section' argument to cfg_get(), but NULLed it on all calls by now.
+ *
* Revision 1.31 2003/12/01 07:08:51 reinelt
*
* Patches from Xavier:
@@ -792,7 +795,7 @@ int Sensor (int index, double *val, double *min, double *max)
if (fd[index]==-2) {
snprintf(buffer, 32, "Sensor%d", index);
- sensor[index]=cfg_get(buffer, NULL);
+ sensor[index]=cfg_get(NULL, buffer, NULL);
if (sensor[index]==NULL || *sensor[index]=='\0') {
error ("no entry for '%s' in %s", buffer, cfg_source());
fd[index]=-1;
@@ -800,18 +803,18 @@ int Sensor (int index, double *val, double *min, double *max)
}
snprintf(buffer, 32, "Sensor%d_min", index);
- min_buf[index]=atof(cfg_get(buffer,"0"));
+ min_buf[index]=atof(cfg_get(NULL, buffer, "0"));
*min=min_buf[index];
snprintf(buffer, 32, "Sensor%d_max", index);
- max_buf[index]=atof(cfg_get(buffer,"100"));
+ max_buf[index]=atof(cfg_get(NULL, buffer, "100"));
*max=max_buf[index];
snprintf(buffer, 32, "Sensor%d_factor", index);
- factor_buf[index]=atof(cfg_get(buffer,"1"));
+ factor_buf[index]=atof(cfg_get(NULL, buffer, "1"));
snprintf(buffer, 32, "Sensor%d_offset", index);
- offset_buf[index]=atof(cfg_get(buffer,"0"));
+ offset_buf[index]=atof(cfg_get(NULL, buffer, "0"));
fd[index]=open(sensor[index], O_RDONLY);
if (fd[index]==-1) {