This extends button-hotplug to allow userspace handlers for rfkill
events, enabling /etc/rc.button/rfkill script to work properly on
routers with rfkill switch.

Signed-off-by: Marcin Jurkowski <marci...@gmail.com>
---
 package/kernel/button-hotplug/src/button-hotplug.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/kernel/button-hotplug/src/button-hotplug.c 
b/package/kernel/button-hotplug/src/button-hotplug.c
index 684a0c6..588f7a0 100644
--- a/package/kernel/button-hotplug/src/button-hotplug.c
+++ b/package/kernel/button-hotplug/src/button-hotplug.c
@@ -85,6 +85,9 @@ static struct bh_map button_map[] = {
        BH_MAP(BTN_9,           "BTN_9"),
        BH_MAP(KEY_RESTART,     "reset"),
        BH_MAP(KEY_POWER,       "power"),
+#ifdef KEY_RFKILL
+       BH_MAP(KEY_RFKILL,      "rfkill"),
+#endif /* KEY_RFKILL */
 #ifdef KEY_WPS_BUTTON
        BH_MAP(KEY_WPS_BUTTON,  "wps"),
 #endif /* KEY_WPS_BUTTON */
-- 
1.8.1.5
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to