Commit Graph

798 Commits

Author SHA1 Message Date
David Leonard
4642cf5b38 tsort: new applet
function                                             old     new   delta
tsort_main                                             -     578    +578
.rodata                                           104884  104906     +22
applet_names                                        2759    2765      +6
applet_main                                         1596    1600      +4
packed_usage                                       34290   34288      -2
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/1 up/down: 610/-2)            Total: 608 bytes

Signed-off-by: David Leonard <d+busybox@adaptive-enterprises.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2022-05-02 14:25:36 +02:00
Denys Vlasenko
00d10cb6eb docs/embedded-scripts.txt: whitespace fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-12-17 21:38:02 +01:00
Denys Vlasenko
c7b90dc4d1 uudecode: special-case "/dev/stdout", closes 14241
function                                             old     new   delta
uudecode_main                                        295     322     +27

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-12-12 00:34:15 +01:00
Denys Vlasenko
6b6826f0b8 *: --help tweaks
function                                             old     new   delta
.rodata                                           103190  103189      -1
packed_usage                                       33590   33566     -24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-25)             Total: -25 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2021-06-13 01:08:48 +02:00
Rostislav Skudnov
d712edc6d8 dd: add 'oflag=append'
Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-02-14 13:01:46 +01:00
Ron Yorston
71df2d3589 hush: allow hush to run embedded scripts
Embedded scripts require a shell to be present in the BusyBox
binary.  Allow either ash or hush to be used for this purpose.
If both are enabled ash takes precedence.

The size of the binary is unchanged in the default configuration:
both ash and hush are present but support for embedded scripts
isn't compiled into hush.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-11-27 16:13:07 +01:00
Ron Yorston
31a04d91c2 docs: add embedded-scripts.txt
Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-11-27 12:33:28 +01:00
Rostislav Skudnov
3f6a978a0d dd: add 'oflag=seek_bytes'
Allow specifying position in the output file in bytes instead of
obs-sized blocks, improve compatibility with GNU dd.

function                                             old     new   delta
dd_main                                             1632    1693     +61
packed_usage                                       33130   33150     +20
static.oflag_words                                     -      12     +12
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 93/0)               Total: 93 bytes

Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-10-30 16:55:09 +01:00
Martin Kaiser
d1cd3da1e5 mdev.txt: explain the meaning of a leading "-"
If a line in mdev.conf starts with "-", parsing will continue even if
a match is found in that line.

Signed-off-by: Martin Kaiser <martin@kaiser.cx>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-09-25 13:20:17 +02:00
Kartik Agaram
43b17b1cd0 restore documentation on the build config language
Kconfig-language.txt was deleted in commit 4fa499a17b back in 2006.
Move to docs/ as suggested by Xabier Oneca:
  http://lists.busybox.net/pipermail/busybox/2014-May/080914.html
Also update references to it everywhere.

Signed-off-by: Kartik Agaram <akkartik@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-06-06 15:16:48 +02:00
Nicholas Clark
77a6678c42 dd: add 'fullblock' iflag
Adds a fullblock iflag for improved compatibility with GNU dd.
The new iflag can be used to ensure that dd calls retrieve the
expected amount of data when reading from pipes or unusual
filesystems.

function                                             old     new   delta
packed_usage                                       32249   32334     +85
dd_main                                             1582    1632     +50
static.iflag_words                                    12      22     +10
------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 145/0)             Total: 145 bytes

Signed-off-by: Nicholas Clark <nicholas.clark@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-01-25 19:00:19 +01:00
Denys Vlasenko
fbecca1bed Tweak outdated documentation and comments
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-06 14:03:27 +02:00
Denys Vlasenko
49e6bf2db9 sheel: improve comments on signal handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-04 14:28:16 +02:00
Denys Vlasenko
39194f0309 new NOFORKs: pwdx,kill[all5],ttysize,realpath,readlink NOEXECs: date,resize
function                                             old     new   delta
run_nofork_applet                                    258     280     +22
readlink_main                                        112     123     +11
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 33/0)               Total: 33 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-03 19:03:32 +02:00
Denys Vlasenko
7c40ddd950 NOFORK fixes
"rm -i FILE" and "yes" can now be interrupted by ^C in hush.
This also now works:

$ usleep 19999999
^C
$ echo $?
130

