When running OpenWrt within KVM KEY_POWER is generated from the ACPI
button driver when restarting or powering down the VM.

Extend button-hotplug to allow user space handlers for these events.

Signed-off-by: Helmut Schaa <[email protected]>
---
 package/kernel/button-hotplug/src/button-hotplug.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/button-hotplug/src/button-hotplug.c 
b/package/kernel/button-hotplug/src/button-hotplug.c
index 4a8c4a8..684a0c6 100644
--- a/package/kernel/button-hotplug/src/button-hotplug.c
+++ b/package/kernel/button-hotplug/src/button-hotplug.c
@@ -84,6 +84,7 @@ static struct bh_map button_map[] = {
        BH_MAP(BTN_8,           "BTN_8"),
        BH_MAP(BTN_9,           "BTN_9"),
        BH_MAP(KEY_RESTART,     "reset"),
+       BH_MAP(KEY_POWER,       "power"),
 #ifdef KEY_WPS_BUTTON
        BH_MAP(KEY_WPS_BUTTON,  "wps"),
 #endif /* KEY_WPS_BUTTON */
-- 
1.7.10.4

_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to