summaryrefslogtreecommitdiff
path: root/modutils
diff options
context:
space:
mode:
authorDenys Vlasenko2010-10-15 11:29:02 +0200
committerDenys Vlasenko2010-10-15 11:29:02 +0200
commitc15613c9757f5a26da3623c1bcfa3580c81b74c3 (patch)
tree2da9f22659e539ec07a05a655269e9ca4f48f6d8 /modutils
parentf2710d02210bbba4a9580c11ff053b01081eaf54 (diff)
downloadbusybox-c15613c9757f5a26da3623c1bcfa3580c81b74c3.zip
busybox-c15613c9757f5a26da3623c1bcfa3580c81b74c3.tar.gz
modutils/*: move applet bits into corresponding *.c files
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'modutils')
-rw-r--r--modutils/depmod.c2
-rw-r--r--modutils/insmod.c2
-rw-r--r--modutils/lsmod.c3
-rw-r--r--modutils/modprobe-small.c6
-rw-r--r--modutils/modprobe.c25
-rw-r--r--modutils/rmmod.c2
6 files changed, 29 insertions, 11 deletions
diff --git a/modutils/depmod.c b/modutils/depmod.c
index 006a7bc..6a43aa1 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -8,6 +8,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//applet:IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_DROP))
+
#include "libbb.h"
#include "modutils.h"
#include <sys/utsname.h> /* uname() */
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 4fe388b..d1f1b07 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -7,6 +7,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//applet:IF_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_DROP))
+
#include "libbb.h"
#include "modutils.h"
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 9558a25..a1477ed 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -7,6 +7,9 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+
+//applet:IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP))
+
#include "libbb.h"
#include "unicode.h"
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index e0d251e..8647089 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -8,6 +8,12 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//applet:IF_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
+//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
+//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
+//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
+//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
+
#include "libbb.h"
/* After libbb.h, since it needs sys/types.h on some systems */
#include <sys/utsname.h> /* uname() */
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index ab35628..a5cf4ba 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -8,17 +8,7 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-/* Note that unlike older versions of modules.dep/depmod (busybox and m-i-t),
- * we expect the full dependency list to be specified in modules.dep.
- * Older versions would only export the direct dependency list.
- */
-#include "libbb.h"
-#include "modutils.h"
-#include <sys/utsname.h>
-#include <fnmatch.h>
-
-//#define DBG(fmt, ...) bb_error_msg("%s: " fmt, __func__, ## __VA_ARGS__)
-#define DBG(...) ((void)0)
+//applet:IF_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
//usage:#if !ENABLE_MODPROBE_SMALL
//usage:#define modprobe_notes_usage
@@ -98,6 +88,19 @@
//usage: )
//usage:#endif /* !ENABLE_MODPROBE_SMALL */
+#include "libbb.h"
+#include "modutils.h"
+#include <sys/utsname.h>
+#include <fnmatch.h>
+
+//#define DBG(fmt, ...) bb_error_msg("%s: " fmt, __func__, ## __VA_ARGS__)
+#define DBG(...) ((void)0)
+
+/* Note that unlike older versions of modules.dep/depmod (busybox and m-i-t),
+ * we expect the full dependency list to be specified in modules.dep.
+ * Older versions would only export the direct dependency list.
+ */
+
/* Note that usage text doesn't document various 2.4 options
* we pull in through INSMOD_OPTS define */
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index aa1bb01..51390eb 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -8,6 +8,8 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//applet:IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_DROP))
+
#include "libbb.h"
#include "modutils.h"