Module Name:    src
Committed By:   pgoyette
Date:           Thu Feb  2 02:47:59 UTC 2012

Modified Files:
        src/sys/dev/i2c: sdtemp.c

Log Message:
Clean up display of initial hardware provided limits.  No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/dev/i2c/sdtemp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/sdtemp.c
diff -u src/sys/dev/i2c/sdtemp.c:1.20 src/sys/dev/i2c/sdtemp.c:1.21
--- src/sys/dev/i2c/sdtemp.c:1.20	Sun Oct  2 19:03:56 2011
+++ src/sys/dev/i2c/sdtemp.c	Thu Feb  2 02:47:59 2012
@@ -1,4 +1,4 @@
-/*      $NetBSD: sdtemp.c,v 1.20 2011/10/02 19:03:56 jmcneill Exp $        */
+/*      $NetBSD: sdtemp.c,v 1.21 2012/02/02 02:47:59 pgoyette Exp $        */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.20 2011/10/02 19:03:56 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdtemp.c,v 1.21 2012/02/02 02:47:59 pgoyette Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -283,27 +283,24 @@ sdtemp_attach(device_t parent, device_t 
 	/* Retrieve and display hardware monitor limits */
 	sdtemp_get_limits(sc->sc_sme, sc->sc_sensor, &sc->sc_deflims,
 	    &sc->sc_defprops);
-	aprint_normal("%s: ", device_xname(self));
+	aprint_normal_dev(self, "Hardware limits: ");
 	i = 0;
 	if (sc->sc_defprops & PROP_WARNMIN) {
-		aprint_normal("low limit %dC",
+		aprint_normal("low %dC",
 		              __UK2C(sc->sc_deflims.sel_warnmin));
 		i++;
 	}
 	if (sc->sc_defprops & PROP_WARNMAX) {
-		aprint_normal("%shigh limit %dC ", (i)?", ":"",
+		aprint_normal("%shigh %dC ", (i)?", ":"",
 			      __UK2C(sc->sc_deflims.sel_warnmax));
 		i++;
 	}
 	if (sc->sc_defprops & PROP_CRITMAX) {
-		aprint_normal("%scritical limit %dC ", (i)?", ":"",
+		aprint_normal("%scritical %dC ", (i)?", ":"",
 			      __UK2C(sc->sc_deflims.sel_critmax));
 		i++;
 	}
-	if (i == 0)
-		aprint_normal("no hardware limits set\n");
-	else
-		aprint_normal("\n");
+	aprint_normal("%s\n", (i)?"":"none set");
 
 	return;
 

Reply via email to