diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2005-08-04 03:53:09 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2005-08-04 03:53:09 +0000 |
commit | 17fc3ec4fb9d05829d77d34b2849cfbbbcdf2b4b (patch) | |
tree | 8fd4850c8a3693e38683b25d0f2cc3f7f9048112 /sbin/sysctl/sysctl.c | |
parent | 23fbb36864365061d9728797f07a141ac735cc81 (diff) |
a quick diff for marco, who wanted to see if his power supplies were on or
off. adds printing of the INDICATOR sensor type
ok deraadt@
Diffstat (limited to 'sbin/sysctl/sysctl.c')
-rw-r--r-- | sbin/sysctl/sysctl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c index 43bbdf12cba..46a421e2e5f 100644 --- a/sbin/sysctl/sysctl.c +++ b/sbin/sysctl/sysctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sysctl.c,v 1.124 2005/08/03 14:53:39 dlg Exp $ */ +/* $OpenBSD: sysctl.c,v 1.125 2005/08/04 03:53:08 dlg 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.124 2005/08/03 14:53:39 dlg Exp $"; +static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.125 2005/08/04 03:53:08 dlg Exp $"; #endif #endif /* not lint */ @@ -2145,6 +2145,9 @@ print_sensor(struct sensor *s) case SENSOR_VOLTS_DC: printf("volts_dc, %.2f V", s->value / 1000000.0); break; + case SENSOR_INDICATOR: + printf("indicator, %s", s->value ? "On" : "Off"); + break; default: printf("unknown"); } |