diff options
| author | jmcneill <jmcneill@NetBSD.org> | 2007-12-22 18:35:13 +0000 |
|---|---|---|
| committer | jmcneill <jmcneill@NetBSD.org> | 2007-12-22 18:35:13 +0000 |
| commit | ebad57771cde02c69565b1d3ce2bc3e25dea1c33 (patch) | |
| tree | e2fa0f3f78ef38e43b59a32e15d9665407ef723e /sys/dev/sysmon | |
| parent | a1e817b5ba6164f1502c1ba40520e81a1a6d2514 (diff) | |
Handle hotkey events using /etc/powerd/scripts/hotkey_button, ok xtraeme
Diffstat (limited to 'sys/dev/sysmon')
| -rw-r--r-- | sys/dev/sysmon/sysmon_power.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/dev/sysmon/sysmon_power.c b/sys/dev/sysmon/sysmon_power.c index 93ff2fa5b6f..d1827e8e593 100644 --- a/sys/dev/sysmon/sysmon_power.c +++ b/sys/dev/sysmon/sysmon_power.c @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_power.c,v 1.34 2007/12/09 20:57:19 martin Exp $ */ +/* $NetBSD: sysmon_power.c,v 1.35 2007/12/22 18:35:13 jmcneill Exp $ */ /*- * Copyright (c) 2007 Juan Romero Pardines. @@ -69,7 +69,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.34 2007/12/09 20:57:19 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_power.c,v 1.35 2007/12/22 18:35:13 jmcneill Exp $"); #include "opt_compat_netbsd.h" #include <sys/param.h> @@ -119,6 +119,7 @@ static const struct power_event_description pswitch_type_desc[] = { { PSWITCH_TYPE_LID, "lid_switch" }, { PSWITCH_TYPE_RESET, "reset_button" }, { PSWITCH_TYPE_ACADAPTER, "acadapter" }, + { PSWITCH_TYPE_HOTKEY, "hotkey_button" }, { -1, NULL } }; @@ -972,6 +973,12 @@ sysmon_pswitch_event(struct sysmon_pswitch *smpsw, int event) printf("%s: sleep button pressed.\n", smpsw->smpsw_name); break; + case PSWITCH_TYPE_HOTKEY: + /* + * Eat up the event, there's nothing we can do + */ + break; + case PSWITCH_TYPE_LID: switch (event) { case PSWITCH_EVENT_PRESSED: |
