diff options
author | Martin Natano <natano@cvs.openbsd.org> | 2017-03-02 10:38:11 +0000 |
---|---|---|
committer | Martin Natano <natano@cvs.openbsd.org> | 2017-03-02 10:38:11 +0000 |
commit | 74ec58af25dbea2773d924537499c413d0d983dd (patch) | |
tree | 9a9d0c79a40dd17ac87ca0acbfdb4623020c08bc /sys/arch/i386/include | |
parent | 6bfb01fcf4947233b8bf5ffe005dbc1f79a35df0 (diff) |
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/arch/i386/include')
-rw-r--r-- | sys/arch/i386/include/cpu.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/i386/include/cpu.h b/sys/arch/i386/include/cpu.h index bde738031e7..22538aad5fe 100644 --- a/sys/arch/i386/include/cpu.h +++ b/sys/arch/i386/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.152 2017/02/06 09:13:41 mpi Exp $ */ +/* $OpenBSD: cpu.h,v 1.153 2017/03/02 10:38:10 natano Exp $ */ /* $NetBSD: cpu.h,v 1.35 1996/05/05 19:29:26 christos Exp $ */ /*- @@ -524,7 +524,8 @@ int cpu_paenable(void *); #define CPU_SSE2 15 /* supports SSE2 */ #define CPU_XCRYPT 16 /* supports VIA xcrypt in userland */ #define CPU_LIDSUSPEND 17 /* lid close causes a suspend */ -#define CPU_MAXID 18 /* number of valid machdep ids */ +#define CPU_LIDACTION 18 /* action caused by lid close */ +#define CPU_MAXID 19 /* number of valid machdep ids */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ @@ -545,6 +546,7 @@ int cpu_paenable(void *); { "sse2", CTLTYPE_INT }, \ { "xcrypt", CTLTYPE_INT }, \ { "lidsuspend", CTLTYPE_INT }, \ + { "lidaction", CTLTYPE_INT }, \ } /* |