busybox/util-linux
Ron Yorston 3778898f97 Treat custom and applet scripts as applets
BusyBox has support for embedded shell scripts.  Two types can be
distinguished:  custom scripts and scripts implementing applets.

Custom scripts should be placed in the 'embed' directory at build
time.  They are given a default applet configuration and appear
as applets to the user but no further configuration is possible.

Applet scripts are integrated with the BusyBox build system and
are intended to be used to ship standard applets that just happen
to be implemented as scripts.  They can be configured at build time
and appear just like native applets.

Such scripts should be placed in the 'applets_sh' directory.  A stub
C program should be written to provide the usual applet configuration
details and placed in a suitable subsystem directory.  It may be
helpful to have a configuration option to enable any dependencies the
script requires:  see the 'nologin' applet for an example.

function                                             old     new   delta
scripted_main                                          -      41     +41
applet_names                                        2773    2781      +8
applet_main                                         1600    1604      +4
i2cdetect_main                                       672     674      +2
applet_suid                                          100     101      +1
applet_install_loc                                   200     201      +1
applet_flags                                         100     101      +1
packed_usage                                       33180   33179      -1
tryexec                                              159     152      -7
evalcommand                                         1661    1653      -8
script_names                                           9       -      -9
packed_scripts                                       123     114      -9
complete_cmd_dir_file                                826     811     -15
shellexec                                            271     254     -17
find_command                                        1007     990     -17
busybox_main                                         642     624     -18
run_applet_and_exit                                  100      78     -22
find_script_by_name                                   51       -     -51
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 6/9 up/down: 58/-174)          Total: -116 bytes
   text	   data	    bss	    dec	    hex	filename
 950034	    477	   7296	 957807	  e9d6f	busybox_old
 949918	    477	   7296	 957691	  e9cfb	busybox_unstripped

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-11-17 21:16:33 +01:00
..
volume_id restore documentation on the build config language 2018-06-06 15:16:48 +02:00
acpid.c
blkdiscard.c blkdiscard: Only build on Linux 2017-10-30 14:55:01 +01:00
blkid.c
blockdev.c
cal.c cal: make it NOEXEC 2018-01-14 14:32:11 +01:00
chrt.c chrt: code shrink 2018-01-25 09:34:23 +01:00
Config.src restore documentation on the build config language 2018-06-06 15:16:48 +02:00
dmesg.c
eject.c
fallocate.c regularize format of source file headers, no code changes 2017-09-18 16:28:43 +02:00
fatattr.c
fbset.c
fdformat.c whitespace and comment format fixes, no code changes 2017-10-05 15:33:28 +02:00
fdisk_aix.c
fdisk_gpt.c unzip: use printable_string() for printing filenames 2018-09-30 16:56:56 +02:00
fdisk_osf.c Fix build failures if MAXHOSTNAMELEN or MAXPATHLEN is not defined 2017-10-31 15:59:19 +01:00
fdisk_sgi.c fdisk: sync up with some util-linux 2.31 behavior 2018-07-25 13:52:30 +02:00
fdisk_sun.c fdisk: sync up with some util-linux 2.31 behavior 2018-07-25 13:52:30 +02:00
fdisk.c fdisk: code shrink 2018-07-25 14:42:53 +02:00
findfs.c
flock.c
freeramdisk.c
fsck_minix.c
fsfreeze.c regularize format of source file headers, no code changes 2017-09-18 16:28:43 +02:00
fstrim.c fstrim: do not check that specified file is on a block device 2018-03-29 16:05:10 +02:00
getopt.c whitespace and comment format fixes, no code changes 2017-10-05 14:40:24 +02:00
hexdump_xxd.c
hexdump.c
hwclock.c
ionice.c
ipcrm.c
ipcs.c ipcs: further code shrink 2018-03-08 13:23:06 +01:00
Kbuild.src
last_fancy.c
last.c
losetup.c
lspci.c
lsusb.c
mdev.c regularize format of source file headers, no code changes 2017-09-18 16:28:43 +02:00
mesg.c regularize format of source file headers, no code changes 2017-09-18 16:28:43 +02:00
minix.h
mkfs_ext2_test.sh
mkfs_ext2.c move storage helpers to libbb.h 2018-09-28 15:13:04 +02:00
mkfs_ext2.txt
mkfs_minix.c
mkfs_reiser.c move storage helpers to libbb.h 2018-09-28 15:13:04 +02:00
mkfs_vfat.c move storage helpers to libbb.h 2018-09-28 15:13:04 +02:00
mkswap.c whitespace and comment format fixes, no code changes 2017-10-05 15:33:28 +02:00
more.c
mount.c inetd,mount: add comment with example of flags to build with libtirpc 2018-02-13 18:20:28 +01:00
mountpoint.c
nologin.c Treat custom and applet scripts as applets 2018-11-17 21:16:33 +01:00
nsenter.c nsenter: fix parsing of -t, -S and -G options 2018-05-13 20:14:07 +02:00
pivot_root.c
rdate.c libbb: new option FEATURE_ETC_SERVICES: if off, /etc/services reads often avoided 2018-04-17 12:43:54 +02:00
rdev.c regularize format of source file headers, no code changes 2017-09-18 16:28:43 +02:00
readprofile.c readprofile: code shrink 2018-03-11 19:35:58 +01:00
renice.c libbb.h: always include sys/resource.h 2018-04-08 17:23:27 +02:00
rev.c
rtcwake.c
script.c
scriptreplay.c
setarch.c
setpriv.c
setsid.c
swaponoff.c
switch_root.c libbb: compile capability code only if FEATURE_SETPRIV_CAPABILITIES or RUN_INIT 2018-02-21 20:13:39 +01:00
taskset.c regularize format of source file headers, no code changes 2017-09-18 16:28:43 +02:00
uevent.c
umount.c umount: fix "umount -t FSTYPE MNTPOINT" acting as if -a is specified 2018-02-20 17:58:19 +01:00
unshare.c whitespace fixes 2018-07-17 15:04:17 +02:00
wall.c regularize format of source file headers, no code changes 2017-09-18 16:28:43 +02:00