summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenys Vlasenko2016-11-23 11:46:32 +0100
committerDenys Vlasenko2016-11-23 11:46:32 +0100
commitdd898c9f3388fca1d7339a45150fbb7406de0971 (patch)
treef9f498c9d86c26bd208acc687c5f29b451927ce3
parente5dd71f94f8691c41382b89de35088695cca34b9 (diff)
downloadbusybox-dd898c9f3388fca1d7339a45150fbb7406de0971.zip
busybox-dd898c9f3388fca1d7339a45150fbb7406de0971.tar.gz
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 adce804..23453b0 100644
--- a/include/applets.src.h
+++ b/include/applets.src.h
@@ -75,9 +75,7 @@ s - suid type:
INSERT
IF_TEST(APPLET_NOFORK([, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
IF_TEST(APPLET_NOFORK([[, test, BB_DIR_USR_BIN, BB_SUID_DROP, test))
-IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
IF_BASENAME(APPLET_NOFORK(basename, basename, BB_DIR_USR_BIN, BB_SUID_DROP, basename))
-IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP))
IF_CAL(APPLET(cal, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_CAT(APPLET_NOFORK(cat, cat, BB_DIR_BIN, BB_SUID_DROP, cat))
IF_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))
IF_DF(APPLET(df, BB_DIR_BIN, BB_SUID_DROP))
IF_DHCPRELAY(APPLET(dhcprelay, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_DIRNAME(APPLET_NOFORK(dirname, dirname, BB_DIR_USR_BIN, BB_SUID_DROP, dirname))
-IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
IF_DOS2UNIX(APPLET_NOEXEC(dos2unix, dos2unix, BB_DIR_USR_BIN, BB_SUID_DROP, dos2unix))
IF_DU(APPLET(du, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_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))
IF_EXPAND(APPLET(expand, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_EXPR(APPLET(expr, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_FALSE(APPLET_NOFORK(false, false, BB_DIR_BIN, BB_SUID_DROP, false))
-IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP))
-IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush))
-IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP))
-IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP))
-/* Benefits from suid root: better access to /dev/BLOCKDEVs: */
-IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE))
-IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_FOLD(APPLET_NOEXEC(fold, fold, BB_DIR_USR_BIN, BB_SUID_DROP, fold))
-IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP))
//IF_E2FSCK(APPLET_ODDNAME(fsck.ext2, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext2))
//IF_E2FSCK(APPLET_ODDNAME(fsck.ext3, e2fsck, BB_DIR_SBIN, BB_SUID_DROP, fsck_ext3))
-IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix))
IF_FSYNC(APPLET_NOFORK(fsync, fsync, BB_DIR_BIN, BB_SUID_DROP, fsync))
IF_GETENFORCE(APPLET(getenforce, BB_DIR_USR_SBIN, BB_SUID_DROP))
-IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
IF_GETSEBOOL(APPLET(getsebool, BB_DIR_USR_SBIN, BB_SUID_DROP))
-IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
IF_HEAD(APPLET_NOEXEC(head, head, BB_DIR_USR_BIN, BB_SUID_DROP, head))
-IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hexdump))
-IF_HWCLOCK(APPLET(hwclock, BB_DIR_SBIN, BB_SUID_DROP))
IF_INSTALL(APPLET(install, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP))
//IF_LENGTH(APPLET_NOFORK(length, length, BB_DIR_USR_BIN, BB_SUID_DROP, length))
IF_LN(APPLET_NOEXEC(ln, ln, BB_DIR_BIN, BB_SUID_DROP, ln))
IF_LOAD_POLICY(APPLET(load_policy, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_LOGNAME(APPLET_NOFORK(logname, logname, BB_DIR_USR_BIN, BB_SUID_DROP, logname))
-IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
IF_LS(APPLET_NOEXEC(ls, ls, BB_DIR_BIN, BB_SUID_DROP, ls))
-IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_MATCHPATHCON(APPLET(matchpathcon, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_MKDIR(APPLET_NOFORK(mkdir, mkdir, BB_DIR_BIN, BB_SUID_DROP, mkdir))
IF_MKFIFO(APPLET_NOEXEC(mkfifo, mkfifo, BB_DIR_USR_BIN, BB_SUID_DROP, mkfifo))
-IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP, mkfs_minix))
-IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser))
IF_MKNOD(APPLET_NOEXEC(mknod, mknod, BB_DIR_BIN, BB_SUID_DROP, mknod))
-IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP))
-IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP))
-/* On full-blown systems, requires suid for user mounts.
- * But it's not unthinkable to have it available in non-suid flavor on some systems,
- * for viewing mount table.
- * Therefore we use BB_SUID_MAYBE instead of BB_SUID_REQUIRE: */
-IF_MOUNT(APPLET(mount, BB_DIR_BIN, IF_DESKTOP(BB_SUID_MAYBE) IF_NOT_DESKTOP(BB_SUID_DROP)))
IF_MV(APPLET(mv, BB_DIR_BIN, BB_SUID_DROP))
IF_NICE(APPLET(nice, BB_DIR_BIN, BB_SUID_DROP))
IF_NOHUP(APPLET(nohup, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_OD(APPLET(od, BB_DIR_USR_BIN, BB_SUID_DROP))
//IF_PARSE(APPLET(parse, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP))
IF_PRINTENV(APPLET_NOFORK(printenv, printenv, BB_DIR_BIN, BB_SUID_DROP, printenv))
IF_PRINTF(APPLET_NOFORK(printf, printf, BB_DIR_USR_BIN, BB_SUID_DROP, printf))
IF_PWD(APPLET_NOFORK(pwd, pwd, BB_DIR_BIN, BB_SUID_DROP, pwd))
-IF_RDATE(APPLET(rdate, BB_DIR_USR_SBIN, BB_SUID_DROP))
-IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_READLINK(APPLET(readlink, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_REALPATH(APPLET(realpath, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_RESTORECON(APPLET_ODDNAME(restorecon, setfiles, BB_DIR_SBIN, BB_SUID_DROP, restorecon))
IF_RM(APPLET_NOFORK(rm, rm, BB_DIR_BIN, BB_SUID_DROP, rm))
IF_RMDIR(APPLET_NOFORK(rmdir, rmdir, BB_DIR_BIN, BB_SUID_DROP, rmdir))
-IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_RUNCON(APPLET(runcon, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
IF_SELINUXENABLED(APPLET(selinuxenabled, BB_DIR_USR_SBIN, BB_SUID_DROP))
IF_SEQ(APPLET_NOFORK(seq, seq, BB_DIR_USR_BIN, BB_SUID_DROP, seq))
IF_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))
IF_STAT(APPLET(stat, BB_DIR_BIN, BB_SUID_DROP))
IF_STTY(APPLET(stty, BB_DIR_BIN, BB_SUID_DROP))
IF_SUM(APPLET(sum, BB_DIR_USR_BIN, BB_SUID_DROP))
-IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP))
IF_TAC(APPLET_NOEXEC(tac, tac, BB_DIR_USR_BIN, BB_SUID_DROP, tac))
IF_TAIL(APPLET(tail, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_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))
IF_TTY(APPLET(tty, BB_DIR_USR_BIN, BB_SUID_DROP))
IF_UDHCPC(APPLET(udhcpc, BB_DIR_SBIN, BB_SUID_DROP))
IF_UDHCPD(APPLET(udhcpd, BB_DIR_USR_SBIN, BB_SUID_DROP))
-IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP))
IF_UNAME(APPLET(uname, BB_DIR_BIN, BB_SUID_DROP))
IF_UNEXPAND(APPLET_ODDNAME(unexpand, expand, BB_DIR_USR_BIN, BB_SUID_DROP, unexpand))
IF_UNIQ(APPLET(uniq, BB_DIR_USR_BIN, BB_SUID_DROP))
diff --git a/util-linux/Config.src b/util-linux/Config.src
index 9bef0d5..3c522f9 100644
--- a/util-linux/Config.src
+++ b/util-linux/Config.src
@@ -7,511 +7,6 @@ menu "Linux System Utilities"
INSERT
-config ACPID
- bool "acpid"
- default y
- select PLATFORM_LINUX
- help
- acpid listens to ACPI events coming either in textual form from
- /proc/acpi/event (though it is marked deprecated it is still widely
- used and _is_ a standard) or in binary form from specified evdevs
- (just use /dev/input/event*).
-
- It parses the event to retrieve ACTION and a possible PARAMETER.
- It then spawns /etc/acpi/<ACTION>[/<PARAMETER>] either via run-parts
- (if the resulting path is a directory) or directly as an executable.
-
- N.B. acpid relies on run-parts so have the latter installed.
-
-config FEATURE_ACPID_COMPAT
- bool "Accept and ignore redundant options"
- default y
- depends on ACPID
- help
- Accept and ignore compatibility options -g -m -s -S -v.
-
-config BLKID
- bool "blkid"
- default y
- select PLATFORM_LINUX
- select VOLUMEID
- help
- Lists labels and UUIDs of all filesystems.
- WARNING:
- With all submodules selected, it will add ~8k to busybox.
-
-config FEATURE_BLKID_TYPE
- bool "Print filesystem type"
- default n
- depends on BLKID
- help
- Show TYPE="filesystem type"
-
-config DMESG
- bool "dmesg"
- default y
- select PLATFORM_LINUX
- help
- dmesg is used to examine or control the kernel ring buffer. When the
- Linux kernel prints messages to the system log, they are stored in
- the kernel ring buffer. You can use dmesg to print the kernel's ring
- buffer, clear the kernel ring buffer, change the size of the kernel
- ring buffer, and change the priority level at which kernel messages
- are also logged to the system console. Enable this option if you
- wish to enable the 'dmesg' utility.
-
-config FEATURE_DMESG_PRETTY
- bool "Pretty dmesg output"
- default y
- depends on DMESG
- help
- If you wish to scrub the syslog level from the output, say 'Y' here.
- The syslog level is a string prefixed to every line with the form
- "<#>".
-
- With this option you will see:
- # dmesg
- Linux version 2.6.17.4 .....
- BIOS-provided physical RAM map:
- BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
-
- Without this option you will see:
- # dmesg
- <5>Linux version 2.6.17.4 .....
- <6>BIOS-provided physical RAM map:
- <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
-
-config FBSET
- bool "fbset"
- default y
- select PLATFORM_LINUX
- help
- fbset is used to show or change the settings of a Linux frame buffer
- device. The frame buffer device provides a simple and unique
- interface to access a graphics display. Enable this option
- if you wish to enable the 'fbset' utility.
-
-config FEATURE_FBSET_FANCY
- bool "Turn on extra fbset options"
- default y
- depends on FBSET
- help
- This option enables extended fbset options, allowing one to set the
- framebuffer size, color depth, etc. interface to access a graphics
- display. Enable this option if you wish to enable extended fbset
- options.
-
-config FEATURE_FBSET_READMODE
- bool "Turn on fbset readmode support"
- default y
- depends on FBSET
- help
- This option allows fbset to read the video mode database stored by
- default as /etc/fb.modes, which can be used to set frame buffer
- device to pre-defined video modes.
-
-config FDFLUSH
- bool "fdflush"
- default y
- select PLATFORM_LINUX
- help
- fdflush is only needed when changing media on slightly-broken
- removable media drives. It is used to make Linux believe that a
- hardware disk-change switch has been actuated, which causes Linux to
- forget anything it has cached from the previous media. If you have
- such a slightly-broken drive, you will need to run fdflush every time
- you change a disk. Most people have working hardware and can safely
- leave this disabled.
-
-config FDFORMAT
- bool "fdformat"
- default y
- select PLATFORM_LINUX
- help
- fdformat is used to low-level format a floppy disk.
-
-config FDISK
- bool "fdisk"
- default y
- select PLATFORM_LINUX
- help
- The fdisk utility is used to divide hard disks into one or more
- logical disks, which are generally called partitions. This utility
- can be used to list and edit the set of partitions or BSD style
- 'disk slices' that are defined on a hard drive.
-
-config FDISK_SUPPORT_LARGE_DISKS
- bool "Support over 4GB disks"
- default y
- depends on FDISK
- depends on !LFS # with LFS no special code is needed
- help
- Enable this option to support large disks > 4GB.
-
-config FEATURE_FDISK_WRITABLE
- bool "Write support"
- default y
- depends on FDISK
- help
- Enabling this option allows you to create or change a partition table
- and write those changes out to disk. If you leave this option
- disabled, you will only be able to view the partition table.
-
-config FEATURE_AIX_LABEL
- bool "Support AIX disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change AIX disklabels.
- Most people can safely leave this option disabled.
-
-config FEATURE_SGI_LABEL
- bool "Support SGI disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change SGI disklabels.
- Most people can safely leave this option disabled.
-
-config FEATURE_SUN_LABEL
- bool "Support SUN disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change SUN disklabels.
- Most people can safely leave this option disabled.
-
-config FEATURE_OSF_LABEL
- bool "Support BSD disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to create or change BSD disklabels
- and define and edit BSD disk slices.
-
-config FEATURE_GPT_LABEL
- bool "Support GPT disklabels"
- default n
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to view GUID Partition Table
- disklabels.
-
-config FEATURE_FDISK_ADVANCED
- bool "Support expert mode"
- default y
- depends on FDISK && FEATURE_FDISK_WRITABLE
- help
- Enabling this option allows you to do terribly unsafe things like
- define arbitrary drive geometry, move the beginning of data in a
- partition, and similarly evil things. Unless you have a very good
- reason you would be wise to leave this disabled.
-
-config FINDFS
- bool "findfs"
- default y
- select PLATFORM_LINUX
- select VOLUMEID
- help
- Prints the name of a filesystem with given label or UUID.
- WARNING:
- With all submodules selected, it will add ~8k to busybox.
-
-config FLOCK
- bool "flock"
- default y
- help
- Manage locks from shell scripts
-
-config FREERAMDISK
- bool "freeramdisk"
- default y
- select PLATFORM_LINUX
- help
- Linux allows you to create ramdisks. This utility allows you to
- delete them and completely free all memory that was used for the
- ramdisk. For example, if you boot Linux into a ramdisk and later
- pivot_root, you may want to free the memory that is allocated to the
- ramdisk. If you have no use for freeing memory from a ramdisk, leave
- this disabled.
-
-config FSCK_MINIX
- bool "fsck_minix"
- default y
- help
- The minix filesystem is a nice, small, compact, read-write filesystem
- with little overhead. It is not a journaling filesystem however and
- can experience corruption if it is not properly unmounted or if the
- power goes off in the middle of a write. This utility allows you to
- check for and attempt to repair any corruption that occurs to a minix
- filesystem.
-
-config MKFS_MINIX
- bool "mkfs_minix"
- default y
- select PLATFORM_LINUX
- help
- The minix filesystem is a nice, small, compact, read-write filesystem
- with little overhead. If you wish to be able to create minix
- filesystems this utility will do the job for you.
-
-config FEATURE_MINIX2
- bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
- default y
- depends on FSCK_MINIX || MKFS_MINIX
- help
- If you wish to be able to create version 2 minix filesystems, enable
- this. If you enabled 'mkfs_minix' then you almost certainly want to
- be using the version 2 filesystem support.
-
-config MKFS_REISER
- bool "mkfs_reiser"
- default n
- select PLATFORM_LINUX
- help
- Utility to create ReiserFS filesystems.
- Note: this applet needs a lot of testing and polishing.
-
-config GETOPT
- bool "getopt"
- default y
- help
- The getopt utility is used to break up (parse) options in command
- lines to make it easy to write complex shell scripts that also check
- for legal (and illegal) options. If you want to write horribly
- complex shell scripts, or use some horribly complex shell script
- written by others, this utility may be for you. Most people will
- wisely leave this disabled.
-
-config FEATURE_GETOPT_LONG
- bool "Support option -l"
- default y if LONG_OPTS
- depends on GETOPT
- help
- Enable support for long options (option -l).
-
-config HEXDUMP
- bool "hexdump"
- default y
- help
- The hexdump utility is used to display binary data in a readable
- way that is comparable to the output from most hex editors.
-
-config FEATURE_HEXDUMP_REVERSE
- bool "Support -R, reverse of 'hexdump -Cv'"
- default y
- depends on HEXDUMP
- help
- The hexdump utility is used to display binary data in an ascii
- readable way. This option creates binary data from an ascii input.
- NB: this option is non-standard. It's unwise to use it in scripts
- aimed to be portable.
-
-config HD
- bool "hd"
- default y
- depends on HEXDUMP
- help
- hd is an alias to hexdump -C.
-
-config HWCLOCK
- bool "hwclock"
- default y
- select PLATFORM_LINUX
- help
- The hwclock utility is used to read and set the hardware clock
- on a system. This is primarily used to set the current time on
- shutdown in the hardware clock, so the hardware will keep the
- correct time when Linux is _not_ running.
-
-config FEATURE_HWCLOCK_LONG_OPTIONS
- bool "Support long options (--hctosys,...)"
- default y
- depends on HWCLOCK && LONG_OPTS
- help
- By default, the hwclock utility only uses short options. If you
- are overly fond of its long options, such as --hctosys, --utc, etc)
- then enable this option.
-
-config FEATURE_HWCLOCK_ADJTIME_FHS
- bool "Use FHS /var/lib/hwclock/adjtime"
- default n # util-linux-ng in Fedora 13 still uses /etc/adjtime
- depends on HWCLOCK
- help
- Starting with FHS 2.3, the adjtime state file is supposed to exist
- at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish
- to use the FHS behavior, answer Y here, otherwise answer N for the
- classic /etc/adjtime path.
-
- pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
-
-config IPCRM
- bool "ipcrm"
- default y
- help
- The ipcrm utility allows the removal of System V interprocess
- communication (IPC) objects and the associated data structures
- from the system.
-
-config IPCS
- bool "ipcs"
- default y
- select PLATFORM_LINUX
- help
- The ipcs utility is used to provide information on the currently
- allocated System V interprocess (IPC) objects in the system.
-
-config LOSETUP
- bool "losetup"
- default y
- select PLATFORM_LINUX
- help
- losetup is used to associate or detach a loop device with a regular
- file or block device, and to query the status of a loop device. This
- version does not currently support enabling data encryption.
-
-config LSPCI
- bool "lspci"
- default y
- #select PLATFORM_LINUX
- help
- lspci is a utility for displaying information about PCI buses in the
- system and devices connected to them.
-
- This version uses sysfs (/sys/bus/pci/devices) only.
-
-config LSUSB
- bool "lsusb"
- default y
- #select PLATFORM_LINUX
- help
- lsusb is a utility for displaying information about USB buses in the
- system and devices connected to them.
-
- This version uses sysfs (/sys/bus/usb/devices) only.
-
-config MKSWAP
- bool "mkswap"
- default y
- help
- The mkswap utility is used to configure a file or disk partition as
- Linux swap space. This allows Linux to use the entire file or
- partition as if it were additional RAM, which can greatly increase
- the capability of low-memory machines. This additional memory is
- much slower than real RAM, but can be very helpful at preventing your
- applications being killed by the Linux out of memory (OOM) killer.
- Once you have created swap space using 'mkswap' you need to enable
- the swap space using the 'swapon' utility.
-
-config FEATURE_MKSWAP_UUID
- bool "UUID support"
- default y
- depends on MKSWAP
- help
- Generate swap spaces with universally unique identifiers.
-
-config MORE
- bool "more"
- default y
- help
- more is a simple utility which allows you to read text one screen
- sized page at a time. If you want to read text that is larger than
- the screen, and you are using anything faster than a 300 baud modem,
- you will probably find this utility very helpful. If you don't have
- any need to reading text files, you can leave this disabled.
-
-config PIVOT_ROOT
- bool "pivot_root"
- default y
- select PLATFORM_LINUX
- help
- The pivot_root utility swaps the mount points for the root filesystem
- with some other mounted filesystem. This allows you to do all sorts
- of wild and crazy things with your Linux system and is far more
- powerful than 'chroot'.
-
- Note: This is for initrd in linux 2.4. Under initramfs (introduced
- in linux 2.6) use switch_root instead.
-
-config RDATE
- bool "rdate"
- default y
- help
- The rdate utility allows you to synchronize the date and time of your
- system clock with the date and time of a remote networked system using
- the RFC868 protocol, which is built into the inetd daemon on most
- systems.
-
-config RDEV
- bool "rdev"
- default y
- help
- Print the device node associated with the filesystem mounted at '/'.
-
-config READPROFILE
- bool "readprofile"
- default y
- #select PLATFORM_LINUX
- help
- This allows you to parse /proc/profile for basic profiling.
-
-config RTCWAKE
- bool "rtcwake"
- default y
- select PLATFORM_LINUX
- help
- Enter a system sleep state until specified wakeup time.
-
-config SCRIPT
- bool "script"
- default y
- help
- The script makes typescript of terminal session.
-
-config SCRIPTREPLAY
- bool "scriptreplay"
- default y
- help
- This program replays a typescript, using timing information
- given by script -t.
-
-config SWITCH_ROOT
- bool "switch_root"
- default y
- select PLATFORM_LINUX
- help
- The switch_root utility is used from initramfs to select a new
- root device. Under initramfs, you have to use this instead of
- pivot_root. (Stop reading here if you don't care why.)
-
- Booting with initramfs extracts a gzipped cpio archive into rootfs
- (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
- or unmounted*, pivot_root will not work from initramfs. Instead,
- switch_root deletes everything out of rootfs (including itself),
- does a mount --move that overmounts rootfs with the new root, and
- then execs the specified init program.
-
- * Because the Linux kernel uses rootfs internally as the starting
- and ending point for searching through the kernel's doubly linked
- list of active mount points. That's why.
-
-config UMOUNT
- bool "umount"
- default y
- select PLATFORM_LINUX
- help
- When you want to remove a mounted filesystem from its current mount
- point, for example when you are shutting down the system, the
- 'umount' utility is the tool to use. If you enabled the 'mount'
- utility, you almost certainly also want to enable 'umount'.
-
-config FEATURE_UMOUNT_ALL
- bool "Support option -a"
- default y
- depends on UMOUNT
- help
- Support -a option to unmount all currently mounted filesystems.
-
comment "Common options for mount/umount"
depends on MOUNT || UMOUNT
diff --git a/util-linux/Kbuild.src b/util-linux/Kbuild.src
index dfd50af..6b4fb74 100644
--- a/util-linux/Kbuild.src
+++ b/util-linux/Kbuild.src
@@ -7,36 +7,3 @@
lib-y:=
INSERT
-lib-$(CONFIG_ACPID) += acpid.o
-lib-$(CONFIG_BLKID) += blkid.o
-lib-$(CONFIG_DMESG) += dmesg.o
-lib-$(CONFIG_FBSET) += fbset.o
-lib-$(CONFIG_FDFLUSH) += freeramdisk.o
-lib-$(CONFIG_FDFORMAT) += fdformat.o
-lib-$(CONFIG_FDISK) += fdisk.o
-lib-$(CONFIG_FINDFS) += findfs.o
-lib-$(CONFIG_FLOCK) += flock.o
-lib-$(CONFIG_FREERAMDISK) += freeramdisk.o
-lib-$(CONFIG_FSCK_MINIX) += fsck_minix.o
-lib-$(CONFIG_GETOPT) += getopt.o
-lib-$(CONFIG_HEXDUMP) += hexdump.o
-lib-$(CONFIG_HWCLOCK) += hwclock.o
-lib-$(CONFIG_IPCRM) += ipcrm.o
-lib-$(CONFIG_IPCS) += ipcs.o
-lib-$(CONFIG_LOSETUP) += losetup.o
-lib-$(CONFIG_LSPCI) += lspci.o
-lib-$(CONFIG_LSUSB) += lsusb.o
-lib-$(CONFIG_MKFS_MINIX) += mkfs_minix.o
-lib-$(CONFIG_MKFS_REISER) += mkfs_reiser.o
-lib-$(CONFIG_MKSWAP) += mkswap.o
-lib-$(CONFIG_MORE) += more.o
-lib-$(CONFIG_MOUNT) += mount.o
-lib-$(CONFIG_PIVOT_ROOT) += pivot_root.o
-lib-$(CONFIG_RDATE) += rdate.o
-lib-$(CONFIG_RDEV) += rdev.o
-lib-$(CONFIG_READPROFILE) += readprofile.o
-lib-$(CONFIG_RTCWAKE) += rtcwake.o
-lib-$(CONFIG_SCRIPT) += script.o
-lib-$(CONFIG_SCRIPTREPLAY) += scriptreplay.o
-lib-$(CONFIG_SWITCH_ROOT) += switch_root.o
-lib-$(CONFIG_UMOUNT) += umount.o
diff --git a/util-linux/acpid.c b/util-linux/acpid.c
index 0f2cb6b..3e68b61 100644
--- a/util-linux/acpid.c
+++ b/util-linux/acpid.c
@@ -6,6 +6,32 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config ACPID
+//config: bool "acpid"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: acpid listens to ACPI events coming either in textual form from
+//config: /proc/acpi/event (though it is marked deprecated it is still widely
+//config: used and _is_ a standard) or in binary form from specified evdevs
+//config: (just use /dev/input/event*).
+//config:
+//config: It parses the event to retrieve ACTION and a possible PARAMETER.
+//config: It then spawns /etc/acpi/<ACTION>[/<PARAMETER>] either via run-parts
+//config: (if the resulting path is a directory) or directly as an executable.
+//config:
+//config: N.B. acpid relies on run-parts so have the latter installed.
+//config:
+//config:config FEATURE_ACPID_COMPAT
+//config: bool "Accept and ignore redundant options"
+//config: default y
+//config: depends on ACPID
+//config: help
+//config: Accept and ignore compatibility options -g -m -s -S -v.
+
+//applet:IF_ACPID(APPLET(acpid, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_ACPID) += acpid.o
//usage:#define acpid_trivial_usage
//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 ace88a1..af0bc94 100644
--- a/util-linux/blkdiscard.c
+++ b/util-linux/blkdiscard.c
@@ -5,7 +5,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-
//config:config BLKDISCARD
//config: bool "blkdiscard"
//config: default y
diff --git a/util-linux/blkid.c b/util-linux/blkid.c
index 1bbc803..b6f33b5 100644
--- a/util-linux/blkid.c
+++ b/util-linux/blkid.c
@@ -6,6 +6,26 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config BLKID
+//config: bool "blkid"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: select VOLUMEID
+//config: help
+//config: Lists labels and UUIDs of all filesystems.
+//config: WARNING:
+//config: With all submodules selected, it will add ~8k to busybox.
+//config:
+//config:config FEATURE_BLKID_TYPE
+//config: bool "Print filesystem type"
+//config: default n
+//config: depends on BLKID
+//config: help
+//config: Show TYPE="filesystem type"
+
+//applet:IF_BLKID(APPLET(blkid, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_BLKID) += blkid.o
//usage:#define blkid_trivial_usage
//usage: "[BLOCKDEV]..."
diff --git a/util-linux/blockdev.c b/util-linux/blockdev.c
index e25e529..bf4d497 100644
--- a/util-linux/blockdev.c
+++ b/util-linux/blockdev.c
@@ -5,17 +5,16 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
-
-//applet:IF_BLOCKDEV(APPLET(blockdev, BB_DIR_SBIN, BB_SUID_DROP))
-
-//kbuild:lib-$(CONFIG_BLOCKDEV) += blockdev.o
-
//config:config BLOCKDEV
//config: bool "blockdev"
//config: default y
//config: help
//config: Performs some ioctls with block devices.
+//applet:IF_BLOCKDEV(APPLET(blockdev, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_BLOCKDEV) += blockdev.o
+
//usage:#define blockdev_trivial_usage
//usage: "OPTION BLOCKDEV"
//usage:#define blockdev_full_usage "\n\n"
diff --git a/util-linux/dmesg.c b/util-linux/dmesg.c
index 50e8a0f..b7b2c69 100644
--- a/util-linux/dmesg.c
+++ b/util-linux/dmesg.c
@@ -8,6 +8,43 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config DMESG
+//config: bool "dmesg"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: dmesg is used to examine or control the kernel ring buffer. When the
+//config: Linux kernel prints messages to the system log, they are stored in
+//config: the kernel ring buffer. You can use dmesg to print the kernel's ring
+//config: buffer, clear the kernel ring buffer, change the size of the kernel
+//config: ring buffer, and change the priority level at which kernel messages
+//config: are also logged to the system console. Enable this option if you
+//config: wish to enable the 'dmesg' utility.
+//config:
+//config:config FEATURE_DMESG_PRETTY
+//config: bool "Pretty dmesg output"
+//config: default y
+//config: depends on DMESG
+//config: help
+//config: If you wish to scrub the syslog level from the output, say 'Y' here.
+//config: The syslog level is a string prefixed to every line with the form
+//config: "<#>".
+//config:
+//config: With this option you will see:
+//config: # dmesg
+//config: Linux version 2.6.17.4 .....
+//config: BIOS-provided physical RAM map:
+//config: BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
+//config:
+//config: Without this option you will see:
+//config: # dmesg
+//config: <5>Linux version 2.6.17.4 .....
+//config: <6>BIOS-provided physical RAM map:
+//config: <6> BIOS-e820: 0000000000000000 - 000000000009f000 (usable)
+
+//applet:IF_DMESG(APPLET(dmesg, BB_DIR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_DMESG) += dmesg.o
//usage:#define dmesg_trivial_usage
//usage: "[-c] [-n LEVEL] [-s SIZE]"
diff --git a/util-linux/fatattr.c b/util-linux/fatattr.c
index 6dca24a..030978f 100644
--- a/util-linux/fatattr.c
+++ b/util-linux/fatattr.c
@@ -16,6 +16,7 @@
//config: fatattr lists or changes the file attributes on a fat file system.
//applet:IF_FATATTR(APPLET(fatattr, BB_DIR_BIN, BB_SUID_DROP))
+
//kbuild:lib-$(CONFIG_FATATTR) += fatattr.o
//usage:#define fatattr_trivial_usage
diff --git a/util-linux/fbset.c b/util-linux/fbset.c
index b75ec19..8a78c1e 100644
--- a/util-linux/fbset.c
+++ b/util-linux/fbset.c
@@ -11,6 +11,38 @@
* the GPL, and is (c) 1995-1999 by:
* Geert Uytterhoeven (Geert.Uytterhoeven@cs.kuleuven.ac.be)
*/
+//config:config FBSET
+//config: bool "fbset"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: fbset is used to show or change the settings of a Linux frame buffer
+//config: device. The frame buffer device provides a simple and unique
+//config: interface to access a graphics display. Enable this option
+//config: if you wish to enable the 'fbset' utility.
+//config:
+//config:config FEATURE_FBSET_FANCY
+//config: bool "Turn on extra fbset options"
+//config: default y
+//config: depends on FBSET
+//config: help
+//config: This option enables extended fbset options, allowing one to set the
+//config: framebuffer size, color depth, etc. interface to access a graphics
+//config: display. Enable this option if you wish to enable extended fbset
+//config: options.
+//config:
+//config:config FEATURE_FBSET_READMODE
+//config: bool "Turn on fbset readmode support"
+//config: default y
+//config: depends on FBSET
+//config: help
+//config: This option allows fbset to read the video mode database stored by
+//config: default as /etc/fb.modes, which can be used to set frame buffer
+//config: device to pre-defined video modes.
+
+//applet:IF_FBSET(APPLET(fbset, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_FBSET) += fbset.o
//usage:#define fbset_trivial_usage
//usage: "[OPTIONS] [MODE]"
diff --git a/util-linux/fdformat.c b/util-linux/fdformat.c
index 6ef6445..67c6e15 100644
--- a/util-linux/fdformat.c
+++ b/util-linux/fdformat.c
@@ -4,6 +4,16 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config FDFORMAT
+//config: bool "fdformat"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: fdformat is used to low-level format a floppy disk.
+
+//applet:IF_FDFORMAT(APPLET(fdformat, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_FDFORMAT) += fdformat.o
//usage:#define fdformat_trivial_usage
//usage: "[-n] DEVICE"
diff --git a/util-linux/fdisk.c b/util-linux/fdisk.c
index 32a66d0..af80735 100644
--- a/util-linux/fdisk.c
+++ b/util-linux/fdisk.c
@@ -6,6 +6,86 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config FDISK
+//config: bool "fdisk"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: The fdisk utility is used to divide hard disks into one or more
+//config: logical disks, which are generally called partitions. This utility
+//config: can be used to list and edit the set of partitions or BSD style
+//config: 'disk slices' that are defined on a hard drive.
+//config:
+//config:config FDISK_SUPPORT_LARGE_DISKS
+//config: bool "Support over 4GB disks"
+//config: default y
+//config: depends on FDISK
+//config: depends on !LFS # with LFS no special code is needed
+//config: help
+//config: Enable this option to support large disks > 4GB.
+//config:
+//config:config FEATURE_FDISK_WRITABLE
+//config: bool "Write support"
+//config: default y
+//config: depends on FDISK
+//config: help
+//config: Enabling this option allows you to create or change a partition table
+//config: and write those changes out to disk. If you leave this option
+//config: disabled, you will only be able to view the partition table.
+//config:
+//config:config FEATURE_AIX_LABEL
+//config: bool "Support AIX disklabels"
+//config: default n
+//config: depends on FDISK && FEATURE_FDISK_WRITABLE
+//config: help
+//config: Enabling this option allows you to create or change AIX disklabels.
+//config: Most people can safely leave this option disabled.
+//config:
+//config:config FEATURE_SGI_LABEL
+//config: bool "Support SGI disklabels"
+//config: default n
+//config: depends on FDISK && FEATURE_FDISK_WRITABLE
+//config: help
+//config: Enabling this option allows you to create or change SGI disklabels.
+//config: Most people can safely leave this option disabled.
+//config:
+//config:config FEATURE_SUN_LABEL
+//config: bool "Support SUN disklabels"
+//config: default n
+//config: depends on FDISK && FEATURE_FDISK_WRITABLE
+//config: help
+//config: Enabling this option allows you to create or change SUN disklabels.
+//config: Most people can safely leave this option disabled.
+//config:
+//config:config FEATURE_OSF_LABEL
+//config: bool "Support BSD disklabels"
+//config: default n
+//config: depends on FDISK && FEATURE_FDISK_WRITABLE
+//config: help
+//config: Enabling this option allows you to create or change BSD disklabels
+//config: and define and edit BSD disk slices.
+//config:
+//config:config FEATURE_GPT_LABEL
+//config: bool "Support GPT disklabels"
+//config: default n
+//config: depends on FDISK && FEATURE_FDISK_WRITABLE
+//config: help
+//config: Enabling this option allows you to view GUID Partition Table
+//config: disklabels.
+//config:
+//config:config FEATURE_FDISK_ADVANCED
+//config: bool "Support expert mode"
+//config: default y
+//config: depends on FDISK && FEATURE_FDISK_WRITABLE
+//config: help
+//config: Enabling this option allows you to do terribly unsafe things like
+//config: define arbitrary drive geometry, move the beginning of data in a
+//config: partition, and similarly evil things. Unless you have a very good
+//config: reason you would be wise to leave this disabled.
+
+//applet:IF_FDISK(APPLET(fdisk, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_FDISK) += fdisk.o
/* Looks like someone forgot to add this to config system */
//usage:#ifndef ENABLE_FEATURE_FDISK_BLKSIZE
diff --git a/util-linux/findfs.c b/util-linux/findfs.c
index 07734f3..daa46b0 100644
--- a/util-linux/findfs.c
+++ b/util-linux/findfs.c
@@ -7,6 +7,20 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config FINDFS
+//config: bool "findfs"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: select VOLUMEID
+//config: help
+//config: Prints the name of a filesystem with given label or UUID.
+//config: WARNING:
+//config: With all submodules selected, it will add ~8k to busybox.
+
+/* Benefits from suid root: better access to /dev/BLOCKDEVs: */
+//applet:IF_FINDFS(APPLET(findfs, BB_DIR_SBIN, BB_SUID_MAYBE))
+
+//kbuild:lib-$(CONFIG_FINDFS) += findfs.o
//usage:#define findfs_trivial_usage
//usage: "LABEL=label or UUID=uuid"
diff --git a/util-linux/flock.c b/util-linux/flock.c
index 1f7ade7..f34c0ad 100644
--- a/util-linux/flock.c
+++ b/util-linux/flock.c
@@ -3,6 +3,15 @@
*
* This is free software, licensed under the GNU General Public License v2.
*/
+//config:config FLOCK
+//config: bool "flock"
+//config: default y
+//config: help
+//config: Manage locks from shell scripts
+
+//applet:IF_FLOCK(APPLET(flock, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_FLOCK) += flock.o
//usage:#define flock_trivial_usage
//usage: "[-sxun] FD|{FILE [-c] PROG ARGS}"
diff --git a/util-linux/freeramdisk.c b/util-linux/freeramdisk.c
index a89ae1a..8bc2c44 100644
--- a/util-linux/freeramdisk.c
+++ b/util-linux/freeramdisk.c
@@ -8,6 +8,36 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config FDFLUSH
+//config: bool "fdflush"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: fdflush is only needed when changing media on slightly-broken
+//config: removable media drives. It is used to make Linux believe that a
+//config: hardware disk-change switch has been actuated, which causes Linux to
+//config: forget anything it has cached from the previous media. If you have
+//config: such a slightly-broken drive, you will need to run fdflush every time
+//config: you change a disk. Most people have working hardware and can safely
+//config: leave this disabled.
+//config:
+//config:config FREERAMDISK
+//config: bool "freeramdisk"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: Linux allows you to create ramdisks. This utility allows you to
+//config: delete them and completely free all memory that was used for the
+//config: ramdisk. For example, if you boot Linux into a ramdisk and later
+//config: pivot_root, you may want to free the memory that is allocated to the
+//config: ramdisk. If you have no use for freeing memory from a ramdisk, leave
+//config: this disabled.
+
+//applet:IF_FDFLUSH(APPLET_ODDNAME(fdflush, freeramdisk, BB_DIR_BIN, BB_SUID_DROP, fdflush))
+//applet:IF_FREERAMDISK(APPLET(freeramdisk, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_FDFLUSH) += freeramdisk.o
+//kbuild:lib-$(CONFIG_FREERAMDISK) += freeramdisk.o
//usage:#define freeramdisk_trivial_usage
//usage: "DEVICE"
diff --git a/util-linux/fsck_minix.c b/util-linux/fsck_minix.c
index d2f3524..0eaac17 100644
--- a/util-linux/fsck_minix.c
+++ b/util-linux/fsck_minix.c
@@ -85,6 +85,20 @@
* The device may be a block device or a image of one, but this isn't
* enforced (but it's not much fun on a character device :-).
*/
+//config:config FSCK_MINIX
+//config: bool "fsck_minix"
+//config: default y
+//config: help
+//config: The minix filesystem is a nice, small, compact, read-write filesystem
+//config: with little overhead. It is not a journaling filesystem however and
+//config: can experience corruption if it is not properly unmounted or if the
+//config: power goes off in the middle of a write. This utility allows you to
+//config: check for and attempt to repair any corruption that occurs to a minix
+//config: filesystem.
+
+//applet:IF_FSCK_MINIX(APPLET_ODDNAME(fsck.minix, fsck_minix, BB_DIR_SBIN, BB_SUID_DROP, fsck_minix))
+
+//kbuild:lib-$(CONFIG_FSCK_MINIX) += fsck_minix.o
//usage:#define fsck_minix_trivial_usage
//usage: "[-larvsmf] BLOCKDEV"
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index 18d4909..83cc1ef 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -28,8 +28,28 @@
* Removed --version/-V and --help/-h
* Removed parse_error(), using bb_error_msg() from Busybox instead
* Replaced our_malloc with xmalloc and our_realloc with xrealloc
- *
*/
+//config:config GETOPT
+//config: bool "getopt"
+//config: default y
+//config: help
+//config: The getopt utility is used to break up (parse) options in command
+//config: lines to make it easy to write complex shell scripts that also check
+//config: for legal (and illegal) options. If you want to write horribly
+//config: complex shell scripts, or use some horribly complex shell script
+//config: written by others, this utility may be for you. Most people will
+//config: wisely leave this disabled.
+//config:
+//config:config FEATURE_GETOPT_LONG
+//config: bool "Support option -l"
+//config: default y if LONG_OPTS
+//config: depends on GETOPT
+//config: help
+//config: Enable support for long options (option -l).
+
+//applet:IF_GETOPT(APPLET(getopt, BB_DIR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_GETOPT) += getopt.o
//usage:#define getopt_trivial_usage
//usage: "[OPTIONS] [--] OPTSTRING PARAMS"
diff --git a/util-linux/hexdump.c b/util-linux/hexdump.c
index ac7e24f..5e1ef69 100644
--- a/util-linux/hexdump.c
+++ b/util-linux/hexdump.c
@@ -8,6 +8,35 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config HEXDUMP
+//config: bool "hexdump"
+//config: default y
+//config: help
+//config: The hexdump utility is used to display binary data in a readable
+//config: way that is comparable to the output from most hex editors.
+//config:
+//config:config FEATURE_HEXDUMP_REVERSE
+//config: bool "Support -R, reverse of 'hexdump -Cv'"
+//config: default y
+//config: depends on HEXDUMP
+//config: help
+//config: The hexdump utility is used to display binary data in an ascii
+//config: readable way. This option creates binary data from an ascii input.
+//config: NB: this option is non-standard. It's unwise to use it in scripts
+//config: aimed to be portable.
+//config:
+//config:config HD
+//config: bool "hd"
+//config: default y
+//config: depends on HEXDUMP
+//config: help
+//config: hd is an alias to hexdump -C.
+
+//applet:IF_HEXDUMP(APPLET_NOEXEC(hexdump, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hexdump))
+//applet:IF_HD(APPLET_NOEXEC(hd, hexdump, BB_DIR_USR_BIN, BB_SUID_DROP, hd))
+
+//kbuild:lib-$(CONFIG_HEXDUMP) += hexdump.o
+//kbuild:lib-$(CONFIG_HD) += hexdump.o
//usage:#define hexdump_trivial_usage
//usage: "[-bcCdefnosvx" IF_FEATURE_HEXDUMP_REVERSE("R") "] [FILE]..."
diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
index 6c99977..084a7f1 100644
--- a/util-linux/hwclock.c
+++ b/util-linux/hwclock.c
@@ -5,7 +5,41 @@
* Copyright (C) 2002 Robert Griebl <griebl@gmx.de>
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
-*/
+ */
+//config:config HWCLOCK
+//config: bool "hwclock"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: The hwclock utility is used to read and set the hardware clock
+//config: on a system. This is primarily used to set the current time on
+//config: shutdown in the hardware clock, so the hardware will keep the
+//config: correct time when Linux is _not_ running.
+//config:
+//config:config FEATURE_HWCLOCK_LONG_OPTIONS
+//config: bool "Support long options (--hctosys,...)"
+//config: default y
+//config: depends on HWCLOCK && LONG_OPTS
+//config: help
+//config: By default, the hwclock utility only uses short options. If you
+//config: are overly fond of its long options, such as --hctosys, --utc, etc)
+//config: then enable this option.
+//config:
+//config:config FEATURE_HWCLOCK_ADJTIME_FHS
+//config: bool "Use FHS /var/lib/hwclock/adjtime"
+//config: default n # util-linux-ng in Fedora 13 still uses /etc/adjtime
+//config: depends on HWCLOCK
+//config: help
+//config: Starting with FHS 2.3, the adjtime state file is supposed to exist
+//config: at /var/lib/hwclock/adjtime instead of /etc/adjtime. If you wish
+//config: to use the FHS behavior, answer Y here, otherwise answer N for the
+//config: classic /etc/adjtime path.
+//config:
+//config: pathname.com/fhs/pub/fhs-2.3.html#VARLIBHWCLOCKSTATEDIRECTORYFORHWCLO
+
+//applet:IF_HWCLOCK(APPLET(hwclock, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_HWCLOCK) += hwclock.o
#include "libbb.h"
/* 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 38d81af..76ea3ca 100644
--- a/util-linux/ipcrm.c
+++ b/util-linux/ipcrm.c
@@ -7,6 +7,17 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config IPCRM
+//config: bool "ipcrm"
+//config: default y
+//config: help
+//config: The ipcrm utility allows the removal of System V interprocess
+//config: communication (IPC) objects and the associated data structures
+//config: from the system.
+
+//applet:IF_IPCRM(APPLET(ipcrm, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_IPCRM) += ipcrm.o
//usage:#define ipcrm_trivial_usage
//usage: "[-MQS key] [-mqs id]"
diff --git a/util-linux/ipcs.c b/util-linux/ipcs.c
index 67a25a8..88ae922 100644
--- a/util-linux/ipcs.c
+++ b/util-linux/ipcs.c
@@ -7,6 +7,17 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config IPCS
+//config: bool "ipcs"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: The ipcs utility is used to provide information on the currently
+//config: allocated System V interprocess (IPC) objects in the system.
+
+//applet:IF_IPCS(APPLET(ipcs, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_IPCS) += ipcs.o
//usage:#define ipcs_trivial_usage
//usage: "[[-smq] -i shmid] | [[-asmq] [-tcplu]]"
diff --git a/util-linux/losetup.c b/util-linux/losetup.c
index d450b5a..4424d9c 100644
--- a/util-linux/losetup.c
+++ b/util-linux/losetup.c
@@ -6,6 +6,18 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config LOSETUP
+//config: bool "losetup"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: losetup is used to associate or detach a loop device with a regular
+//config: file or block device, and to query the status of a loop device. This
+//config: version does not currently support enabling data encryption.
+
+//kbuild:lib-$(CONFIG_LOSETUP) += losetup.o
+
+//applet:IF_LOSETUP(APPLET(losetup, BB_DIR_SBIN, BB_SUID_DROP))
//usage:#define losetup_trivial_usage
//usage: "[-r] [-o OFS] {-f|LOOPDEV} FILE - associate loop devices\n"
diff --git a/util-linux/lspci.c b/util-linux/lspci.c
index 514678a..8b38a23 100644
--- a/util-linux/lspci.c
+++ b/util-linux/lspci.c
@@ -6,6 +6,19 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config LSPCI
+//config: bool "lspci"
+//config: default y
+//config: #select PLATFORM_LINUX
+//config: help
+//config: lspci is a utility for displaying information about PCI buses in the
+//config: system and devices connected to them.
+//config:
+//config: This version uses sysfs (/sys/bus/pci/devices) only.
+
+//applet:IF_LSPCI(APPLET(lspci, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_LSPCI) += lspci.o
//usage:#define lspci_trivial_usage
//usage: "[-mk]"
diff --git a/util-linux/lsusb.c b/util-linux/lsusb.c
index 540f21e..7d36d6f 100644
--- a/util-linux/lsusb.c
+++ b/util-linux/lsusb.c
@@ -6,6 +6,19 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config LSUSB
+//config: bool "lsusb"
+//config: default y
+//config: #select PLATFORM_LINUX
+//config: help
+//config: lsusb is a utility for displaying information about USB buses in the
+//config: system and devices connected to them.
+//config:
+//config: This version uses sysfs (/sys/bus/usb/devices) only.
+
+//applet:IF_LSUSB(APPLET(lsusb, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_LSUSB) += lsusb.o
//usage:#define lsusb_trivial_usage NOUSAGE_STR
//usage:#define lsusb_full_usage ""
diff --git a/util-linux/mkfs_minix.c b/util-linux/mkfs_minix.c
index aaabf84..912246b 100644
--- a/util-linux/mkfs_minix.c
+++ b/util-linux/mkfs_minix.c
@@ -62,6 +62,27 @@
* Modified for BusyBox by Erik Andersen <andersen@debian.org> --
* removed getopt based parser and added a hand rolled one.
*/
+//config:config MKFS_MINIX
+//config: bool "mkfs_minix"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: The minix filesystem is a nice, small, compact, read-write filesystem
+//config: with little overhead. If you wish to be able to create minix
+//config: filesystems this utility will do the job for you.
+//config:
+//config:config FEATURE_MINIX2
+//config: bool "Support Minix fs v2 (fsck_minix/mkfs_minix)"
+//config: default y
+//config: depends on FSCK_MINIX || MKFS_MINIX
+//config: help
+//config: If you wish to be able to create version 2 minix filesystems, enable
+//config: this. If you enabled 'mkfs_minix' then you almost certainly want to
+//config: be using the version 2 filesystem support.
+
+//applet:IF_MKFS_MINIX(APPLET_ODDNAME(mkfs.minix, mkfs_minix, BB_DIR_SBIN, BB_SUID_DROP, mkfs_minix))
+
+//kbuild:lib-$(CONFIG_MKFS_MINIX) += mkfs_minix.o
//usage:#define mkfs_minix_trivial_usage
//usage: "[-c | -l FILE] [-nXX] [-iXX] BLOCKDEV [KBYTES]"
diff --git a/util-linux/mkfs_reiser.c b/util-linux/mkfs_reiser.c
index 0a31ee4..d01119f 100644
--- a/util-linux/mkfs_reiser.c
+++ b/util-linux/mkfs_reiser.c
@@ -6,6 +6,17 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config MKFS_REISER
+//config: bool "mkfs_reiser"
+//config: default n
+//config: select PLATFORM_LINUX
+//config: help
+//config: Utility to create ReiserFS filesystems.
+//config: Note: this applet needs a lot of testing and polishing.
+
+//applet:IF_MKFS_REISER(APPLET_ODDNAME(mkfs.reiser, mkfs_reiser, BB_DIR_SBIN, BB_SUID_DROP, mkfs_reiser))
+
+//kbuild:lib-$(CONFIG_MKFS_REISER) += mkfs_reiser.o
//usage:#define mkfs_reiser_trivial_usage
//usage: "[-f] [-l LABEL] BLOCKDEV [4K-BLOCKS]"
diff --git a/util-linux/mkswap.c b/util-linux/mkswap.c
index dcb53f0..954a194 100644
--- a/util-linux/mkswap.c
+++ b/util-linux/mkswap.c
@@ -5,6 +5,29 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config MKSWAP
+//config: bool "mkswap"
+//config: default y
+//config: help
+//config: The mkswap utility is used to configure a file or disk partition as
+//config: Linux swap space. This allows Linux to use the entire file or
+//config: partition as if it were additional RAM, which can greatly increase
+//config: the capability of low-memory machines. This additional memory is
+//config: much slower than real RAM, but can be very helpful at preventing your
+//config: applications being killed by the Linux out of memory (OOM) killer.
+//config: Once you have created swap space using 'mkswap' you need to enable
+//config: the swap space using the 'swapon' utility.
+//config:
+//config:config FEATURE_MKSWAP_UUID
+//config: bool "UUID support"
+//config: default y
+//config: depends on MKSWAP
+//config: help
+//config: Generate swap spaces with universally unique identifiers.
+
+//applet:IF_MKSWAP(APPLET(mkswap, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_MKSWAP) += mkswap.o
//usage:#define mkswap_trivial_usage
//usage: "[-L LBL] BLOCKDEV [KBYTES]"
diff --git a/util-linux/more.c b/util-linux/more.c
index 07836e2..934b30f 100644
--- a/util-linux/more.c
+++ b/util-linux/more.c
@@ -13,6 +13,19 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config MORE
+//config: bool "more"
+//config: default y
+//config: help
+//config: more is a simple utility which allows you to read text one screen
+//config: sized page at a time. If you want to read text that is larger than
+//config: the screen, and you are using anything faster than a 300 baud modem,
+//config: you will probably find this utility very helpful. If you don't have
+//config: any need to reading text files, you can leave this disabled.
+
+//applet:IF_MORE(APPLET(more, BB_DIR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_MORE) += more.o
//usage:#define more_trivial_usage
//usage: "[FILE]..."
diff --git a/util-linux/mount.c b/util-linux/mount.c
index eb8b7ba..42962b8 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -112,6 +112,14 @@
//config: help
//config: Support mount -T (specifying an alternate fstab)
+/* On full-blown systems, requires suid for user mounts.
+ * But it's not unthinkable to have it available in non-suid flavor on some systems,
+ * for viewing mount table.
+ * Therefore we use BB_SUID_MAYBE instead of BB_SUID_REQUIRE: */
+//applet:IF_MOUNT(APPLET(mount, BB_DIR_BIN, IF_DESKTOP(BB_SUID_MAYBE) IF_NOT_DESKTOP(BB_SUID_DROP)))
+
+//kbuild:lib-$(CONFIG_MOUNT) += mount.o
+
//usage:#define mount_trivial_usage
//usage: "[OPTIONS] [-o OPT] DEVICE NODE"
//usage:#define mount_full_usage "\n\n"
diff --git a/util-linux/pivot_root.c b/util-linux/pivot_root.c
index 83f01fa..9bdae50 100644
--- a/util-linux/pivot_root.c
+++ b/util-linux/pivot_root.c
@@ -8,6 +8,22 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config PIVOT_ROOT
+//config: bool "pivot_root"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: The pivot_root utility swaps the mount points for the root filesystem
+//config: with some other mounted filesystem. This allows you to do all sorts
+//config: of wild and crazy things with your Linux system and is far more
+//config: powerful than 'chroot'.
+//config:
+//config: Note: This is for initrd in linux 2.4. Under initramfs (introduced
+//config: in linux 2.6) use switch_root instead.
+
+//applet:IF_PIVOT_ROOT(APPLET(pivot_root, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_PIVOT_ROOT) += pivot_root.o
//usage:#define pivot_root_trivial_usage
//usage: "NEW_ROOT PUT_OLD"
diff --git a/util-linux/rdate.c b/util-linux/rdate.c
index 8075ef6..8dd784d 100644
--- a/util-linux/rdate.c
+++ b/util-linux/rdate.c
@@ -6,7 +6,19 @@
* by Sterling Huxley <sterling@europa.com>
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
-*/
+ */
+//config:config RDATE
+//config: bool "rdate"
+//config: default y
+//config: help
+//config: The rdate utility allows you to synchronize the date and time of your
+//config: system clock with the date and time of a remote networked system using
+//config: the RFC868 protocol, which is built into the inetd daemon on most
+//config: systems.
+
+//applet:IF_RDATE(APPLET(rdate, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_RDATE) += rdate.o
//usage:#define rdate_trivial_usage
//usage: "[-sp] HOST"
diff --git a/util-linux/rdev.c b/util-linux/rdev.c
index 4652817..0e1578e 100644
--- a/util-linux/rdev.c
+++ b/util-linux/rdev.c
@@ -8,6 +8,15 @@
* Licensed under GPLv2, see file LICENSE in this source tree.
*
*/
+//config:config RDEV
+//config: bool "rdev"
+//config: default y
+//config: help
+//config: Print the device node associated with the filesystem mounted at '/'.
+
+//applet:IF_RDEV(APPLET(rdev, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_RDEV) += rdev.o
//usage:#define rdev_trivial_usage
//usage: ""
diff --git a/util-linux/readprofile.c b/util-linux/readprofile.c
index 345b676..d523038 100644
--- a/util-linux/readprofile.c
+++ b/util-linux/readprofile.c
@@ -31,6 +31,16 @@
* Taken from util-linux and adapted for busybox by
* Paul Mundt <lethal@linux-sh.org>.
*/
+//config:config READPROFILE
+//config: bool "readprofile"
+//config: default y
+//config: #select PLATFORM_LINUX
+//config: help
+//config: This allows you to parse /proc/profile for basic profiling.
+
+//applet:IF_READPROFILE(APPLET(readprofile, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_READPROFILE) += readprofile.o
//usage:#define readprofile_trivial_usage
//usage: "[OPTIONS]"
diff --git a/util-linux/rev.c b/util-linux/rev.c
index 3c1b22f..c225053 100644
--- a/util-linux/rev.c
+++ b/util-linux/rev.c
@@ -5,17 +5,16 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
-
-//applet:IF_REV(APPLET(rev, BB_DIR_BIN, BB_SUID_DROP))
-
-//kbuild:lib-$(CONFIG_REV) += rev.o
-
//config:config REV
//config: bool "rev"
//config: default y
//config: help
//config: Reverse lines of a file or files.
+//applet:IF_REV(APPLET(rev, BB_DIR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_REV) += rev.o
+
//usage:#define rev_trivial_usage
//usage: "[FILE]..."
//usage:#define rev_full_usage "\n\n"
diff --git a/util-linux/rtcwake.c b/util-linux/rtcwake.c
index 8aee0cf..54fc705 100644
--- a/util-linux/rtcwake.c
+++ b/util-linux/rtcwake.c
@@ -22,6 +22,16 @@
* RTC uses a local timezone instead (maybe you dual-boot MS-Windows).
* That flag should not be needed on systems with adjtime support.
*/
+//config:config RTCWAKE
+//config: bool "rtcwake"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: Enter a system sleep state until specified wakeup time.
+
+//applet:IF_RTCWAKE(APPLET(rtcwake, BB_DIR_USR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_RTCWAKE) += rtcwake.o
//usage:#define rtcwake_trivial_usage
//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 86475c1..c5063e8 100644
--- a/util-linux/script.c
+++ b/util-linux/script.c
@@ -10,6 +10,15 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
+//config:config SCRIPT
+//config: bool "script"
+//config: default y
+//config: help
+//config: The script makes typescript of terminal session.
+
+//applet:IF_SCRIPT(APPLET(script, BB_DIR_USR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_SCRIPT) += script.o
//usage:#define script_trivial_usage
//usage: "[-afq" IF_SCRIPTREPLAY("t") "] [-c PROG] [OUTFILE]"
diff --git a/util-linux/scriptreplay.c b/util-linux/scriptreplay.c
index 382f56d..8a0c748 100644
--- a/util-linux/scriptreplay.c
+++ b/util-linux/scriptreplay.c
@@ -7,6 +7,16 @@
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*
*/
+//config:config SCRIPTREPLAY
+//config: bool "scriptreplay"
+//config: default y
+//config: help
+//config: This program replays a typescript, using timing information
+//config: given by script -t.
+
+//applet:IF_SCRIPTREPLAY(APPLET(scriptreplay, BB_DIR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_SCRIPTREPLAY) += scriptreplay.o
//usage:#define scriptreplay_trivial_usage
//usage: "timingfile [typescript [divisor]]"
diff --git a/util-linux/swaponoff.c b/util-linux/swaponoff.c
index 0a2d23f..b8f4e94 100644
--- a/util-linux/swaponoff.c
+++ b/util-linux/swaponoff.c
@@ -6,7 +6,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
-
//config:config SWAPON
//config: bool "swapon"
//config: default y
diff --git a/util-linux/switch_root.c b/util-linux/switch_root.c
index 7960b67..6034485 100644
--- a/util-linux/switch_root.c
+++ b/util-linux/switch_root.c
@@ -5,6 +5,29 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config SWITCH_ROOT
+//config: bool "switch_root"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: The switch_root utility is used from initramfs to select a new
+//config: root device. Under initramfs, you have to use this instead of
+//config: pivot_root. (Stop reading here if you don't care why.)
+//config:
+//config: Booting with initramfs extracts a gzipped cpio archive into rootfs
+//config: (which is a variant of ramfs/tmpfs). Because rootfs can't be moved
+//config: or unmounted*, pivot_root will not work from initramfs. Instead,
+//config: switch_root deletes everything out of rootfs (including itself),
+//config: does a mount --move that overmounts rootfs with the new root, and
+//config: then execs the specified init program.
+//config:
+//config: * Because the Linux kernel uses rootfs internally as the starting
+//config: and ending point for searching through the kernel's doubly linked
+//config: list of active mount points. That's why.
+
+//applet:IF_SWITCH_ROOT(APPLET(switch_root, BB_DIR_SBIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_SWITCH_ROOT) += switch_root.o
//usage:#define switch_root_trivial_usage
//usage: "[-c /dev/console] NEW_ROOT NEW_INIT [ARGS]"
diff --git a/util-linux/uevent.c b/util-linux/uevent.c
index b98fe61..c22216a 100644
--- a/util-linux/uevent.c
+++ b/util-linux/uevent.c
@@ -3,7 +3,6 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
-
//config:config UEVENT
//config: bool "uevent"
//config: default y
diff --git a/util-linux/umount.c b/util-linux/umount.c
index 91da696..78eef57 100644
--- a/util-linux/umount.c
+++ b/util-linux/umount.c
@@ -7,6 +7,26 @@
*
* Licensed under GPLv2, see file LICENSE in this source tree.
*/
+//config:config UMOUNT
+//config: bool "umount"
+//config: default y
+//config: select PLATFORM_LINUX
+//config: help
+//config: When you want to remove a mounted filesystem from its current mount
+//config: point, for example when you are shutting down the system, the
+//config: 'umount' utility is the tool to use. If you enabled the 'mount'
+//config: utility, you almost certainly also want to enable 'umount'.
+//config:
+//config:config FEATURE_UMOUNT_ALL
+//config: bool "Support option -a"
+//config: default y
+//config: depends on UMOUNT
+//config: help
+//config: Support -a option to unmount all currently mounted filesystems.
+
+//applet:IF_UMOUNT(APPLET(umount, BB_DIR_BIN, BB_SUID_DROP))
+
+//kbuild:lib-$(CONFIG_UMOUNT) += umount.o
//usage:#define umount_trivial_usage
//usage: "[OPTIONS] FILESYSTEM|DIRECTORY"
diff --git a/util-linux/unshare.c b/util-linux/unshare.c
index dcc5955..bbabeef 100644
--- a/util-linux/unshare.c
+++ b/util-linux/unshare.c
@@ -6,7 +6,6 @@
*
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
*/
-
//config:config UNSHARE
//config: bool "unshare"
//config: default y