function                                             old     new   delta
run_pipe                                            1668    1711     +43
pseudo_exec_argv                                     312     321      +9
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 52/0)               Total: 52 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-02 16:37:39 +02:00
Denys Vlasenko
10ad622dc2 Spelling fixes in comments, documentation, tests and examples
By klemens <ka7@github.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-04-17 16:13:32 +02:00
Maxime Coste
d2383f57cd paste: new applet
function                                             old     new   delta
paste_main                                             -     493    +493
packed_usage                                       31019   31070     +51
applet_names                                        2569    2575      +6
applet_main                                         1484    1488      +4
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 3/0 up/down: 554/0)             Total: 554 bytes

Signed-off-by: Maxime Coste <mawww@kakoune.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-03-23 17:35:52 +01:00
Denys Vlasenko
9967c9949e libbb: spawn_and_wait() fflushes before forking NOEXEC; child reinits logmode
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26 01:13:58 +01:00
Denys Vlasenko
06f20bf675 link: new applet
coreutils grew itself a tiny simplistic alternative to ln:

	Usage: link FILE LINK

	Create hard LINK to FILE

function                                             old     new   delta
link_main                                              -      75     +75
packed_usage                                       31114   31131     +17
applet_names                                        2564    2569      +5
applet_main                                         1480    1484      +4
applet_install_loc                                   185     186      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 102/0)             Total: 102 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-01-26 00:27:53 +01:00
Kang-Che Sung
b28897849f docs: Update filenames in keep_data_small.txt
The filenames in docs/keep_data_small.txt are a little bit outdated.
It's better to change it to the current name.

decompress_unzip.c -> decompress_gunzip.c
(since commit 774bce8e8b)
libbb/messages.c -> libbb/ptr_to_globals.c
(since commit 574f2f4394)

Signed-off-by: Kang-Che Sung <explorer09@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-08-22 20:15:50 +02:00
Denys Vlasenko
f4f8fe841c build system: fix a few warnings for allnoconfig build
Not that allnoconfig build is useful in any way...

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-07-05 21:43:28 +02:00
Rafał Miłecki
c30a5b1373 dd: support iflag=skip_bytes
It allows specifying amount of bytes directly (not only amount of
blocks) is also supported by GNU's Coreutils.

function                                             old     new   delta
parse_comma_flags                                      -      93     +93
static.iflag_words                                     -      12     +12
dd_main                                             1569    1580     +11
packed_usage                                       30591   30600      +9
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 125/0)             Total: 125 bytes

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-02-01 02:17:28 +01:00
Maninder Singh
97c6491b4e typo fixes
Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25 13:46:36 +02:00
Michel Stam
d3fabf89d7 zcip: Add environment variable for overriding log functionality
function                                             old     new   delta
bb_logenv_override                                     -      70     +70
packed_usage                                       29969   30033     +64
zcip_main                                           1426    1431      +5
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 2/0 up/down: 139/0)             Total: 139 bytes

Signed-off-by: Michel Stam <m.stam@fugro.nl>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-11-04 12:19:04 +01:00
Bartosz Golaszewski
3ed81cf052 unit-tests: implement the unit-testing framework
This set of patches adds a simple unit-testing framework to Busybox

unit-tests: add some helper macros for unit-test framework implementation
unit-tests: implement the unit-testing framework
unit-tests: add basic documentation on writing the unit test cases
unit-tests: modify the Makefile 'test' target to run unit-tests too
unit-tests: add two example test cases
unit-tests: modify the existing strrstr test code to use the unit-test framework

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-06-22 16:30:41 +02:00
Denys Vlasenko
e765b5ac34 libbb: rename execable -> executable. No code changes
English speakers complained that it sounded awfully broken.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-05-02 17:15:58 +02:00
Denys Vlasenko
f332617fbd docs/new-applet-HOWTO.txt: tweak a bit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-17 15:06:29 +01:00
Bartosz Golaszewski
9dbe4d0547 docs: update new-applet-HOWTO.txt
This patch adds some information about the gen_build_files.sh script and how
it allows to keep the Kbuild, Config.in etc. declarations in .c files.

Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-03-16 18:47:44 +01:00
Denys Vlasenko
d74f8435ea docs: tweak keep_data_small.txt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2014-01-13 11:45:34 +01:00
Bartosz Golaszewski
28a209466f bloat-o-meter: add usage info
Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-16 19:18:05 +02:00
Denys Vlasenko
d7ea34ee71 Documentation update
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-09-17 16:24:01 +02:00
Denys Vlasenko
982e87f2fb Whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-30 11:52:58 +02:00
Denys Vlasenko
ad546ec606 Update docs/tcp.txt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-27 14:35:51 +02:00
Denys Vlasenko
7801148a81 Add notes about TCP programming quirks.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-07-25 14:00:37 +02:00
Denys Vlasenko
40b97fb31e mdev: add environment variable match
function                                             old     new   delta
make_device                                         1998    2189    +191
clean_up_cur_rule                                     61      96     +35
dirAction                                             75      87     +12
mdev_main                                            838     849     +11
packed_usage                                       29272   29273      +1
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/0 up/down: 250/0)             Total: 250 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-26 00:40:46 +01:00
Denys Vlasenko
8a6a2f9c9c update seamless uncompression code
This change makes "tar tf hello_world.txz" work without
adding special-casing for ".txz" extension. It also removes
ever-growing magic checking code in rpm2cpio and get_header_tar -
we reuse one which lives in setup_unzip_on_fd.

