Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/evbarm/rpi be verbose about sysmon error.
details: https://anonhg.NetBSD.org/src/rev/f043592845a4
branches: trunk
changeset: 332696:f043592845a4
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Sat Oct 04 13:18:34 2014 +0000
description:
be verbose about sysmon error.
enable monitoring.
diffstat:
sys/arch/evbarm/rpi/rpi_vcmbox.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diffs (41 lines):
diff -r 62f300f505b9 -r f043592845a4 sys/arch/evbarm/rpi/rpi_vcmbox.c
--- a/sys/arch/evbarm/rpi/rpi_vcmbox.c Sat Oct 04 13:15:50 2014 +0000
+++ b/sys/arch/evbarm/rpi/rpi_vcmbox.c Sat Oct 04 13:18:34 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rpi_vcmbox.c,v 1.3 2014/04/01 06:55:29 skrll Exp $ */
+/* $NetBSD: rpi_vcmbox.c,v 1.4 2014/10/04 13:18:34 mlelstv Exp $ */
/*-
* Copyright (c) 2013 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rpi_vcmbox.c,v 1.3 2014/04/01 06:55:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rpi_vcmbox.c,v 1.4 2014/10/04 13:18:34 mlelstv Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -152,7 +152,11 @@
sc->sc_sme->sme_refresh = vcmbox_sensor_refresh;
sc->sc_sme->sme_get_limits = vcmbox_sensor_get_limits;
vcmbox_create_sensors(sc);
- sysmon_envsys_register(sc->sc_sme);
+ if (sysmon_envsys_register(sc->sc_sme) == 0)
+ return;
+
+ aprint_error_dev(self, "unable to register with sysmon\n");
+ sysmon_envsys_destroy(sc->sc_sme);
}
static int
@@ -355,7 +359,8 @@
sc->sc_sensor[VCMBOX_SENSOR_TEMP].sensor = VCMBOX_SENSOR_TEMP;
sc->sc_sensor[VCMBOX_SENSOR_TEMP].units = ENVSYS_STEMP;
sc->sc_sensor[VCMBOX_SENSOR_TEMP].state = ENVSYS_SINVALID;
- sc->sc_sensor[VCMBOX_SENSOR_TEMP].flags = ENVSYS_FHAS_ENTROPY;
+ sc->sc_sensor[VCMBOX_SENSOR_TEMP].flags = ENVSYS_FMONLIMITS |
+ ENVSYS_FHAS_ENTROPY;
strlcpy(sc->sc_sensor[VCMBOX_SENSOR_TEMP].desc,
vcmbox_sensor_name[VCMBOX_SENSOR_TEMP],
sizeof(sc->sc_sensor[VCMBOX_SENSOR_TEMP].desc));
Home |
Main Index |
Thread Index |
Old Index