diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2013-02-11 15:52:43 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2013-02-11 15:52:43 +0000 |
commit | a9adb71cfc4f8563cec7231e996164c74b19585c (patch) | |
tree | 1ce607ea02e4a52f87cb801ecc3bd91bc0b52f86 /sbin/init | |
parent | 368955b54434b65fa489d9ea14d0119441979fb1 (diff) |
Ignore sysctl failure for CPU_LIDSUSPEND when errno is EOPNOTSUPP.
Just because CPU_LIDSUSPEND is defined in cpu.h does mean it is
actually supported by the hardware. OK halex@
Diffstat (limited to 'sbin/init')
-rw-r--r-- | sbin/init/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/init/init.c b/sbin/init/init.c index 189ff2a2d0f..7f632afd481 100644 --- a/sbin/init/init.c +++ b/sbin/init/init.c @@ -1,4 +1,4 @@ -/* $OpenBSD: init.c,v 1.47 2012/10/11 22:21:29 halex Exp $ */ +/* $OpenBSD: init.c,v 1.48 2013/02/11 15:52:42 millert Exp $ */ /* $NetBSD: init.c,v 1.22 1996/05/15 23:29:33 jtc Exp $ */ /*- @@ -1320,7 +1320,7 @@ nice_death(void) if ((death_howto & RB_POWERDOWN) && (sysctl(lidsuspend_mib, 2, NULL, NULL, &dontsuspend, - sizeof(dontsuspend)) < 0)) + sizeof(dontsuspend)) == -1) && (errno != EOPNOTSUPP)) warning("cannot disable lid suspend"); #endif |