summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2013-02-09 21:21:27 +0000
committermillert <millert@openbsd.org>2013-02-09 21:21:27 +0000
commit229d87d4918d67059948f11653cb322d1bcfb59e (patch)
treef7093a15d4d28857cd9df230de084b3684b20ff1
parentRemove no longer used struct emul extern declarations. (diff)
downloadwireguard-openbsd-229d87d4918d67059948f11653cb322d1bcfb59e.tar.xz
wireguard-openbsd-229d87d4918d67059948f11653cb322d1bcfb59e.zip
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 miod@ kettenis@
-rw-r--r--sbin/reboot/reboot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c
index 222dae836bd..1ad102c6eb9 100644
--- a/sbin/reboot/reboot.c
+++ b/sbin/reboot/reboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: reboot.c,v 1.32 2012/07/10 12:58:26 halex Exp $ */
+/* $OpenBSD: reboot.c,v 1.33 2013/02/09 21:21:27 millert Exp $ */
/* $NetBSD: reboot.c,v 1.8 1995/10/05 05:36:22 mycroft Exp $ */
/*
@@ -122,7 +122,7 @@ main(int argc, char *argv[])
mib[0] = CTL_MACHDEP;
mib[1] = CPU_LIDSUSPEND;
if (sysctl(mib, 2, NULL, NULL, &lidsuspend,
- sizeof(lidsuspend)) == -1)
+ sizeof(lidsuspend)) == -1 && errno != EOPNOTSUPP)
warn("sysctl");
}
#endif /* CPU_LIDSUSPEND */