Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Aug 2012 19:32:38 +0000 (UTC)
From:      Andreas Tobler <andreast@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r239398 - head/sys/dev/iicbus
Message-ID:  <201208191932.q7JJWcUn026170@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andreast
Date: Sun Aug 19 19:32:38 2012
New Revision: 239398
URL: http://svn.freebsd.org/changeset/base/239398

Log:
  Avoid using the degree symbol. Looks ugly on the console.

Modified:
  head/sys/dev/iicbus/max6690.c

Modified: head/sys/dev/iicbus/max6690.c
==============================================================================
--- head/sys/dev/iicbus/max6690.c	Sun Aug 19 19:31:36 2012	(r239397)
+++ head/sys/dev/iicbus/max6690.c	Sun Aug 19 19:32:38 2012	(r239398)
@@ -251,7 +251,7 @@ max6690_start(void *xdev)
 	struct max6690_softc *sc;
 	struct sysctl_oid *oid, *sensroot_oid;
 	struct sysctl_ctx_list *ctx;
-	char sysctl_name[32];
+	char sysctl_desc[40], sysctl_name[32];
 	int i, j;
 
 	device_t dev = (device_t)xdev;
@@ -293,6 +293,8 @@ max6690_start(void *xdev)
 		}
 		sysctl_name[j] = 0;
 
+		sprintf(sysctl_desc,"%s %s", sc->sc_sensors[i].therm.name,
+			"(C)");
 		oid = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(sensroot_oid),
 				      OID_AUTO,
 				      sysctl_name, CTLFLAG_RD, 0,
@@ -300,8 +302,7 @@ max6690_start(void *xdev)
 		/* I use i to pass the sensor id. */
 		SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(oid), OID_AUTO, "temp",
 				CTLTYPE_INT | CTLFLAG_RD, dev, i % 2,
-				max6690_sensor_sysctl, "IK",
-				"Sensor Temp in °C");
+				max6690_sensor_sysctl, "IK", sysctl_desc);
 
 	}
 	/* Dump sensor location & ID. */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201208191932.q7JJWcUn026170>