Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sysmon Previous fix broke the setting of current val...
details: https://anonhg.NetBSD.org/src/rev/4d16208b6207
branches: trunk
changeset: 766098:4d16208b6207
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Wed Jun 15 13:34:13 2011 +0000
description:
Previous fix broke the setting of current value for Indicator and
Battery-Charge sensors. Fix this.
diffstat:
sys/dev/sysmon/sysmon_envsys.c | 20 +++++++++++---------
1 files changed, 11 insertions(+), 9 deletions(-)
diffs (48 lines):
diff -r d4ae4ebdceb7 -r 4d16208b6207 sys/dev/sysmon/sysmon_envsys.c
--- a/sys/dev/sysmon/sysmon_envsys.c Wed Jun 15 13:24:48 2011 +0000
+++ b/sys/dev/sysmon/sysmon_envsys.c Wed Jun 15 13:34:13 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys.c,v 1.114 2011/06/08 18:22:24 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys.c,v 1.115 2011/06/15 13:34:13 pgoyette Exp $ */
/*-
* Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -64,7 +64,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.114 2011/06/08 18:22:24 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.115 2011/06/15 13:34:13 pgoyette Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -1555,6 +1555,15 @@
if (error)
return (-error);
+ if (value_update) {
+ /*
+ * update sensor's current value.
+ */
+ error = sme_sensor_upint32(dict, "cur-value", edata->value_cur);
+ if (error)
+ return error;
+ }
+
/*
* Battery charge and Indicator types do not
* need the remaining objects, so skip them.
@@ -1573,13 +1582,6 @@
}
if (value_update) {
- /*
- * update sensor's current value.
- */
- error = sme_sensor_upint32(dict, "cur-value", edata->value_cur);
- if (error)
- return error;
-
/*
* update sensor's {max,min}-value.
*/
Home |
Main Index |
Thread Index |
Old Index