diff options
-rw-r--r-- | sbin/sysctl/sysctl.c | 7 | ||||
-rw-r--r-- | sys/sys/sensors.h | 5 |
2 files changed, 8 insertions, 4 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"); } diff --git a/sys/sys/sensors.h b/sys/sys/sensors.h index 1f8dc96800d..56838c09b60 100644 --- a/sys/sys/sensors.h +++ b/sys/sys/sensors.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sensors.h,v 1.9 2005/11/10 08:20:20 dlg Exp $ */ +/* $OpenBSD: sensors.h,v 1.10 2005/11/15 22:12:07 kettenis Exp $ */ /* * Copyright (c) 2003, 2004 Alexander Yurchenko <grange@openbsd.org> @@ -41,7 +41,8 @@ enum sensor_type { SENSOR_AMPHOUR, /* power capacity */ SENSOR_INDICATOR, /* boolean indicator */ SENSOR_INTEGER, /* generic integer value */ - SENSOR_PERCENT /* percent */ + SENSOR_PERCENT, /* percent */ + SENSOR_LUX /* illuminance (mulx) */ }; /* Sensor states */ |