function                                             old     new   delta
unpack_gz_stream                                       7     566    +559
check_signature16                                      -      70     +70
setup_unzip_on_fd                                     99     142     +43
handle_SIGCHLD                                         -      41     +41
unpack_bz2_stream                                    342     376     +34
unzip_main                                          2352    2385     +33
bbunpack                                             503     533     +30
open_transformer                                      74     102     +28
unpack_Z_stream                                     1278    1304     +26
unpack_gunzip                                        101     123     +22
init_transformer_aux_data                              -      18     +18
unpack_xz_stream                                    2388    2402     +14
open_zipped                                          131     141     +10
rpm_main                                            1358    1363      +5
get_header_tar_lzma                                   52      57      +5
get_header_tar_bz2                                    52      57      +5
unpack_lzma_stream                                  2698    2702      +4
hash_find                                            234     233      -1
get_header_tar                                      1759    1733     -26
get_header_tar_gz                                     92      57     -35
unpack_uncompress                                     51      12     -39
rpm2cpio_main                                        201     147     -54
unpack_unxz                                           67      12     -55
unpack_bz2_stream_prime                               55       -     -55
get_header_tar_Z                                      86       -     -86
unpack_gz_stream_with_info                           539       -    -539
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 14/6 up/down: 947/-890)          Total: 57 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:27:48 +01:00
Denys Vlasenko
774bce8e8b archival/libarchive/decompress_unzip.c -> decompress_gunzip.c. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-03-06 16:26:20 +01:00
Denys Vlasenko
7449e18190 getty,login: tighten up handling of ctty, pgrp, and tty attr restoring on timeout
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-22 06:27:41 +02:00
Denys Vlasenko
17fb598dc2 docs/ctty.htm: add a useful URL to
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-10-21 18:44:33 +02:00
Denys Vlasenko
5c6ba6c56f mdev: expand --help so that it's actually useful.
function                                             old     new   delta
packed_usage                                       28634   28822    +188

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-19 12:18:11 +02:00
Dan Fandrich
b5de0c12d6 typo fixes
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-07-08 05:47:49 +02:00
Denys Vlasenko
488dd70869 fix !ENABLE_FEATURE_GETOPT_LONG build. Closes 3775
When compiling with !ENABLE_FEATURE_GETOPT_LONG, busybox still tries
to include getopt.h which is not available; for example with uClibc
when !UCLIBC_HAS_GETOPT_LONG.  getopt.h is only required
for the _long set of functions.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-05-29 04:24:52 +02:00
Denys Vlasenko
0288b27ad8 small fixes atop syslog config patch
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-16 20:15:14 +02:00
Bjørn Forsman
102b8bde3b .gitignore: add missing ignores
Ignore output files created by "make defconfig; make".

Signed-off-by: Bjørn Forsman <bjorn.forsman@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-03-06 19:54:15 +01:00
Denys Vlasenko
b72baeb003 hush: use FEATURE_SH_NOFORK to enable NOFORK trick
Also expands docs

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-02-02 18:38:57 +01:00
Denys Vlasenko
b9f2d9f7d9 mass removal of underscores from _BB_DIR_foo and _BB_SUID_foo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:58:01 +01:00
Denys Vlasenko
833d4e7f84 rename archival/libunarchive -> archival/libarchive; move bz/ into it
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-03 02:38:31 +01:00
Denys Vlasenko
02788ac7e2 scripts: remove bitrotted scripts/individual
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 20:45:37 +02:00
Holger Blasum
b27d62af8b update docs/new-applet-HOWTO.txt
Signed-off-by: Holger Blasum <hbl@sysgo.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 20:37:05 +02:00
Denys Vlasenko
17fc33dfbd finish busybox.1 renaming
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-24 03:46:16 +02:00