diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/onewire/owid.c | 4 | ||||
-rw-r--r-- | sys/dev/onewire/owsbm.c | 4 | ||||
-rw-r--r-- | sys/dev/onewire/owtemp.c | 4 |
3 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/onewire/owid.c b/sys/dev/onewire/owid.c index 2470f48b263..e2efab5b6d2 100644 --- a/sys/dev/onewire/owid.c +++ b/sys/dev/onewire/owid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: owid.c,v 1.5 2007/06/01 21:30:31 cnst Exp $ */ +/* $OpenBSD: owid.c,v 1.6 2008/10/25 00:27:09 deraadt Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org> @@ -85,6 +85,8 @@ owid_attach(struct device *parent, struct device *self, void *aux) sizeof(sc->sc_sensordev.xname)); sc->sc_sensor.type = SENSOR_INTEGER; sc->sc_sensor.value = ONEWIRE_ROM_SN(sc->sc_rom); + snprintf(sc->sc_sensor.desc, sizeof(sc->sc_sensor.desc), "sn %012llx", + ONEWIRE_ROM_SN(oa->oa_rom)); sensor_attach(&sc->sc_sensordev, &sc->sc_sensor); sensordev_install(&sc->sc_sensordev); diff --git a/sys/dev/onewire/owsbm.c b/sys/dev/onewire/owsbm.c index 3f6ef634f2a..3fb4faf54b4 100644 --- a/sys/dev/onewire/owsbm.c +++ b/sys/dev/onewire/owsbm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: owsbm.c,v 1.4 2007/06/24 05:34:35 dlg Exp $ */ +/* $OpenBSD: owsbm.c,v 1.5 2008/10/25 00:27:09 deraadt Exp $ */ /* * Copyright (c) 2007 Aaron Linville <aaron@linville.org> @@ -117,6 +117,8 @@ owsbm_attach(struct device *parent, struct device *self, void *aux) strlcpy(sc->sc_sensordev.xname, sc->sc_dev.dv_xname, sizeof(sc->sc_sensordev.xname)); sc->sc_temp.type = SENSOR_TEMP; + snprintf(sc->sc_temp.desc, sizeof(sc->sc_temp.desc), "sn %012llx", + ONEWIRE_ROM_SN(oa->oa_rom)); sensor_attach(&sc->sc_sensordev, &sc->sc_temp); /* Initialize voltage sensor */ diff --git a/sys/dev/onewire/owtemp.c b/sys/dev/onewire/owtemp.c index 38d990f59a9..204ed1e93f8 100644 --- a/sys/dev/onewire/owtemp.c +++ b/sys/dev/onewire/owtemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: owtemp.c,v 1.9 2007/11/28 18:26:11 todd Exp $ */ +/* $OpenBSD: owtemp.c,v 1.10 2008/10/25 00:27:09 deraadt Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org> @@ -100,6 +100,8 @@ owtemp_attach(struct device *parent, struct device *self, void *aux) strlcpy(sc->sc_sensordev.xname, sc->sc_dev.dv_xname, sizeof(sc->sc_sensordev.xname)); sc->sc_sensor.type = SENSOR_TEMP; + snprintf(sc->sc_sensor.desc, sizeof(sc->sc_sensor.desc), "sn %012llx", + ONEWIRE_ROM_SN(oa->oa_rom)); sc->sc_sensortask = sensor_task_register(sc, owtemp_update, 5); if (sc->sc_sensortask == NULL) { |