summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2013-11-20 14:20:07 +0100
committerDenys Vlasenko2013-11-20 14:21:29 +0100
commit2635369a92db338321b2ba38e73539992967357c (patch)
tree74c31a681f0188e8d35396f4e64dec4bfe0943f4
parent0545e3b69ab57af1c21d199611c56b7f7593c8c5 (diff)
downloadbusybox-2635369a92db338321b2ba38e73539992967357c.zip
busybox-2635369a92db338321b2ba38e73539992967357c.tar.gz
rfkill: use new-style config/kbuild/applet
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/applets.src.h1
-rw-r--r--miscutils/Config.src12
-rw-r--r--miscutils/Kbuild.src1
-rw-r--r--miscutils/rfkill.c17
4 files changed, 17 insertions, 14 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index 2ceba53..7dbd4c7 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -288,7 +288,6 @@ IF_RENICE(APPLET(renice, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_RESET(APPLET(reset, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_RESIZE(APPLET(resize, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, BB_DIR_SBIN, BB_SUID_DROP, restorecon))
-IF_RFKILL(APPLET(rfkill, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm))
IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir))
IF_ROUTE(APPLET(route, BB_DIR_SBIN, BB_SUID_DROP))
diff --git a/miscutils/Config.src b/miscutils/Config.src
index 117ec77..1da9800 100644
--- a/miscutils/Config.src
+++ b/miscutils/Config.src
@@ -503,18 +503,6 @@ config READAHEAD
As readahead(2) blocks until each file has been read, it is best to
run this applet as a background job.
-config RFKILL
- bool "rfkill"
- default n # doesn't build on Ubuntu 9.04
- select PLATFORM_LINUX
- help
- Enable/disable wireless devices.
-
- rfkill list : list all wireless devices
- rfkill list bluetooth : list all bluetooth devices
- rfkill list 1 : list device corresponding to the given index
- rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
-
config RUNLEVEL
bool "runlevel"
default y
diff --git a/miscutils/Kbuild.src b/miscutils/Kbuild.src
index f3954f4..9e164f1 100644
--- a/miscutils/Kbuild.src
+++ b/miscutils/Kbuild.src
@@ -36,7 +36,6 @@ lib-$(CONFIG_MOUNTPOINT) += mountpoint.o
lib-$(CONFIG_MT) += mt.o
lib-$(CONFIG_RAIDAUTORUN) += raidautorun.o
lib-$(CONFIG_READAHEAD) += readahead.o
-lib-$(CONFIG_RFKILL) += rfkill.o
lib-$(CONFIG_RUNLEVEL) += runlevel.o
lib-$(CONFIG_RX) += rx.o
lib-$(CONFIG_SETSID) += setsid.o
diff --git a/miscutils/rfkill.c b/miscutils/rfkill.c
index 4671973..7411b6f 100644
--- a/miscutils/rfkill.c
+++ b/miscutils/rfkill.c
@@ -7,6 +7,23 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config RFKILL
+//config: bool "rfkill"
+//config: default n # doesn't build on Ubuntu 9.04
+//config: select PLATFORM_LINUX
+//config: help
+//config: Enable/disable wireless devices.
+//config:
+//config: rfkill list : list all wireless devices
+//config: rfkill list bluetooth : list all bluetooth devices
+//config: rfkill list 1 : list device corresponding to the given index
+//config: rfkill block|unblock wlan : block/unblock all wlan(wifi) devices
+//config:
+
+//applet:IF_RFKILL(APPLET(rfkill, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_RFKILL) += rfkill.o
+
//usage:#define rfkill_trivial_usage
//usage: "COMMAND [INDEX|TYPE]"
//usage:#define rfkill_full_usage "\n\n"