Module Name: src
Committed By: pgoyette
Date: Tue Oct 5 05:03:49 UTC 2010
Modified Files:
src/usr.sbin/envstat: config.c
Log Message:
Apply proper conversion (which is _no_ conversion) when setting limit
values for sensors of type ENVSYS_INTEGER.
To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/envstat/config.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/envstat/config.c
diff -u src/usr.sbin/envstat/config.c:1.9 src/usr.sbin/envstat/config.c:1.10
--- src/usr.sbin/envstat/config.c:1.9 Mon Feb 15 22:37:14 2010
+++ src/usr.sbin/envstat/config.c Tue Oct 5 05:03:49 2010
@@ -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')