aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2016-11-23 11:46:32 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2016-11-23 11:46:32 +0100
commitdd898c9f3388fca1d7339a45150fbb7406de0971 (patch)
treef9f498c9d86c26bd208acc687c5f29b451927ce3
parente5dd71f94f8691c41382b89de35088695cca34b9 (diff)
downloadbusybox-w32-dd898c9f3388fca1d7339a45150fbb7406de0971.tar.gz
busybox-w32-dd898c9f3388fca1d7339a45150fbb7406de0971.tar.bz2
busybox-w32-dd898c9f3388fca1d7339a45150fbb7406de0971.zip
Convert all util-linux/* applets to "new style" applet definitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--include/applets.src.h39
-rw-r--r--util-linux/Config.src505
-rw-r--r--util-linux/Kbuild.src33
-rw-r--r--util-linux/acpid.c26
-rw-r--r--util-linux/blkdiscard.c1
-rw-r--r--util-linux/blkid.c20
-rw-r--r--util-linux/blockdev.c9
-rw-r--r--util-linux/dmesg.c37
-rw-r--r--util-linux/fatattr.c1
-rw-r--r--util-linux/fbset.c32
-rw-r--r--util-linux/fdformat.c10
-rw-r--r--util-linux/fdisk.c80
-rw-r--r--util-linux/findfs.c14
-rw-r--r--util-linux/flock.c9
-rw-r--r--util-linux/freeramdisk.c30
-rw-r--r--util-linux/fsck_minix.c14
-rw-r--r--util-linux/getopt.c22
-rw-r--r--util-linux/hexdump.c29
-rw-r--r--util-linux/hwclock.c36
-rw-r--r--util-linux/ipcrm.c11
-rw-r--r--util-linux/ipcs.c11
-rw-r--r--util-linux/losetup.c12
-rw-r--r--util-linux/lspci.c13
-rw-r--r--util-linux/lsusb.c13
-rw-r--r--util-linux/mkfs_minix.c21
-rw-r--r--util-linux/mkfs_reiser.c11
-rw-r--r--util-linux/mkswap.c23
-rw-r--r--util-linux/more.c13
-rw-r--r--util-linux/mount.c8
-rw-r--r--util-linux/pivot_root.c16
-rw-r--r--util-linux/rdate.c14
-rw-r--r--util-linux/rdev.c9
-rw-r--r--util-linux/readprofile.c10
-rw-r--r--util-linux/rev.c9
-rw-r--r--util-linux/rtcwake.c10
-rw-r--r--util-linux/script.c9
-rw-r--r--util-linux/scriptreplay.c10
-rw-r--r--util-linux/swaponoff.c1
-rw-r--r--util-linux/switch_root.c23
-rw-r--r--util-linux/uevent.c1
-rw-r--r--util-linux/umount.c20
-rw-r--r--util-linux/unshare.c1
42 files changed, 622 insertions, 594 deletions
diff --git a/include/applets.src.h b/include/applets.src.h
index adce804e5..23453b0ef 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -75,9 +75,7 @@ s - suid type:
75INSERT 75INSERT
76IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) 76IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
77IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test)) 77IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
78IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
79IF_BASENAME(APPLET_NOFORK(basename, basename, BB_DIR_USR_BIN, BB_SUID_DROP, basename)) 78IF_BASENAME(APPLET_NOFORK(basename, basename, BB_DIR_USR_BIN, BB_SUID_DROP, basename))
80IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP))
81IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP)) 79IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP))
82IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat)) 80IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat))
83IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP)) 81IF_CATV(APPLET(catv, BB_DIR_BIN, BB_SUID_DROP))
@@ -94,7 +92,6 @@ IF_DD(APPLET_NOEXEC(dd, dd, BB_DIR_BIN, BB_SUID_DROP, dd))
94IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP)) 92IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP))
95IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP)) 93IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP))
96IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname)) 94IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname))
97IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
98IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix)) 95IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix))
99IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP)) 96IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP))
100IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP)) 97IF_DUMPLEASES(APPLET(dumpleases, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -105,71 +102,37 @@ IF_ENV(APPLET_NOEXEC(env, env, BB_DIR_USR_BIN, BB_SUID_DROP, env))
105IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP)) 102IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP))
106IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP)) 103IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP))
107IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false)) 104IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false))
108IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP))
109IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush))
110IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP))
111IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP))
112/* Benefits from suid root: better access to /dev/BLOCKDEVs: */
113IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE))
114IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP))
115IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold)) 105IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold))
116IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP))
117//IF_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext2)) 106//IF_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext2))
118//IF_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext3)) 107//IF_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext3))
119IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix))
120IF_FSYNC(APPLET_NOFORK(fsync, fsync, BB_DIR_BIN, BB_SUID_DROP, fsync)) 108IF_FSYNC(APPLET_NOFORK(fsync, fsync, BB_DIR_BIN, BB_SUID_DROP, fsync))
121IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP)) 109IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
122IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
123IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP)) 110IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
124IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
125IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head)) 111IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head))
126IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hexdump))
127IF_HWCLOCK(APPLET(hwclock, BB_DIR_SBIN, BB_SUID_DROP))
128IF_INSTALL(APPLET(install, BB_DIR_USR_BIN, BB_SUID_DROP)) 112IF_INSTALL(APPLET(install, BB_DIR_USR_BIN, BB_SUID_DROP))
129IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP))
130IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP))
131//IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length)) 113//IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length))
132IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln)) 114IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln))
133IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP)) 115IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
134IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname)) 116IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
135IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
136IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls)) 117IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
137IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP))
138IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP))
139IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP)) 118IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP))
140IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir)) 119IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir))
141IF_MKFIFO(APPLET_NOEXEC(mkfifo, mkfifo, BB_DIR_USR_BIN, BB_SUID_DROP, mkfifo)) 120IF_MKFIFO(APPLET_NOEXEC(mkfifo, mkfifo, BB_DIR_USR_BIN, BB_SUID_DROP, mkfifo))
142IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP, mkfs_minix))
143IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser))
144IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod)) 121IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod))
145IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP))
146IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP))
147/* On full-blown systems, requires suid for user mounts.
148 * But it's not unthinkable to have it available in non-suid flavor on some systems,
149 * for viewing mount table.
150 * Therefore we use BB_SUID_MAYBE instead of BB_SUID_REQUIRE: */
151IF_MOUNT(APPLET(mount, BB_DIR_BIN, IF_DESKTOP(BB_SUID_MAYBE) IF_NOT_DESKTOP(BB_SUID_DROP)))
152IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP)) 122IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
153IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP)) 123IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
154IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP)) 124IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
155IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP)) 125IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP))
156//IF_PARSE(APPLET(parse, BB_DIR_USR_BIN, BB_SUID_DROP)) 126//IF_PARSE(APPLET(parse, BB_DIR_USR_BIN, BB_SUID_DROP))
157IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP))
158IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv)) 127IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv))
159IF_PRINTF(APPLET_NOFORK(printf, printf, BB_DIR_USR_BIN, BB_SUID_DROP, printf)) 128IF_PRINTF(APPLET_NOFORK(printf, printf, BB_DIR_USR_BIN, BB_SUID_DROP, printf))
160IF_PWD(APPLET_NOFORK(pwd, pwd, BB_DIR_BIN, BB_SUID_DROP, pwd)) 129IF_PWD(APPLET_NOFORK(pwd, pwd, BB_DIR_BIN, BB_SUID_DROP, pwd))
161IF_RDATE(APPLET(rdate, BB_DIR_USR_SBIN, BB_SUID_DROP))
162IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP))
163IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP)) 130IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP))
164IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP))
165IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP)) 131IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP))
166IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, BB_DIR_SBIN, BB_SUID_DROP, restorecon)) 132IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, BB_DIR_SBIN, BB_SUID_DROP, restorecon))
167IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm)) 133IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm))
168IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir)) 134IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir))
169IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
170IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP)) 135IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP))
171IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
172IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
173IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP)) 136IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP))
174IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq)) 137IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq))
175IF_SESTATUS(APPLET(sestatus, BB_DIR_USR_SBIN, BB_SUID_DROP)) 138IF_SESTATUS(APPLET(sestatus, BB_DIR_USR_SBIN, BB_SUID_DROP))
@@ -183,7 +146,6 @@ IF_SPLIT(APPLET(split, BB_DIR_USR_BIN, BB_SUID_DROP))
183IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP)) 146IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP))
184IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP)) 147IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
185IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP)) 148IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP))
186IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP))
187IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac)) 149IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac))
188IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP)) 150IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP))
189IF_TEE(APPLET(tee, BB_DIR_USR_BIN, BB_SUID_DROP)) 151IF_TEE(APPLET(tee, BB_DIR_USR_BIN, BB_SUID_DROP))
@@ -193,7 +155,6 @@ IF_TRUE(APPLET_NOFORK(true, true, BB_DIR_BIN, BB_SUID_DROP, true))
193IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP)) 155IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP))
194IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP)) 156IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP))
195IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP)) 157IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
196IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP))
197IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP)) 158IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP))
198IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, BB_DIR_USR_BIN, BB_SUID_DROP, unexpand)) 159IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, BB_DIR_USR_BIN, BB_SUID_DROP, unexpand))
199IF_UNIQ(APPLET(uniq, BB_DIR_USR_BIN, BB_SUID_DROP)) 160IF_UNIQ(APPLET(uniq, BB_DIR_USR_BIN, BB_SUID_DROP))
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 9bef0d532..3c522f948 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
@@ -7,511 +7,6 @@ menu "Linux System Utilities"
7 7
8INSERT 8INSERT
9 9
10config ACPID
11 bool "acpid"
12 default y
13 select PLATFORM_LINUX
14 help
15 acpid listens to ACPI events coming either in textual form from
16 /proc/acpi/event (though it is marked deprecated it is still widely
17 used and _is_ a standard) or in binary form from specified evdevs
18 (just use /dev/input/event*).
19
20 It parses the event to retrieve ACTION and a possible PARAMETER.
21 It then spawns /etc/acpi/<ACTION>[/<PARAMETER>] either via run-parts
22 (if the resulting path is a directory) or directly as an executable.
23
24 N.B. acpid relies on run-parts so have the latter installed.
25
26config FEATURE_ACPID_COMPAT
27 bool "Accept and ignore redundant options"
28 default y
29 depends on ACPID
30 help
31 Accept and ignore compatibility options -g -m -s -S -v.
32
33config BLKID
34 bool "blkid"
35 default y
36 select PLATFORM_LINUX
37 select VOLUMEID
38 help
39 Lists labels and UUIDs of all filesystems.
40 WARNING:
41 With all submodules selected, it will add ~8k to busybox.
42
43config FEATURE_BLKID_TYPE
44 bool "Print filesystem type"
45 default n
46 depends on BLKID
47 help
48 Show TYPE="filesystem type"
49
50config DMESG
51 bool "dmesg"
52 default y
53 select PLATFORM_LINUX
54 help
55 dmesg is used to examine or control the kernel ring buffer. When the
56 Linux kernel prints messages to the system log, they are stored in
57 the kernel ring buffer. You can use dmesg to print the kernel's ring
58 buffer, clear the kernel ring buffer, change the size of the kernel
59 ring buffer, and change the priority level at which kernel messages
60 are also logged to the system console. Enable this option if you
61 wish to enable the 'dmesg' utility.
62
63config FEATURE_DMESG_PRETTY
64 bool "Pretty dmesg output"
65 default y
66 depends on DMESG
67 help
68 If you wish to scrub the syslog level from the output, say 'Y' here.
69 The syslog level is a string prefixed to every line with the form
70 "<#>".
71
72 With this option you will see:
73 # dmesg
74 Linux version 2.6.17.4 .....
75 BIOS-provided physical RAM map:
76 BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
77
78 Without this option you will see:
79 # dmesg
80 <5>Linux version 2.6.17.4 .....
81 <6>BIOS-provided physical RAM map:
82 <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
83
84config FBSET
85 bool "fbset"
86 default y
87 select PLATFORM_LINUX
88 help
89 fbset is used to show or change the settings of a Linux frame buffer
90 device. The frame buffer device provides a simple and unique
91 interface to access a graphics display. Enable this option
92 if you wish to enable the 'fbset' utility.
93
94config FEATURE_FBSET_FANCY
95 bool "Turn on extra fbset options"
96 default y
97 depends on FBSET
98 help
99 This option enables extended fbset options, allowing one to set the
100 framebuffer size, color depth, etc. interface to access a graphics
101 display. Enable this option if you wish to enable extended fbset
102 options.
103
104config FEATURE_FBSET_READMODE
105 bool "Turn on fbset readmode support"
106 default y
107 depends on FBSET
108 help
109 This option allows fbset to read the video mode database stored by
110 default as /etc/fb.modes, which can be used to set frame buffer
111 device to pre-defined video modes.
112
113config FDFLUSH
114 bool "fdflush"
115 default y
116 select PLATFORM_LINUX
117 help
118 fdflush is only needed when changing media on slightly-broken
119 removable media drives. It is used to make Linux believe that a
120 hardware disk-change switch has been actuated, which causes Linux to
121 forget anything it has cached from the previous media. If you have
122 such a slightly-broken drive, you will need to run fdflush every time
123 you change a disk. Most people have working hardware and can safely
124 leave this disabled.
125
126config FDFORMAT
127 bool "fdformat"
128 default y
129 select PLATFORM_LINUX
130 help
131 fdformat is used to low-level format a floppy disk.
132
133config FDISK
134 bool "fdisk"
135 default y
136 select PLATFORM_LINUX
137 help
138 The fdisk utility is used to divide hard disks into one or more
139 logical disks, which are generally called partitions. This utility
140 can be used to list and edit the set of partitions or BSD style
141 'disk slices' that are defined on a hard drive.
142
143config FDISK_SUPPORT_LARGE_DISKS
144 bool "Support over 4GB disks"
145 default y
146 depends on FDISK
147 depends on !LFS # with LFS no special code is needed
148 help
149 Enable this option to support large disks > 4GB.
150
151config FEATURE_FDISK_WRITABLE
152 bool "Write support"
153 default y
154 depends on FDISK
155 help
156 Enabling this option allows you to create or change a partition table
157 and write those changes out to disk. If you leave this option
158 disabled, you will only be able to view the partition table.
159
160config FEATURE_AIX_LABEL
161 bool "Support AIX disklabels"
162 default n
163 depends on FDISK && FEATURE_FDISK_WRITABLE
164 help
165 Enabling this option allows you to create or change AIX disklabels.
166 Most people can safely leave this option disabled.
167
168config FEATURE_SGI_LABEL
169 bool "Support SGI disklabels"
170 default n
171 depends on FDISK && FEATURE_FDISK_WRITABLE
172 help
173 Enabling this option allows you to create or change SGI disklabels.
174 Most people can safely leave this option disabled.
175
176config FEATURE_SUN_LABEL
177 bool "Support SUN disklabels"
178 default n
179 depends on FDISK && FEATURE_FDISK_WRITABLE
180 help
181 Enabling this option allows you to create or change SUN disklabels.
182 Most people can safely leave this option disabled.
183
184config FEATURE_OSF_LABEL
185 bool "Support BSD disklabels"
186 default n
187 depends on FDISK && FEATURE_FDISK_WRITABLE
188 help
189 Enabling this option allows you to create or change BSD disklabels
190 and define and edit BSD disk slices.
191
192config FEATURE_GPT_LABEL
193 bool "Support GPT disklabels"
194 default n
195 depends on FDISK && FEATURE_FDISK_WRITABLE
196 help
197 Enabling this option allows you to view GUID Partition Table
198 disklabels.
199
200config FEATURE_FDISK_ADVANCED
201 bool "Support expert mode"
202 default y
203 depends on FDISK && FEATURE_FDISK_WRITABLE
204 help
205 Enabling this option allows you to do terribly unsafe things like
206 define arbitrary drive geometry, move the beginning of data in a
207 partition, and similarly evil things. Unless you have a very good
208 reason you would be wise to leave this disabled.
209
210config FINDFS
211 bool "findfs"
212 default y
213 select PLATFORM_LINUX
214 select VOLUMEID
215 help
216 Prints the name of a filesystem with given label or UUID.
217 WARNING:
218 With all submodules selected, it will add ~8k to busybox.
219
220config FLOCK
221 bool "flock"
222 default y
223 help
224 Manage locks from shell scripts
225
226config FREERAMDISK
227 bool "freeramdisk"
228 default y
229 select PLATFORM_LINUX
230 help
231 Linux allows you to create ramdisks. This utility allows you to
232 delete them and completely free all memory that was used for the
233 ramdisk. For example, if you boot Linux into a ramdisk and later
234 pivot_root, you may want to free the memory that is allocated to the
235 ramdisk. If you have no use for freeing memory from a ramdisk, leave
236 this disabled.
237
238config FSCK_MINIX
239 bool "fsck_minix"
240 default y
241 help
242 The minix filesystem is a nice, small, compact, read-write filesystem
243 with little overhead. It is not a journaling filesystem however and
244 can experience corruption if it is not properly unmounted or if the
245 power goes off in the middle of a write. This utility allows you to
246 check for and attempt to repair any corruption that occurs to a minix
247 filesystem.
248
249config MKFS_MINIX
250 bool "mkfs_minix"
251 default y
252 select PLATFORM_LINUX
253 help
254 The minix filesystem is a nice, small, compact, read-write filesystem
255 with little overhead. If you wish to be able to create minix
256 filesystems this utility will do the job for you.
257
258config FEATURE_MINIX2
259 bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
260 default y
261 depends on FSCK_MINIX || MKFS_MINIX
262 help
263 If you wish to be able to create version 2 minix filesystems, enable
264 this. If you enabled 'mkfs_minix' then you almost certainly want to
265 be using the version 2 filesystem support.
266
267config MKFS_REISER
268 bool "mkfs_reiser"
269 default n
270 select PLATFORM_LINUX
271 help
272 Utility to create ReiserFS filesystems.
273 Note: this applet needs a lot of testing and polishing.
274
275config GETOPT
276 bool "getopt"
277 default y
278 help
279 The getopt utility is used to break up (parse) options in command
280 lines to make it easy to write complex shell scripts that also check
281 for legal (and illegal) options. If you want to write horribly
282 complex shell scripts, or use some horribly complex shell script
283 written by others, this utility may be for you. Most people will
284 wisely leave this disabled.
285
286config FEATURE_GETOPT_LONG
287 bool "Support option -l"
288 default y if LONG_OPTS
289 depends on GETOPT
290 help
291 Enable support for long options (option -l).
292
293config HEXDUMP
294 bool "hexdump"
295 default y
296 help
297 The hexdump utility is used to display binary data in a readable
298 way that is comparable to the output from most hex editors.
299
300config FEATURE_HEXDUMP_REVERSE
301 bool "Support -R, reverse of 'hexdump -Cv'"
302 default y
303 depends on HEXDUMP
304 help
305 The hexdump utility is used to display binary data in an ascii
306 readable way. This option creates binary data from an ascii input.
307 NB: this option is non-standard. It's unwise to use it in scripts
308 aimed to be portable.
309
310config HD
311 bool "hd"
312 default y
313 depends on HEXDUMP
314 help
315 hd is an alias to hexdump -C.
316
317config HWCLOCK
318 bool "hwclock"
319 default y
320 select PLATFORM_LINUX
321 help
322 The hwclock utility is used to read and set the hardware clock
323 on a system. This is primarily used to set the current time on
324 shutdown in the hardware clock, so the hardware will keep the
325 correct time when Linux is _not_ running.
326
327config FEATURE_HWCLOCK_LONG_OPTIONS
328 bool "Support long options (--hctosys,...)"
329 default y
330 depends on HWCLOCK && LONG_OPTS
331 help
332 By default, the hwclock utility only uses short options. If you
333 are overly fond of its long options, such as --hctosys, --utc, etc)
334 then enable this option.
335
336config FEATURE_HWCLOCK_ADJTIME_FHS
337 bool "Use FHS /var/lib/hwclock/adjtime"
338 default n # util-linux-ng in Fedora 13 still uses /etc/adjtime
339 depends on HWCLOCK
340 help
341 Starting with FHS 2.3, the adjtime state file is supposed to exist
342 at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish
343 to use the FHS behavior, answer Y here, otherwise answer N for the
344 classic /etc/adjtime path.
345
346 pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
347
348config IPCRM
349 bool "ipcrm"
350 default y
351 help
352 The ipcrm utility allows the removal of System V interprocess
353 communication (IPC) objects and the associated data structures
354 from the system.
355
356config IPCS
357 bool "ipcs"
358 default y
359 select PLATFORM_LINUX
360 help
361 The ipcs utility is used to provide information on the currently
362 allocated System V interprocess (IPC) objects in the system.
363
364config LOSETUP
365 bool "losetup"
366 default y
367 select PLATFORM_LINUX
368 help
369 losetup is used to associate or detach a loop device with a regular
370 file or block device, and to query the status of a loop device. This
371 version does not currently support enabling data encryption.
372
373config LSPCI
374 bool "lspci"
375 default y
376 #select PLATFORM_LINUX
377 help
378 lspci is a utility for displaying information about PCI buses in the
379 system and devices connected to them.
380
381 This version uses sysfs (/sys/bus/pci/devices) only.
382
383config LSUSB
384 bool "lsusb"
385 default y
386 #select PLATFORM_LINUX
387 help
388 lsusb is a utility for displaying information about USB buses in the
389 system and devices connected to them.
390
391 This version uses sysfs (/sys/bus/usb/devices) only.
392
393config MKSWAP
394 bool "mkswap"
395 default y
396 help
397 The mkswap utility is used to configure a file or disk partition as
398 Linux swap space. This allows Linux to use the entire file or
399 partition as if it were additional RAM, which can greatly increase
400 the capability of low-memory machines. This additional memory is
401 much slower than real RAM, but can be very helpful at preventing your
402 applications being killed by the Linux out of memory (OOM) killer.
403 Once you have created swap space using 'mkswap' you need to enable
404 the swap space using the 'swapon' utility.
405
406config FEATURE_MKSWAP_UUID
407 bool "UUID support"
408 default y
409 depends on MKSWAP
410 help
411 Generate swap spaces with universally unique identifiers.
412
413config MORE
414 bool "more"
415 default y
416 help
417 more is a simple utility which allows you to read text one screen
418 sized page at a time. If you want to read text that is larger than
419 the screen, and you are using anything faster than a 300 baud modem,
420 you will probably find this utility very helpful. If you don't have
421 any need to reading text files, you can leave this disabled.
422
423config PIVOT_ROOT
424 bool "pivot_root"
425 default y
426 select PLATFORM_LINUX
427 help
428 The pivot_root utility swaps the mount points for the root filesystem
429 with some other mounted filesystem. This allows you to do all sorts
430 of wild and crazy things with your Linux system and is far more
431 powerful than 'chroot'.
432
433 Note: This is for initrd in linux 2.4. Under initramfs (introduced
434 in linux 2.6) use switch_root instead.
435
436config RDATE
437 bool "rdate"
438 default y
439 help
440 The rdate utility allows you to synchronize the date and time of your
441 system clock with the date and time of a remote networked system using
442 the RFC868 protocol, which is built into the inetd daemon on most
443 systems.
444
445config RDEV
446 bool "rdev"
447 default y
448 help
449 Print the device node associated with the filesystem mounted at '/'.
450
451config READPROFILE
452 bool "readprofile"
453 default y
454 #select PLATFORM_LINUX
455 help
456 This allows you to parse /proc/profile for basic profiling.
457
458config RTCWAKE
459 bool "rtcwake"
460 default y
461 select PLATFORM_LINUX
462 help
463 Enter a system sleep state until specified wakeup time.
464
465config SCRIPT
466 bool "script"
467 default y
468 help
469 The script makes typescript of terminal session.
470
471config SCRIPTREPLAY
472 bool "scriptreplay"
473 default y
474 help
475 This program replays a typescript, using timing information
476 given by script -t.
477
478config SWITCH_ROOT
479 bool "switch_root"
480 default y
481 select PLATFORM_LINUX
482 help
483 The switch_root utility is used from initramfs to select a new
484 root device. Under initramfs, you have to use this instead of
485 pivot_root. (Stop reading here if you don't care why.)
486
487 Booting with initramfs extracts a gzipped cpio archive into rootfs
488 (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
489 or unmounted*, pivot_root will not work from initramfs. Instead,
490 switch_root deletes everything out of rootfs (including itself),
491 does a mount --move that overmounts rootfs with the new root, and
492 then execs the specified init program.
493
494 * Because the Linux kernel uses rootfs internally as the starting
495 and ending point for searching through the kernel's doubly linked
496 list of active mount points. That's why.
497
498config UMOUNT
499 bool "umount"
500 default y
501 select PLATFORM_LINUX
502 help
503 When you want to remove a mounted filesystem from its current mount
504 point, for example when you are shutting down the system, the
505 'umount' utility is the tool to use. If you enabled the 'mount'
506 utility, you almost certainly also want to enable 'umount'.
507
508config FEATURE_UMOUNT_ALL
509 bool "Support option -a"
510 default y
511 depends on UMOUNT
512 help
513 Support -a option to unmount all currently mounted filesystems.
514
515comment "Common options for mount/umount" 10comment "Common options for mount/umount"
516 depends on MOUNT || UMOUNT 11 depends on MOUNT || UMOUNT
517 12
diff --git a/util-linux/Kbuild.src b/util-linux/Kbuild.src
index dfd50afa2..6b4fb7470 100644
--- a/util-linux/Kbuild.src
+++ b/util-linux/Kbuild.src
@@ -7,36 +7,3 @@
7lib-y:= 7lib-y:=
8 8
9INSERT 9INSERT
10lib-$(CONFIG_ACPID) += acpid.o
11lib-$(CONFIG_BLKID) += blkid.o
12lib-$(CONFIG_DMESG) += dmesg.o
13lib-$(CONFIG_FBSET) += fbset.o
14lib-$(CONFIG_FDFLUSH) += freeramdisk.o
15lib-$(CONFIG_FDFORMAT) += fdformat.o
16lib-$(CONFIG_FDISK) += fdisk.o
17lib-$(CONFIG_FINDFS) += findfs.o
18lib-$(CONFIG_FLOCK) += flock.o
19lib-$(CONFIG_FREERAMDISK) += freeramdisk.o
20lib-$(CONFIG_FSCK_MINIX) += fsck_minix.o
21lib-$(CONFIG_GETOPT) += getopt.o
22lib-$(CONFIG_HEXDUMP) += hexdump.o
23lib-$(CONFIG_HWCLOCK) += hwclock.o
24lib-$(CONFIG_IPCRM) += ipcrm.o
25lib-$(CONFIG_IPCS) += ipcs.o
26lib-$(CONFIG_LOSETUP) += losetup.o
27lib-$(CONFIG_LSPCI) += lspci.o
28lib-$(CONFIG_LSUSB) += lsusb.o
29lib-$(CONFIG_MKFS_MINIX) += mkfs_minix.o
30lib-$(CONFIG_MKFS_REISER) += mkfs_reiser.o
31lib-$(CONFIG_MKSWAP) += mkswap.o
32lib-$(CONFIG_MORE) += more.o
33lib-$(CONFIG_MOUNT) += mount.o
34lib-$(CONFIG_PIVOT_ROOT) += pivot_root.o
35lib-$(CONFIG_RDATE) += rdate.o
36lib-$(CONFIG_RDEV) += rdev.o
37lib-$(CONFIG_READPROFILE) += readprofile.o
38lib-$(CONFIG_RTCWAKE) += rtcwake.o
39lib-$(CONFIG_SCRIPT) += script.o
40lib-$(CONFIG_SCRIPTREPLAY) += scriptreplay.o
41lib-$(CONFIG_SWITCH_ROOT) += switch_root.o
42lib-$(CONFIG_UMOUNT) += umount.o
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 0f2cb6bdc..3e68b61ab 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -6,6 +6,32 @@
6 * 6 *
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config ACPID
10//config: bool "acpid"
11//config: default y
12//config: select PLATFORM_LINUX
13//config: help
14//config: acpid listens to ACPI events coming either in textual form from
15//config: /proc/acpi/event (though it is marked deprecated it is still widely
16//config: used and _is_ a standard) or in binary form from specified evdevs
17//config: (just use /dev/input/event*).
18//config:
19//config: It parses the event to retrieve ACTION and a possible PARAMETER.
20//config: It then spawns /etc/acpi/<ACTION>[/<PARAMETER>] either via run-parts
21//config: (if the resulting path is a directory) or directly as an executable.
22//config:
23//config: N.B. acpid relies on run-parts so have the latter installed.
24//config:
25//config:config FEATURE_ACPID_COMPAT
26//config: bool "Accept and ignore redundant options"
27//config: default y
28//config: depends on ACPID
29//config: help
30//config: Accept and ignore compatibility options -g -m -s -S -v.
31
32//applet:IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
33
34//kbuild:lib-$(CONFIG_ACPID) += acpid.o
9 35
10//usage:#define acpid_trivial_usage 36//usage:#define acpid_trivial_usage
11//usage: "[-df] [-c CONFDIR] [-l LOGFILE] [-a ACTIONFILE] [-M MAPFILE] [-e PROC_EVENT_FILE] [-p PIDFILE]" 37//usage: "[-df] [-c CONFDIR] [-l LOGFILE] [-a ACTIONFILE] [-M MAPFILE] [-e PROC_EVENT_FILE] [-p PIDFILE]"
diff --git a/util-linux/blkdiscard.c b/util-linux/blkdiscard.c
index ace88a1f0..af0bc946d 100644
--- a/util-linux/blkdiscard.c
+++ b/util-linux/blkdiscard.c
@@ -5,7 +5,6 @@
5 * 5 *
6 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 6 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
7 */ 7 */
8
9//config:config BLKDISCARD 8//config:config BLKDISCARD
10//config: bool "blkdiscard" 9//config: bool "blkdiscard"
11//config: default y 10//config: default y
diff --git a/util-linux/blkid.c b/util-linux/blkid.c
index 1bbc80311..b6f33b513 100644
--- a/util-linux/blkid.c
+++ b/util-linux/blkid.c
@@ -6,6 +6,26 @@
6 * 6 *
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config BLKID
10//config: bool "blkid"
11//config: default y
12//config: select PLATFORM_LINUX
13//config: select VOLUMEID
14//config: help
15//config: Lists labels and UUIDs of all filesystems.
16//config: WARNING:
17//config: With all submodules selected, it will add ~8k to busybox.
18//config:
19//config:config FEATURE_BLKID_TYPE
20//config: bool "Print filesystem type"
21//config: default n
22//config: depends on BLKID
23//config: help
24//config: Show TYPE="filesystem type"
25
26//applet:IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP))
27
28//kbuild:lib-$(CONFIG_BLKID) += blkid.o
9 29
10//usage:#define blkid_trivial_usage 30//usage:#define blkid_trivial_usage
11//usage: "[BLOCKDEV]..." 31//usage: "[BLOCKDEV]..."
diff --git a/util-linux/blockdev.c b/util-linux/blockdev.c
index e25e529db..bf4d49792 100644
--- a/util-linux/blockdev.c
+++ b/util-linux/blockdev.c
@@ -5,17 +5,16 @@
5 * 5 *
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8
9//applet:IF_BLOCKDEV(APPLET(blockdev, BB_DIR_SBIN, BB_SUID_DROP))
10
11//kbuild:lib-$(CONFIG_BLOCKDEV) += blockdev.o
12
13//config:config BLOCKDEV 8//config:config BLOCKDEV
14//config: bool "blockdev" 9//config: bool "blockdev"
15//config: default y 10//config: default y
16//config: help 11//config: help
17//config: Performs some ioctls with block devices. 12//config: Performs some ioctls with block devices.
18 13
14//applet:IF_BLOCKDEV(APPLET(blockdev, BB_DIR_SBIN, BB_SUID_DROP))
15
16//kbuild:lib-$(CONFIG_BLOCKDEV) += blockdev.o
17
19//usage:#define blockdev_trivial_usage 18//usage:#define blockdev_trivial_usage
20//usage: "OPTION BLOCKDEV" 19//usage: "OPTION BLOCKDEV"
21//usage:#define blockdev_full_usage "\n\n" 20//usage:#define blockdev_full_usage "\n\n"
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 50e8a0fce..b7b2c6924 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -8,6 +8,43 @@
8 * 8 *
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config DMESG
12//config: bool "dmesg"
13//config: default y
14//config: select PLATFORM_LINUX
15//config: help
16//config: dmesg is used to examine or control the kernel ring buffer. When the
17//config: Linux kernel prints messages to the system log, they are stored in
18//config: the kernel ring buffer. You can use dmesg to print the kernel's ring
19//config: buffer, clear the kernel ring buffer, change the size of the kernel
20//config: ring buffer, and change the priority level at which kernel messages
21//config: are also logged to the system console. Enable this option if you
22//config: wish to enable the 'dmesg' utility.
23//config:
24//config:config FEATURE_DMESG_PRETTY
25//config: bool "Pretty dmesg output"
26//config: default y
27//config: depends on DMESG
28//config: help
29//config: If you wish to scrub the syslog level from the output, say 'Y' here.
30//config: The syslog level is a string prefixed to every line with the form
31//config: "<#>".
32//config:
33//config: With this option you will see:
34//config: # dmesg
35//config: Linux version 2.6.17.4 .....
36//config: BIOS-provided physical RAM map:
37//config: BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
38//config:
39//config: Without this option you will see:
40//config: # dmesg
41//config: <5>Linux version 2.6.17.4 .....
42//config: <6>BIOS-provided physical RAM map:
43//config: <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
44
45//applet:IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
46
47//kbuild:lib-$(CONFIG_DMESG) += dmesg.o
11 48
12//usage:#define dmesg_trivial_usage 49//usage:#define dmesg_trivial_usage
13//usage: "[-c] [-n LEVEL] [-s SIZE]" 50//usage: "[-c] [-n LEVEL] [-s SIZE]"
diff --git a/util-linux/fatattr.c b/util-linux/fatattr.c
index 6dca24a73..030978f64 100644
--- a/util-linux/fatattr.c
+++ b/util-linux/fatattr.c
@@ -16,6 +16,7 @@
16//config: fatattr lists or changes the file attributes on a fat file system. 16//config: fatattr lists or changes the file attributes on a fat file system.
17 17
18//applet:IF_FATATTR(APPLET(fatattr, BB_DIR_BIN, BB_SUID_DROP)) 18//applet:IF_FATATTR(APPLET(fatattr, BB_DIR_BIN, BB_SUID_DROP))
19
19//kbuild:lib-$(CONFIG_FATATTR) += fatattr.o 20//kbuild:lib-$(CONFIG_FATATTR) += fatattr.o
20 21
21//usage:#define fatattr_trivial_usage 22//usage:#define fatattr_trivial_usage
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index b75ec1921..8a78c1ef9 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -11,6 +11,38 @@
11 * the GPL, and is (c) 1995-1999 by: 11 * the GPL, and is (c) 1995-1999 by:
12 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be) 12 * Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
13 */ 13 */
14//config:config FBSET
15//config: bool "fbset"
16//config: default y
17//config: select PLATFORM_LINUX
18//config: help
19//config: fbset is used to show or change the settings of a Linux frame buffer
20//config: device. The frame buffer device provides a simple and unique
21//config: interface to access a graphics display. Enable this option
22//config: if you wish to enable the 'fbset' utility.
23//config:
24//config:config FEATURE_FBSET_FANCY
25//config: bool "Turn on extra fbset options"
26//config: default y
27//config: depends on FBSET
28//config: help
29//config: This option enables extended fbset options, allowing one to set the
30//config: framebuffer size, color depth, etc. interface to access a graphics
31//config: display. Enable this option if you wish to enable extended fbset
32//config: options.
33//config:
34//config:config FEATURE_FBSET_READMODE
35//config: bool "Turn on fbset readmode support"
36//config: default y
37//config: depends on FBSET
38//config: help
39//config: This option allows fbset to read the video mode database stored by
40//config: default as /etc/fb.modes, which can be used to set frame buffer
41//config: device to pre-defined video modes.
42
43//applet:IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP))
44
45//kbuild:lib-$(CONFIG_FBSET) += fbset.o
14 46
15//usage:#define fbset_trivial_usage 47//usage:#define fbset_trivial_usage
16//usage: "[OPTIONS] [MODE]" 48//usage: "[OPTIONS] [MODE]"
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index 6ef6445e6..67c6e1504 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -4,6 +4,16 @@
4 * 4 *
5 * Licensed under GPLv2, see file LICENSE in this source tree. 5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */ 6 */
7//config:config FDFORMAT
8//config: bool "fdformat"
9//config: default y
10//config: select PLATFORM_LINUX
11//config: help
12//config: fdformat is used to low-level format a floppy disk.
13
14//applet:IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP))
15
16//kbuild:lib-$(CONFIG_FDFORMAT) += fdformat.o
7 17
8//usage:#define fdformat_trivial_usage 18//usage:#define fdformat_trivial_usage
9//usage: "[-n] DEVICE" 19//usage: "[-n] DEVICE"
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 32a66d03d..af8073532 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -6,6 +6,86 @@
6 * 6 *
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//config:config FDISK
10//config: bool "fdisk"
11//config: default y
12//config: select PLATFORM_LINUX
13//config: help
14//config: The fdisk utility is used to divide hard disks into one or more
15//config: logical disks, which are generally called partitions. This utility
16//config: can be used to list and edit the set of partitions or BSD style
17//config: 'disk slices' that are defined on a hard drive.
18//config:
19//config:config FDISK_SUPPORT_LARGE_DISKS
20//config: bool "Support over 4GB disks"
21//config: default y
22//config: depends on FDISK
23//config: depends on !LFS # with LFS no special code is needed
24//config: help
25//config: Enable this option to support large disks > 4GB.
26//config:
27//config:config FEATURE_FDISK_WRITABLE
28//config: bool "Write support"
29//config: default y
30//config: depends on FDISK
31//config: help
32//config: Enabling this option allows you to create or change a partition table
33//config: and write those changes out to disk. If you leave this option
34//config: disabled, you will only be able to view the partition table.
35//config:
36//config:config FEATURE_AIX_LABEL
37//config: bool "Support AIX disklabels"
38//config: default n
39//config: depends on FDISK && FEATURE_FDISK_WRITABLE
40//config: help
41//config: Enabling this option allows you to create or change AIX disklabels.
42//config: Most people can safely leave this option disabled.
43//config:
44//config:config FEATURE_SGI_LABEL
45//config: bool "Support SGI disklabels"
46//config: default n
47//config: depends on FDISK && FEATURE_FDISK_WRITABLE
48//config: help
49//config: Enabling this option allows you to create or change SGI disklabels.
50//config: Most people can safely leave this option disabled.
51//config:
52//config:config FEATURE_SUN_LABEL
53//config: bool "Support SUN disklabels"
54//config: default n
55//config: depends on FDISK && FEATURE_FDISK_WRITABLE
56//config: help
57//config: Enabling this option allows you to create or change SUN disklabels.
58//config: Most people can safely leave this option disabled.
59//config:
60//config:config FEATURE_OSF_LABEL
61//config: bool "Support BSD disklabels"
62//config: default n
63//config: depends on FDISK && FEATURE_FDISK_WRITABLE
64//config: help
65//config: Enabling this option allows you to create or change BSD disklabels
66//config: and define and edit BSD disk slices.
67//config:
68//config:config FEATURE_GPT_LABEL
69//config: bool "Support GPT disklabels"
70//config: default n
71//config: depends on FDISK && FEATURE_FDISK_WRITABLE
72//config: help
73//config: Enabling this option allows you to view GUID Partition Table
74//config: disklabels.
75//config:
76//config:config FEATURE_FDISK_ADVANCED
77//config: bool "Support expert mode"
78//config: default y
79//config: depends on FDISK && FEATURE_FDISK_WRITABLE
80//config: help
81//config: Enabling this option allows you to do terribly unsafe things like
82//config: define arbitrary drive geometry, move the beginning of data in a
83//config: partition, and similarly evil things. Unless you have a very good
84//config: reason you would be wise to leave this disabled.
85
86//applet:IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP))
87
88//kbuild:lib-$(CONFIG_FDISK) += fdisk.o
9 89
10/* Looks like someone forgot to add this to config system */ 90/* Looks like someone forgot to add this to config system */
11//usage:#ifndef ENABLE_FEATURE_FDISK_BLKSIZE 91//usage:#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
diff --git a/util-linux/findfs.c b/util-linux/findfs.c
index 07734f359..daa46b039 100644
--- a/util-linux/findfs.c
+++ b/util-linux/findfs.c
@@ -7,6 +7,20 @@
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//config:config FINDFS
11//config: bool "findfs"
12//config: default y
13//config: select PLATFORM_LINUX
14//config: select VOLUMEID
15//config: help
16//config: Prints the name of a filesystem with given label or UUID.
17//config: WARNING:
18//config: With all submodules selected, it will add ~8k to busybox.
19
20/* Benefits from suid root: better access to /dev/BLOCKDEVs: */
21//applet:IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE))
22
23//kbuild:lib-$(CONFIG_FINDFS) += findfs.o
10 24
11//usage:#define findfs_trivial_usage 25//usage:#define findfs_trivial_usage
12//usage: "LABEL=label or UUID=uuid" 26//usage: "LABEL=label or UUID=uuid"
diff --git a/util-linux/flock.c b/util-linux/flock.c
index 1f7ade7c4..f34c0ad8f 100644
--- a/util-linux/flock.c
+++ b/util-linux/flock.c
@@ -3,6 +3,15 @@
3 * 3 *
4 * This is free software, licensed under the GNU General Public License v2. 4 * This is free software, licensed under the GNU General Public License v2.
5 */ 5 */
6//config:config FLOCK
7//config: bool "flock"
8//config: default y
9//config: help
10//config: Manage locks from shell scripts
11
12//applet:IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP))
13
14//kbuild:lib-$(CONFIG_FLOCK) += flock.o
6 15
7//usage:#define flock_trivial_usage 16//usage:#define flock_trivial_usage
8//usage: "[-sxun] FD|{FILE [-c] PROG ARGS}" 17//usage: "[-sxun] FD|{FILE [-c] PROG ARGS}"
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index a89ae1a39..8bc2c443b 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -8,6 +8,36 @@
8 * 8 *
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config FDFLUSH
12//config: bool "fdflush"
13//config: default y
14//config: select PLATFORM_LINUX
15//config: help
16//config: fdflush is only needed when changing media on slightly-broken
17//config: removable media drives. It is used to make Linux believe that a
18//config: hardware disk-change switch has been actuated, which causes Linux to
19//config: forget anything it has cached from the previous media. If you have
20//config: such a slightly-broken drive, you will need to run fdflush every time
21//config: you change a disk. Most people have working hardware and can safely
22//config: leave this disabled.
23//config:
24//config:config FREERAMDISK
25//config: bool "freeramdisk"
26//config: default y
27//config: select PLATFORM_LINUX
28//config: help
29//config: Linux allows you to create ramdisks. This utility allows you to
30//config: delete them and completely free all memory that was used for the
31//config: ramdisk. For example, if you boot Linux into a ramdisk and later
32//config: pivot_root, you may want to free the memory that is allocated to the
33//config: ramdisk. If you have no use for freeing memory from a ramdisk, leave
34//config: this disabled.
35
36//applet:IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush))
37//applet:IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP))
38
39//kbuild:lib-$(CONFIG_FDFLUSH) += freeramdisk.o
40//kbuild:lib-$(CONFIG_FREERAMDISK) += freeramdisk.o
11 41
12//usage:#define freeramdisk_trivial_usage 42//usage:#define freeramdisk_trivial_usage
13//usage: "DEVICE" 43//usage: "DEVICE"
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index d2f3524b4..0eaac17c0 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -85,6 +85,20 @@
85 * The device may be a block device or a image of one, but this isn't 85 * The device may be a block device or a image of one, but this isn't
86 * enforced (but it's not much fun on a character device :-). 86 * enforced (but it's not much fun on a character device :-).
87 */ 87 */
88//config:config FSCK_MINIX
89//config: bool "fsck_minix"
90//config: default y
91//config: help
92//config: The minix filesystem is a nice, small, compact, read-write filesystem
93//config: with little overhead. It is not a journaling filesystem however and
94//config: can experience corruption if it is not properly unmounted or if the
95//config: power goes off in the middle of a write. This utility allows you to
96//config: check for and attempt to repair any corruption that occurs to a minix
97//config: filesystem.
98
99//applet:IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix))
100
101//kbuild:lib-$(CONFIG_FSCK_MINIX) += fsck_minix.o
88 102
89//usage:#define fsck_minix_trivial_usage 103//usage:#define fsck_minix_trivial_usage
90//usage: "[-larvsmf] BLOCKDEV" 104//usage: "[-larvsmf] BLOCKDEV"
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 18d490987..83cc1efea 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -28,8 +28,28 @@
28 * Removed --version/-V and --help/-h 28 * Removed --version/-V and --help/-h
29 * Removed parse_error(), using bb_error_msg() from Busybox instead 29 * Removed parse_error(), using bb_error_msg() from Busybox instead
30 * Replaced our_malloc with xmalloc and our_realloc with xrealloc 30 * Replaced our_malloc with xmalloc and our_realloc with xrealloc
31 *
32 */ 31 */
32//config:config GETOPT
33//config: bool "getopt"
34//config: default y
35//config: help
36//config: The getopt utility is used to break up (parse) options in command
37//config: lines to make it easy to write complex shell scripts that also check
38//config: for legal (and illegal) options. If you want to write horribly
39//config: complex shell scripts, or use some horribly complex shell script
40//config: written by others, this utility may be for you. Most people will
41//config: wisely leave this disabled.
42//config:
43//config:config FEATURE_GETOPT_LONG
44//config: bool "Support option -l"
45//config: default y if LONG_OPTS
46//config: depends on GETOPT
47//config: help
48//config: Enable support for long options (option -l).
49
50//applet:IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
51
52//kbuild:lib-$(CONFIG_GETOPT) += getopt.o
33 53
34//usage:#define getopt_trivial_usage 54//usage:#define getopt_trivial_usage
35//usage: "[OPTIONS] [--] OPTSTRING PARAMS" 55//usage: "[OPTIONS] [--] OPTSTRING PARAMS"
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index ac7e24ff8..5e1ef6938 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -8,6 +8,35 @@
8 * 8 *
9 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 9 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
10 */ 10 */
11//config:config HEXDUMP
12//config: bool "hexdump"
13//config: default y
14//config: help
15//config: The hexdump utility is used to display binary data in a readable
16//config: way that is comparable to the output from most hex editors.
17//config:
18//config:config FEATURE_HEXDUMP_REVERSE
19//config: bool "Support -R, reverse of 'hexdump -Cv'"
20//config: default y
21//config: depends on HEXDUMP
22//config: help
23//config: The hexdump utility is used to display binary data in an ascii
24//config: readable way. This option creates binary data from an ascii input.
25//config: NB: this option is non-standard. It's unwise to use it in scripts
26//config: aimed to be portable.
27//config:
28//config:config HD
29//config: bool "hd"
30//config: default y
31//config: depends on HEXDUMP
32//config: help
33//config: hd is an alias to hexdump -C.
34
35//applet:IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hexdump))
36//applet:IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
37
38//kbuild:lib-$(CONFIG_HEXDUMP) += hexdump.o
39//kbuild:lib-$(CONFIG_HD) += hexdump.o
11 40
12//usage:#define hexdump_trivial_usage 41//usage:#define hexdump_trivial_usage
13//usage: "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..." 42//usage: "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..."
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 6c99977cf..084a7f1e9 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -5,7 +5,41 @@
5 * Copyright (C) 2002 Robert Griebl <griebl@gmx.de> 5 * Copyright (C) 2002 Robert Griebl <griebl@gmx.de>
6 * 6 *
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//config:config HWCLOCK
10//config: bool "hwclock"
11//config: default y
12//config: select PLATFORM_LINUX
13//config: help
14//config: The hwclock utility is used to read and set the hardware clock
15//config: on a system. This is primarily used to set the current time on
16//config: shutdown in the hardware clock, so the hardware will keep the
17//config: correct time when Linux is _not_ running.
18//config:
19//config:config FEATURE_HWCLOCK_LONG_OPTIONS
20//config: bool "Support long options (--hctosys,...)"
21//config: default y
22//config: depends on HWCLOCK && LONG_OPTS
23//config: help
24//config: By default, the hwclock utility only uses short options. If you
25//config: are overly fond of its long options, such as --hctosys, --utc, etc)
26//config: then enable this option.
27//config:
28//config:config FEATURE_HWCLOCK_ADJTIME_FHS
29//config: bool "Use FHS /var/lib/hwclock/adjtime"
30//config: default n # util-linux-ng in Fedora 13 still uses /etc/adjtime
31//config: depends on HWCLOCK
32//config: help
33//config: Starting with FHS 2.3, the adjtime state file is supposed to exist
34//config: at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish
35//config: to use the FHS behavior, answer Y here, otherwise answer N for the
36//config: classic /etc/adjtime path.
37//config:
38//config: pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
39
40//applet:IF_HWCLOCK(APPLET(hwclock, BB_DIR_SBIN, BB_SUID_DROP))
41
42//kbuild:lib-$(CONFIG_HWCLOCK) += hwclock.o
9 43
10#include "libbb.h" 44#include "libbb.h"
11/* After libbb.h, since it needs sys/types.h on some systems */ 45/* After libbb.h, since it needs sys/types.h on some systems */
diff --git a/util-linux/ipcrm.c b/util-linux/ipcrm.c
index 38d81af50..76ea3ca4f 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -7,6 +7,17 @@
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//config:config IPCRM
11//config: bool "ipcrm"
12//config: default y
13//config: help
14//config: The ipcrm utility allows the removal of System V interprocess
15//config: communication (IPC) objects and the associated data structures
16//config: from the system.
17
18//applet:IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP))
19
20//kbuild:lib-$(CONFIG_IPCRM) += ipcrm.o
10 21
11//usage:#define ipcrm_trivial_usage 22//usage:#define ipcrm_trivial_usage
12//usage: "[-MQS key] [-mqs id]" 23//usage: "[-MQS key] [-mqs id]"
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index 67a25a8ef..88ae9225d 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -7,6 +7,17 @@
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//config:config IPCS
11//config: bool "ipcs"
12//config: default y
13//config: select PLATFORM_LINUX
14//config: help
15//config: The ipcs utility is used to provide information on the currently
16//config: allocated System V interprocess (IPC) objects in the system.
17
18//applet:IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP))
19
20//kbuild:lib-$(CONFIG_IPCS) += ipcs.o
10 21
11//usage:#define ipcs_trivial_usage 22//usage:#define ipcs_trivial_usage
12//usage: "[[-smq] -i shmid] | [[-asmq] [-tcplu]]" 23//usage: "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index d450b5a78..4424d9cbb 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -6,6 +6,18 @@
6 * 6 *
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//config:config LOSETUP
10//config: bool "losetup"
11//config: default y
12//config: select PLATFORM_LINUX
13//config: help
14//config: losetup is used to associate or detach a loop device with a regular
15//config: file or block device, and to query the status of a loop device. This
16//config: version does not currently support enabling data encryption.
17
18//kbuild:lib-$(CONFIG_LOSETUP) += losetup.o
19
20//applet:IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
9 21
10//usage:#define losetup_trivial_usage 22//usage:#define losetup_trivial_usage
11//usage: "[-r] [-o OFS] {-f|LOOPDEV} FILE - associate loop devices\n" 23//usage: "[-r] [-o OFS] {-f|LOOPDEV} FILE - associate loop devices\n"
diff --git a/util-linux/lspci.c b/util-linux/lspci.c
index 514678afd..8b38a2366 100644
--- a/util-linux/lspci.c
+++ b/util-linux/lspci.c
@@ -6,6 +6,19 @@
6 * 6 *
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//config:config LSPCI
10//config: bool "lspci"
11//config: default y
12//config: #select PLATFORM_LINUX
13//config: help
14//config: lspci is a utility for displaying information about PCI buses in the
15//config: system and devices connected to them.
16//config:
17//config: This version uses sysfs (/sys/bus/pci/devices) only.
18
19//applet:IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP))
20
21//kbuild:lib-$(CONFIG_LSPCI) += lspci.o
9 22
10//usage:#define lspci_trivial_usage 23//usage:#define lspci_trivial_usage
11//usage: "[-mk]" 24//usage: "[-mk]"
diff --git a/util-linux/lsusb.c b/util-linux/lsusb.c
index 540f21ec6..7d36d6f5a 100644
--- a/util-linux/lsusb.c
+++ b/util-linux/lsusb.c
@@ -6,6 +6,19 @@
6 * 6 *
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//config:config LSUSB
10//config: bool "lsusb"
11//config: default y
12//config: #select PLATFORM_LINUX
13//config: help
14//config: lsusb is a utility for displaying information about USB buses in the
15//config: system and devices connected to them.
16//config:
17//config: This version uses sysfs (/sys/bus/usb/devices) only.
18
19//applet:IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP))
20
21//kbuild:lib-$(CONFIG_LSUSB) += lsusb.o
9 22
10//usage:#define lsusb_trivial_usage NOUSAGE_STR 23//usage:#define lsusb_trivial_usage NOUSAGE_STR
11//usage:#define lsusb_full_usage "" 24//usage:#define lsusb_full_usage ""
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index aaabf8453..912246b93 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -62,6 +62,27 @@
62 * Modified for BusyBox by Erik Andersen <andersen@debian.org> -- 62 * Modified for BusyBox by Erik Andersen <andersen@debian.org> --
63 * removed getopt based parser and added a hand rolled one. 63 * removed getopt based parser and added a hand rolled one.
64 */ 64 */
65//config:config MKFS_MINIX
66//config: bool "mkfs_minix"
67//config: default y
68//config: select PLATFORM_LINUX
69//config: help
70//config: The minix filesystem is a nice, small, compact, read-write filesystem
71//config: with little overhead. If you wish to be able to create minix
72//config: filesystems this utility will do the job for you.
73//config:
74//config:config FEATURE_MINIX2
75//config: bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
76//config: default y
77//config: depends on FSCK_MINIX || MKFS_MINIX
78//config: help
79//config: If you wish to be able to create version 2 minix filesystems, enable
80//config: this. If you enabled 'mkfs_minix' then you almost certainly want to
81//config: be using the version 2 filesystem support.
82
83//applet:IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP, mkfs_minix))
84
85//kbuild:lib-$(CONFIG_MKFS_MINIX) += mkfs_minix.o
65 86
66//usage:#define mkfs_minix_trivial_usage 87//usage:#define mkfs_minix_trivial_usage
67//usage: "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]" 88//usage: "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]"
diff --git a/util-linux/mkfs_reiser.c b/util-linux/mkfs_reiser.c
index 0a31ee44f..d01119f7f 100644
--- a/util-linux/mkfs_reiser.c
+++ b/util-linux/mkfs_reiser.c
@@ -6,6 +6,17 @@
6 * 6 *
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9//config:config MKFS_REISER
10//config: bool "mkfs_reiser"
11//config: default n
12//config: select PLATFORM_LINUX
13//config: help
14//config: Utility to create ReiserFS filesystems.
15//config: Note: this applet needs a lot of testing and polishing.
16
17//applet:IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser))
18
19//kbuild:lib-$(CONFIG_MKFS_REISER) += mkfs_reiser.o
9 20
10//usage:#define mkfs_reiser_trivial_usage 21//usage:#define mkfs_reiser_trivial_usage
11//usage: "[-f] [-l LABEL] BLOCKDEV [4K-BLOCKS]" 22//usage: "[-f] [-l LABEL] BLOCKDEV [4K-BLOCKS]"
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index dcb53f008..954a1948d 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -5,6 +5,29 @@
5 * 5 *
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config MKSWAP
9//config: bool "mkswap"
10//config: default y
11//config: help
12//config: The mkswap utility is used to configure a file or disk partition as
13//config: Linux swap space. This allows Linux to use the entire file or
14//config: partition as if it were additional RAM, which can greatly increase
15//config: the capability of low-memory machines. This additional memory is
16//config: much slower than real RAM, but can be very helpful at preventing your
17//config: applications being killed by the Linux out of memory (OOM) killer.
18//config: Once you have created swap space using 'mkswap' you need to enable
19//config: the swap space using the 'swapon' utility.
20//config:
21//config:config FEATURE_MKSWAP_UUID
22//config: bool "UUID support"
23//config: default y
24//config: depends on MKSWAP
25//config: help
26//config: Generate swap spaces with universally unique identifiers.
27
28//applet:IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP))
29
30//kbuild:lib-$(CONFIG_MKSWAP) += mkswap.o
8 31
9//usage:#define mkswap_trivial_usage 32//usage:#define mkswap_trivial_usage
10//usage: "[-L LBL] BLOCKDEV [KBYTES]" 33//usage: "[-L LBL] BLOCKDEV [KBYTES]"
diff --git a/util-linux/more.c b/util-linux/more.c
index 07836e29d..934b30f8a 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -13,6 +13,19 @@
13 * 13 *
14 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 14 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
15 */ 15 */
16//config:config MORE
17//config: bool "more"
18//config: default y
19//config: help
20//config: more is a simple utility which allows you to read text one screen
21//config: sized page at a time. If you want to read text that is larger than
22//config: the screen, and you are using anything faster than a 300 baud modem,
23//config: you will probably find this utility very helpful. If you don't have
24//config: any need to reading text files, you can leave this disabled.
25
26//applet:IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP))
27
28//kbuild:lib-$(CONFIG_MORE) += more.o
16 29
17//usage:#define more_trivial_usage 30//usage:#define more_trivial_usage
18//usage: "[FILE]..." 31//usage: "[FILE]..."
diff --git a/util-linux/mount.c b/util-linux/mount.c
index eb8b7ba7b..42962b859 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -112,6 +112,14 @@
112//config: help 112//config: help
113//config: Support mount -T (specifying an alternate fstab) 113//config: Support mount -T (specifying an alternate fstab)
114 114
115/* On full-blown systems, requires suid for user mounts.
116 * But it's not unthinkable to have it available in non-suid flavor on some systems,
117 * for viewing mount table.
118 * Therefore we use BB_SUID_MAYBE instead of BB_SUID_REQUIRE: */
119//applet:IF_MOUNT(APPLET(mount, BB_DIR_BIN, IF_DESKTOP(BB_SUID_MAYBE) IF_NOT_DESKTOP(BB_SUID_DROP)))
120
121//kbuild:lib-$(CONFIG_MOUNT) += mount.o
122
115//usage:#define mount_trivial_usage 123//usage:#define mount_trivial_usage
116//usage: "[OPTIONS] [-o OPT] DEVICE NODE" 124//usage: "[OPTIONS] [-o OPT] DEVICE NODE"
117//usage:#define mount_full_usage "\n\n" 125//usage:#define mount_full_usage "\n\n"
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c
index 83f01fabd..9bdae506c 100644
--- a/util-linux/pivot_root.c
+++ b/util-linux/pivot_root.c
@@ -8,6 +8,22 @@
8 * 8 *
9 * Licensed under GPLv2, see file LICENSE in this source tree. 9 * Licensed under GPLv2, see file LICENSE in this source tree.
10 */ 10 */
11//config:config PIVOT_ROOT
12//config: bool "pivot_root"
13//config: default y
14//config: select PLATFORM_LINUX
15//config: help
16//config: The pivot_root utility swaps the mount points for the root filesystem
17//config: with some other mounted filesystem. This allows you to do all sorts
18//config: of wild and crazy things with your Linux system and is far more
19//config: powerful than 'chroot'.
20//config:
21//config: Note: This is for initrd in linux 2.4. Under initramfs (introduced
22//config: in linux 2.6) use switch_root instead.
23
24//applet:IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP))
25
26//kbuild:lib-$(CONFIG_PIVOT_ROOT) += pivot_root.o
11 27
12//usage:#define pivot_root_trivial_usage 28//usage:#define pivot_root_trivial_usage
13//usage: "NEW_ROOT PUT_OLD" 29//usage: "NEW_ROOT PUT_OLD"
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 8075ef6af..8dd784d3d 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -6,7 +6,19 @@
6 * by Sterling Huxley <sterling@europa.com> 6 * by Sterling Huxley <sterling@europa.com>
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//config:config RDATE
11//config: bool "rdate"
12//config: default y
13//config: help
14//config: The rdate utility allows you to synchronize the date and time of your
15//config: system clock with the date and time of a remote networked system using
16//config: the RFC868 protocol, which is built into the inetd daemon on most
17//config: systems.
18
19//applet:IF_RDATE(APPLET(rdate, BB_DIR_USR_SBIN, BB_SUID_DROP))
20
21//kbuild:lib-$(CONFIG_RDATE) += rdate.o
10 22
11//usage:#define rdate_trivial_usage 23//usage:#define rdate_trivial_usage
12//usage: "[-sp] HOST" 24//usage: "[-sp] HOST"
diff --git a/util-linux/rdev.c b/util-linux/rdev.c
index 465281756..0e1578e33 100644
--- a/util-linux/rdev.c
+++ b/util-linux/rdev.c
@@ -8,6 +8,15 @@
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//config:config RDEV
12//config: bool "rdev"
13//config: default y
14//config: help
15//config: Print the device node associated with the filesystem mounted at '/'.
16
17//applet:IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP))
18
19//kbuild:lib-$(CONFIG_RDEV) += rdev.o
11 20
12//usage:#define rdev_trivial_usage 21//usage:#define rdev_trivial_usage
13//usage: "" 22//usage: ""
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index 345b676ba..d5230387c 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -31,6 +31,16 @@
31 * Taken from util-linux and adapted for busybox by 31 * Taken from util-linux and adapted for busybox by
32 * Paul Mundt <lethal@linux-sh.org>. 32 * Paul Mundt <lethal@linux-sh.org>.
33 */ 33 */
34//config:config READPROFILE
35//config: bool "readprofile"
36//config: default y
37//config: #select PLATFORM_LINUX
38//config: help
39//config: This allows you to parse /proc/profile for basic profiling.
40
41//applet:IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP))
42
43//kbuild:lib-$(CONFIG_READPROFILE) += readprofile.o
34 44
35//usage:#define readprofile_trivial_usage 45//usage:#define readprofile_trivial_usage
36//usage: "[OPTIONS]" 46//usage: "[OPTIONS]"
diff --git a/util-linux/rev.c b/util-linux/rev.c
index 3c1b22f09..c22505314 100644
--- a/util-linux/rev.c
+++ b/util-linux/rev.c
@@ -5,17 +5,16 @@
5 * 5 *
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8
9//applet:IF_REV(APPLET(rev, BB_DIR_BIN, BB_SUID_DROP))
10
11//kbuild:lib-$(CONFIG_REV) += rev.o
12
13//config:config REV 8//config:config REV
14//config: bool "rev" 9//config: bool "rev"
15//config: default y 10//config: default y
16//config: help 11//config: help
17//config: Reverse lines of a file or files. 12//config: Reverse lines of a file or files.
18 13
14//applet:IF_REV(APPLET(rev, BB_DIR_BIN, BB_SUID_DROP))
15
16//kbuild:lib-$(CONFIG_REV) += rev.o
17
19//usage:#define rev_trivial_usage 18//usage:#define rev_trivial_usage
20//usage: "[FILE]..." 19//usage: "[FILE]..."
21//usage:#define rev_full_usage "\n\n" 20//usage:#define rev_full_usage "\n\n"
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c
index 8aee0cfcb..54fc70583 100644
--- a/util-linux/rtcwake.c
+++ b/util-linux/rtcwake.c
@@ -22,6 +22,16 @@
22 * RTC uses a local timezone instead (maybe you dual-boot MS-Windows). 22 * RTC uses a local timezone instead (maybe you dual-boot MS-Windows).
23 * That flag should not be needed on systems with adjtime support. 23 * That flag should not be needed on systems with adjtime support.
24 */ 24 */
25//config:config RTCWAKE
26//config: bool "rtcwake"
27//config: default y
28//config: select PLATFORM_LINUX
29//config: help
30//config: Enter a system sleep state until specified wakeup time.
31
32//applet:IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
33
34//kbuild:lib-$(CONFIG_RTCWAKE) += rtcwake.o
25 35
26//usage:#define rtcwake_trivial_usage 36//usage:#define rtcwake_trivial_usage
27//usage: "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]" 37//usage: "[-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]"
diff --git a/util-linux/script.c b/util-linux/script.c
index 86475c1f1..c5063e8a1 100644
--- a/util-linux/script.c
+++ b/util-linux/script.c
@@ -10,6 +10,15 @@
10 * 10 *
11 * Licensed under GPLv2 or later, see file LICENSE in this source tree. 11 * Licensed under GPLv2 or later, see file LICENSE in this source tree.
12 */ 12 */
13//config:config SCRIPT
14//config: bool "script"
15//config: default y
16//config: help
17//config: The script makes typescript of terminal session.
18
19//applet:IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
20
21//kbuild:lib-$(CONFIG_SCRIPT) += script.o
13 22
14//usage:#define script_trivial_usage 23//usage:#define script_trivial_usage
15//usage: "[-afq" IF_SCRIPTREPLAY("t") "] [-c PROG] [OUTFILE]" 24//usage: "[-afq" IF_SCRIPTREPLAY("t") "] [-c PROG] [OUTFILE]"
diff --git a/util-linux/scriptreplay.c b/util-linux/scriptreplay.c
index 382f56d9a..8a0c7489d 100644
--- a/util-linux/scriptreplay.c
+++ b/util-linux/scriptreplay.c
@@ -7,6 +7,16 @@
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//config:config SCRIPTREPLAY
11//config: bool "scriptreplay"
12//config: default y
13//config: help
14//config: This program replays a typescript, using timing information
15//config: given by script -t.
16
17//applet:IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
18
19//kbuild:lib-$(CONFIG_SCRIPTREPLAY) += scriptreplay.o
10 20
11//usage:#define scriptreplay_trivial_usage 21//usage:#define scriptreplay_trivial_usage
12//usage: "timingfile [typescript [divisor]]" 22//usage: "timingfile [typescript [divisor]]"
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 0a2d23f50..b8f4e9447 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -6,7 +6,6 @@
6 * 6 *
7 * Licensed under GPLv2, see file LICENSE in this source tree. 7 * Licensed under GPLv2, see file LICENSE in this source tree.
8 */ 8 */
9
10//config:config SWAPON 9//config:config SWAPON
11//config: bool "swapon" 10//config: bool "swapon"
12//config: default y 11//config: default y
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index 7960b672c..6034485d7 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -5,6 +5,29 @@
5 * 5 *
6 * Licensed under GPLv2, see file LICENSE in this source tree. 6 * Licensed under GPLv2, see file LICENSE in this source tree.
7 */ 7 */
8//config:config SWITCH_ROOT
9//config: bool "switch_root"
10//config: default y
11//config: select PLATFORM_LINUX
12//config: help
13//config: The switch_root utility is used from initramfs to select a new
14//config: root device. Under initramfs, you have to use this instead of
15//config: pivot_root. (Stop reading here if you don't care why.)
16//config:
17//config: Booting with initramfs extracts a gzipped cpio archive into rootfs
18//config: (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
19//config: or unmounted*, pivot_root will not work from initramfs. Instead,
20//config: switch_root deletes everything out of rootfs (including itself),
21//config: does a mount --move that overmounts rootfs with the new root, and
22//config: then execs the specified init program.
23//config:
24//config: * Because the Linux kernel uses rootfs internally as the starting
25//config: and ending point for searching through the kernel's doubly linked
26//config: list of active mount points. That's why.
27
28//applet:IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP))
29
30//kbuild:lib-$(CONFIG_SWITCH_ROOT) += switch_root.o
8 31
9//usage:#define switch_root_trivial_usage 32//usage:#define switch_root_trivial_usage
10//usage: "[-c /dev/console] NEW_ROOT NEW_INIT [ARGS]" 33//usage: "[-c /dev/console] NEW_ROOT NEW_INIT [ARGS]"
diff --git a/util-linux/uevent.c b/util-linux/uevent.c
index b98fe6160..c22216a8a 100644
--- a/util-linux/uevent.c
+++ b/util-linux/uevent.c
@@ -3,7 +3,6 @@
3 * 3 *
4 * Licensed under GPLv2, see file LICENSE in this source tree. 4 * Licensed under GPLv2, see file LICENSE in this source tree.
5 */ 5 */
6
7//config:config UEVENT 6//config:config UEVENT
8//config: bool "uevent" 7//config: bool "uevent"
9//config: default y 8//config: default y
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 91da69674..78eef57a5 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -7,6 +7,26 @@
7 * 7 *
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//config:config UMOUNT
11//config: bool "umount"
12//config: default y
13//config: select PLATFORM_LINUX
14//config: help
15//config: When you want to remove a mounted filesystem from its current mount
16//config: point, for example when you are shutting down the system, the
17//config: 'umount' utility is the tool to use. If you enabled the 'mount'
18//config: utility, you almost certainly also want to enable 'umount'.
19//config:
20//config:config FEATURE_UMOUNT_ALL
21//config: bool "Support option -a"
22//config: default y
23//config: depends on UMOUNT
24//config: help
25//config: Support -a option to unmount all currently mounted filesystems.
26
27//applet:IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP))
28
29//kbuild:lib-$(CONFIG_UMOUNT) += umount.o
10 30
11//usage:#define umount_trivial_usage 31//usage:#define umount_trivial_usage
12//usage: "[OPTIONS] FILESYSTEM|DIRECTORY" 32//usage: "[OPTIONS] FILESYSTEM|DIRECTORY"
diff --git a/util-linux/unshare.c b/util-linux/unshare.c
index dcc59559a..bbabeef55 100644
--- a/util-linux/unshare.c
+++ b/util-linux/unshare.c
@@ -6,7 +6,6 @@
6 * 6 *
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
10//config:config UNSHARE 9//config:config UNSHARE
11//config: bool "unshare" 10//config: bool "unshare"
12//config: default y 11//config: default y