summaryrefslogtreecommitdiff
path: root/sbin/sysctl
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2006-10-19 03:49:27 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2006-10-19 03:49:27 +0000
commitdda75d98fe7b030ff6ae1bf0deed54fac13fcf23 (patch)
tree90725f7bf3f5e3b7792635fe1f4c3821a77a4087 /sbin/sysctl
parentf9cc6c27b91446ac5248b28e7a0283e2daec3030 (diff)
Add WATTHOUR and AMPHOUR
ok jordan@
Diffstat (limited to 'sbin/sysctl')
-rw-r--r--sbin/sysctl/sysctl.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index 99af79eac2e..9fd22f13423 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.141 2006/06/05 06:34:44 otto Exp $ */
+/* $OpenBSD: sysctl.c,v 1.142 2006/10/19 03:49:26 marco Exp $ */
/* $NetBSD: sysctl.c,v 1.9 1995/09/30 07:12:50 thorpej Exp $ */
/*
@@ -40,7 +40,7 @@ static const char copyright[] =
#if 0
static const char sccsid[] = "@(#)sysctl.c 8.5 (Berkeley) 5/9/95";
#else
-static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.141 2006/06/05 06:34:44 otto Exp $";
+static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.142 2006/10/19 03:49:26 marco Exp $";
#endif
#endif /* not lint */
@@ -2141,6 +2141,12 @@ print_sensor(struct sensor *s)
case SENSOR_AMPS:
printf("%.2f A", s->value / 1000000.0);
break;
+ case SENSOR_WATTHOUR:
+ printf("%.2f Wh", s->value / 1000000.0);
+ break;
+ case SENSOR_AMPHOUR:
+ printf("%.2f Ah", s->value / 1000000.0);
+ break;
case SENSOR_INDICATOR:
printf("%s", s->value ? "On" : "Off");
break;