summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa
diff options
context:
space:
mode:
authornatano <natano@openbsd.org>2017-03-02 10:38:09 +0000
committernatano <natano@openbsd.org>2017-03-02 10:38:09 +0000
commit2d357aeded0106833319c29a54d2bb4b14c40d90 (patch)
tree65a308eef3237aa2a4cbc2d2c3e20c7e67104495 /sys/dev/isa
parent8168 support jumbo frames; (diff)
downloadwireguard-openbsd-2d357aeded0106833319c29a54d2bb4b14c40d90.tar.xz
wireguard-openbsd-2d357aeded0106833319c29a54d2bb4b14c40d90.zip
Add a new sysctl machdep.lidaction. The sysctl works as follows:
machdep.lidaction=0 # do nothing machdep.lidaction=1 # suspend machdep.lidaction=2 # hibernate lidsuspend is just an alias for lidaction, so if you change one, the other one will have the same value. The plan is to remove machdep.lidsuspend eventually when people have upgraded their /ets/sysctl.conf. discussed with deraadt, who came up with the new MIB name no objections mlarkin ok stsp halex jcs
Diffstat (limited to 'sys/dev/isa')
-rw-r--r--sys/dev/isa/aps.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/isa/aps.c b/sys/dev/isa/aps.c
index fa1f4662e9d..c1f93bcaa74 100644
--- a/sys/dev/isa/aps.c
+++ b/sys/dev/isa/aps.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: aps.c,v 1.25 2015/03/14 03:38:47 jsg Exp $ */
+/* $OpenBSD: aps.c,v 1.26 2017/03/02 10:38:10 natano Exp $ */
/*
* Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org>
* Copyright (c) 2008 Can Erkin Acar <canacar@openbsd.org>
@@ -434,7 +434,7 @@ aps_refresh_sensor_data(struct aps_softc *sc)
int64_t temp;
int i;
#if NAPM > 0
- extern int lid_suspend;
+ extern int lid_action;
extern int apm_lidclose;
#endif
@@ -467,7 +467,7 @@ aps_refresh_sensor_data(struct aps_softc *sc)
sc->sensors[APS_SENSOR_MSACT].value =
(sc->aps_data.input & APS_INPUT_MS) ? 1 : 0;
#if NAPM > 0
- if (lid_suspend &&
+ if (lid_action &&
(sc->sensors[APS_SENSOR_LIDOPEN].value == 1) &&
(sc->aps_data.input & APS_INPUT_LIDOPEN) == 0)
/* Inform APM that the lid has closed */