aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <dvlasenk@redhat.com>2010-10-15 11:29:02 +0200
committerDenys Vlasenko <dvlasenk@redhat.com>2010-10-15 11:29:02 +0200
commitc15613c9757f5a26da3623c1bcfa3580c81b74c3 (patch)
tree2da9f22659e539ec07a05a655269e9ca4f48f6d8
parentf2710d02210bbba4a9580c11ff053b01081eaf54 (diff)
downloadbusybox-w32-c15613c9757f5a26da3623c1bcfa3580c81b74c3.tar.gz
busybox-w32-c15613c9757f5a26da3623c1bcfa3580c81b74c3.tar.bz2
busybox-w32-c15613c9757f5a26da3623c1bcfa3580c81b74c3.zip
modutils/*: move applet bits into corresponding *.c files
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
-rw-r--r--include/applets.src.h10
-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
7 files changed, 29 insertions, 21 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index a42f6fffa..879dbf760 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -103,8 +103,6 @@ IF_DD(APPLET_NOEXEC(dd, dd, _BB_DIR_BIN, _BB_SUID_DROP, dd))
103IF_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 103IF_DEALLOCVT(APPLET(deallocvt, _BB_DIR_USR_BIN, _BB_SUID_DROP))
104IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_DROP, delgroup)) 104IF_DELGROUP(APPLET_ODDNAME(delgroup, deluser, _BB_DIR_BIN, _BB_SUID_DROP, delgroup))
105IF_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_DROP)) 105IF_DELUSER(APPLET(deluser, _BB_DIR_BIN, _BB_SUID_DROP))
106IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_DROP))
107IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
108IF_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_DROP)) 106IF_DEVFSD(APPLET(devfsd, _BB_DIR_SBIN, _BB_SUID_DROP))
109IF_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_DROP)) 107IF_DEVMEM(APPLET(devmem, _BB_DIR_SBIN, _BB_SUID_DROP))
110IF_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_DROP)) 108IF_DF(APPLET(df, _BB_DIR_BIN, _BB_SUID_DROP))
@@ -179,8 +177,6 @@ IF_IFPLUGD(APPLET(ifplugd, _BB_DIR_USR_BIN, _BB_SUID_DROP))
179IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_DROP, ifup)) 177IF_IFUPDOWN(APPLET_ODDNAME(ifup, ifupdown, _BB_DIR_SBIN, _BB_SUID_DROP, ifup))
180IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 178IF_INETD(APPLET(inetd, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
181IF_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_DROP)) 179IF_INOTIFYD(APPLET(inotifyd, _BB_DIR_SBIN, _BB_SUID_DROP))
182IF_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_DROP))
183IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
184IF_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 180IF_INSTALL(APPLET(install, _BB_DIR_USR_BIN, _BB_SUID_DROP))
185IF_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_DROP)) 181IF_IONICE(APPLET(ionice, _BB_DIR_BIN, _BB_SUID_DROP))
186#if ENABLE_FEATURE_IP_ADDRESS \ 182#if ENABLE_FEATURE_IP_ADDRESS \
@@ -222,8 +218,6 @@ IF_LPQ(APPLET_ODDNAME(lpq, lpqr, _BB_DIR_USR_BIN, _BB_SUID_DROP, lpq))
222IF_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_DROP, lpr)) 218IF_LPR(APPLET_ODDNAME(lpr, lpqr, _BB_DIR_USR_BIN, _BB_SUID_DROP, lpr))
223IF_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_DROP, ls)) 219IF_LS(APPLET_NOEXEC(ls, ls, _BB_DIR_BIN, _BB_SUID_DROP, ls))
224IF_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_DROP)) 220IF_LSATTR(APPLET(lsattr, _BB_DIR_BIN, _BB_SUID_DROP))
225IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP))
226IF_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
227IF_LSPCI(APPLET(lspci, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 221IF_LSPCI(APPLET(lspci, _BB_DIR_USR_BIN, _BB_SUID_DROP))
228IF_LSUSB(APPLET(lsusb, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 222IF_LSUSB(APPLET(lsusb, _BB_DIR_USR_BIN, _BB_SUID_DROP))
229IF_UNLZMA(APPLET_ODDNAME(lzcat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_DROP, lzcat)) 223IF_UNLZMA(APPLET_ODDNAME(lzcat, unlzma, _BB_DIR_USR_BIN, _BB_SUID_DROP, lzcat))
@@ -250,8 +244,6 @@ IF_MKNOD(APPLET_NOEXEC(mknod, mknod, _BB_DIR_BIN, _BB_SUID_DROP, mknod))
250IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP, mkpasswd)) 244IF_CRYPTPW(APPLET_ODDNAME(mkpasswd, cryptpw, _BB_DIR_USR_BIN, _BB_SUID_DROP, mkpasswd))
251IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_DROP)) 245IF_MKSWAP(APPLET(mkswap, _BB_DIR_SBIN, _BB_SUID_DROP))
252IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_DROP)) 246IF_MKTEMP(APPLET(mktemp, _BB_DIR_BIN, _BB_SUID_DROP))
253IF_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
254IF_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
255IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_DROP)) 247IF_MORE(APPLET(more, _BB_DIR_BIN, _BB_SUID_DROP))
256IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_DROP))) 248IF_MOUNT(APPLET(mount, _BB_DIR_BIN, IF_DESKTOP(_BB_SUID_MAYBE) IF_NOT_DESKTOP(_BB_SUID_DROP)))
257IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_DROP)) 249IF_MOUNTPOINT(APPLET(mountpoint, _BB_DIR_BIN, _BB_SUID_DROP))
@@ -298,8 +290,6 @@ IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, _BB_DIR_SBIN, _BB_SUID_DROP,
298IF_RFKILL(APPLET(rfkill, _BB_DIR_USR_SBIN, _BB_SUID_DROP)) 290IF_RFKILL(APPLET(rfkill, _BB_DIR_USR_SBIN, _BB_SUID_DROP))
299IF_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_DROP, rm)) 291IF_RM(APPLET_NOFORK(rm, rm, _BB_DIR_BIN, _BB_SUID_DROP, rm))
300IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_DROP, rmdir)) 292IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, _BB_DIR_BIN, _BB_SUID_DROP, rmdir))
301IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_DROP))
302IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
303IF_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_DROP)) 293IF_ROUTE(APPLET(route, _BB_DIR_SBIN, _BB_SUID_DROP))
304IF_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_DROP)) 294IF_RPM(APPLET(rpm, _BB_DIR_BIN, _BB_SUID_DROP))
305IF_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_DROP)) 295IF_RPM2CPIO(APPLET(rpm2cpio, _BB_DIR_USR_BIN, _BB_SUID_DROP))
diff --git a/modutils/depmod.c b/modutils/depmod.c
index 006a7bcc1..6a43aa110 100644
--- a/modutils/depmod.c
+++ b/modutils/depmod.c
@@ -8,6 +8,8 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10 10
11//applet:IF_DEPMOD(APPLET(depmod, _BB_DIR_SBIN, _BB_SUID_DROP))
12
11#include "libbb.h" 13#include "libbb.h"
12#include "modutils.h" 14#include "modutils.h"
13#include <sys/utsname.h> /* uname() */ 15#include <sys/utsname.h> /* uname() */
diff --git a/modutils/insmod.c b/modutils/insmod.c
index 4fe388bdc..d1f1b076b 100644
--- a/modutils/insmod.c
+++ b/modutils/insmod.c
@@ -7,6 +7,8 @@
7 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 7 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
8 */ 8 */
9 9
10//applet:IF_INSMOD(APPLET(insmod, _BB_DIR_SBIN, _BB_SUID_DROP))
11
10#include "libbb.h" 12#include "libbb.h"
11#include "modutils.h" 13#include "modutils.h"
12 14
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index 9558a2510..a1477ed85 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -7,6 +7,9 @@
7 * 7 *
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10
11//applet:IF_LSMOD(APPLET(lsmod, _BB_DIR_SBIN, _BB_SUID_DROP))
12
10#include "libbb.h" 13#include "libbb.h"
11#include "unicode.h" 14#include "unicode.h"
12 15
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c
index e0d251ee9..86470892a 100644
--- a/modutils/modprobe-small.c
+++ b/modutils/modprobe-small.c
@@ -8,6 +8,12 @@
8 * Licensed under GPLv2, see file LICENSE in this source tree. 8 * Licensed under GPLv2, see file LICENSE in this source tree.
9 */ 9 */
10 10
11//applet:IF_MODPROBE_SMALL(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
12//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(depmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
13//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(insmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
14//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(lsmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
15//applet:IF_MODPROBE_SMALL(APPLET_ODDNAME(rmmod, modprobe, _BB_DIR_SBIN, _BB_SUID_DROP, modprobe))
16
11#include "libbb.h" 17#include "libbb.h"
12/* After libbb.h, since it needs sys/types.h on some systems */ 18/* After libbb.h, since it needs sys/types.h on some systems */
13#include <sys/utsname.h> /* uname() */ 19#include <sys/utsname.h> /* uname() */
diff --git a/modutils/modprobe.c b/modutils/modprobe.c
index ab35628f4..a5cf4babf 100644
--- a/modutils/modprobe.c
+++ b/modutils/modprobe.c
@@ -8,17 +8,7 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10 10
11/* Note that unlike older versions of modules.dep/depmod (busybox and m-i-t), 11//applet:IF_MODPROBE(APPLET(modprobe, _BB_DIR_SBIN, _BB_SUID_DROP))
12 * we expect the full dependency list to be specified in modules.dep.
13 * Older versions would only export the direct dependency list.
14 */
15#include "libbb.h"
16#include "modutils.h"
17#include <sys/utsname.h>
18#include <fnmatch.h>
19
20//#define DBG(fmt, ...) bb_error_msg("%s: " fmt, __func__, ## __VA_ARGS__)
21#define DBG(...) ((void)0)
22 12
23//usage:#if !ENABLE_MODPROBE_SMALL 13//usage:#if !ENABLE_MODPROBE_SMALL
24//usage:#define modprobe_notes_usage 14//usage:#define modprobe_notes_usage
@@ -98,6 +88,19 @@
98//usage: ) 88//usage: )
99//usage:#endif /* !ENABLE_MODPROBE_SMALL */ 89//usage:#endif /* !ENABLE_MODPROBE_SMALL */
100 90
91#include "libbb.h"
92#include "modutils.h"
93#include <sys/utsname.h>
94#include <fnmatch.h>
95
96//#define DBG(fmt, ...) bb_error_msg("%s: " fmt, __func__, ## __VA_ARGS__)
97#define DBG(...) ((void)0)
98
99/* Note that unlike older versions of modules.dep/depmod (busybox and m-i-t),
100 * we expect the full dependency list to be specified in modules.dep.
101 * Older versions would only export the direct dependency list.
102 */
103
101/* Note that usage text doesn't document various 2.4 options 104/* Note that usage text doesn't document various 2.4 options
102 * we pull in through INSMOD_OPTS define */ 105 * we pull in through INSMOD_OPTS define */
103 106
diff --git a/modutils/rmmod.c b/modutils/rmmod.c
index aa1bb01d6..51390eb83 100644
--- a/modutils/rmmod.c
+++ b/modutils/rmmod.c
@@ -8,6 +8,8 @@
8 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 8 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
9 */ 9 */
10 10
11//applet:IF_RMMOD(APPLET(rmmod, _BB_DIR_SBIN, _BB_SUID_DROP))
12
11#include "libbb.h" 13#include "libbb.h"
12#include "modutils.h" 14#include "modutils.h"
13 15