summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2005-11-15 22:12:08 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2005-11-15 22:12:08 +0000
commit361682cc94392ed4cf850314b5d4a572069f8089 (patch)
treeb6398c2d18686f788a62cf09511fe6e90595335f /sbin
parent14c682e7d0c588300f1984d3de1a7a0c1370ef15 (diff)
Add support for light sensors.
ok dlg@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/sysctl/sysctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/sysctl/sysctl.c b/sbin/sysctl/sysctl.c
index dce9309983e..d12c6bb7dde 100644
--- a/sbin/sysctl/sysctl.c
+++ b/sbin/sysctl/sysctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sysctl.c,v 1.131 2005/11/12 15:20:33 deraadt Exp $ */
+/* $OpenBSD: sysctl.c,v 1.132 2005/11/15 22:12:07 kettenis 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.131 2005/11/12 15:20:33 deraadt Exp $";
+static const char rcsid[] = "$OpenBSD: sysctl.c,v 1.132 2005/11/15 22:12:07 kettenis Exp $";
#endif
#endif /* not lint */
@@ -2166,6 +2166,9 @@ print_sensor(struct sensor *s)
case SENSOR_PERCENT:
printf("percent, %.2f%%", (float)s->value / 1000.0);
break;
+ case SENSOR_LUX:
+ printf("lux, %.2f lx", s->value / 1000000.0);
+ break;
default:
printf("unknown");
}