Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/envstat Apply proper conversion (which is _no_ conv...



details:   https://anonhg.NetBSD.org/src/rev/aa53604a513e
branches:  trunk
changeset: 757936:aa53604a513e
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Tue Oct 05 05:03:49 2010 +0000

description:
Apply proper conversion (which is _no_ conversion) when setting limit
values for sensors of type ENVSYS_INTEGER.

diffstat:

 usr.sbin/envstat/config.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (36 lines):

diff -r 32416070628d -r aa53604a513e usr.sbin/envstat/config.c
--- a/usr.sbin/envstat/config.c Tue Oct 05 02:23:38 2010 +0000
+++ b/usr.sbin/envstat/config.c Tue Oct 05 05:03:49 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: config.c,v 1.9 2010/02/15 22:37:14 pgoyette Exp $      */
+/*     $NetBSD: config.c,v 1.10 2010/10/05 05:03:49 pgoyette Exp $     */
 
 /*-
  * Copyright (c) 2007 Juan Romero Pardines.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: config.c,v 1.9 2010/02/15 22:37:14 pgoyette Exp $");
+__RCSID("$NetBSD: config.c,v 1.10 2010/10/05 05:03:49 pgoyette Exp $");
 #endif /* not lint */
 
 #include <stdio.h>
@@ -97,6 +97,7 @@
 void
 config_dict_add_prop(const char *key, char *value)
 {
+
        if (!key || !value)
                return;
 
@@ -682,7 +683,8 @@
                num = prop_number_create_unsigned_integer(val);
                free(strval);
 
-       } else if (prop_string_equals_cstring(obj, "Fan")) {
+       } else if (prop_string_equals_cstring(obj, "Fan") ||
+                  prop_string_equals_cstring(obj, "Integer")) {
                /* no conversion */
                val = strtod(value, &endptr);
                if (*endptr != '\0')



Home | Main Index | Thread Index | Old Index