Commit Graph

72 Commits

Author SHA1 Message Date
Denys Vlasenko
b097a84d62 config: update size information
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2018-12-28 03:20:17 +01:00
Denys Vlasenko
22542eca18 getopt32: remove opt_complementary
function                                             old     new   delta
vgetopt32                                           1318    1392     +74
runsvdir_main                                        703     713     +10
bb_make_directory                                    423     425      +2
collect_cpu                                          546     545      -1
opt_chars                                              3       -      -3
opt_complementary                                      4       -      -4
tftpd_main                                           567     562      -5
ntp_init                                             476     471      -5
zcip_main                                           1266    1256     -10
xxd_main                                             428     418     -10
whois_main                                           140     130     -10
who_main                                             463     453     -10
which_main                                           212     202     -10
wget_main                                           2535    2525     -10
watchdog_main                                        291     281     -10
watch_main                                           222     212     -10
vlock_main                                           399     389     -10
uuencode_main                                        332     322     -10
uudecode_main                                        316     306     -10
unlink_main                                           45      35     -10
udhcpd_main                                         1482    1472     -10
udhcpc_main                                         2762    2752     -10
tune2fs_main                                         290     280     -10
tunctl_main                                          366     356     -10
truncate_main                                        218     208     -10
tr_main                                              518     508     -10
time_main                                           1134    1124     -10
tftp_main                                            286     276     -10
telnetd_main                                        1873    1863     -10
tcpudpsvd_main                                      1785    1775     -10
taskset_main                                         521     511     -10
tar_main                                            1009     999     -10
tail_main                                           1644    1634     -10
syslogd_main                                        1967    1957     -10
switch_root_main                                     368     358     -10
svlogd_main                                         1454    1444     -10
sv                                                  1296    1286     -10
stat_main                                            104      94     -10
start_stop_daemon_main                              1028    1018     -10
split_main                                           542     532     -10
sort_main                                            796     786     -10
slattach_main                                        624     614     -10
shuf_main                                            504     494     -10
setsid_main                                           96      86     -10
setserial_main                                      1132    1122     -10
setfont_main                                         388     378     -10
setconsole_main                                       78      68     -10
sendmail_main                                       1209    1199     -10
sed_main                                             677     667     -10
script_main                                         1077    1067     -10
run_parts_main                                       325     315     -10
rtcwake_main                                         454     444     -10
rm_main                                              175     165     -10
reformime_main                                       119     109     -10
readlink_main                                        123     113     -10
rdate_main                                           246     236     -10
pwdx_main                                            189     179     -10
pstree_main                                          317     307     -10
pscan_main                                           663     653     -10
popmaildir_main                                      818     808     -10
pmap_main                                             80      70     -10
nc_main                                             1042    1032     -10
mv_main                                              558     548     -10
mountpoint_main                                      477     467     -10
mount_main                                          1264    1254     -10
modprobe_main                                        768     758     -10
modinfo_main                                         333     323     -10
mktemp_main                                          200     190     -10
mkswap_main                                          324     314     -10
mkfs_vfat_main                                      1489    1479     -10
microcom_main                                        715     705     -10
md5_sha1_sum_main                                    521     511     -10
man_main                                             867     857     -10
makedevs_main                                       1052    1042     -10
ls_main                                              563     553     -10
losetup_main                                         432     422     -10
loadfont_main                                         89      79     -10
ln_main                                              524     514     -10
link_main                                             75      65     -10
ipcalc_main                                          544     534     -10
iostat_main                                         2397    2387     -10
install_main                                         768     758     -10
id_main                                              480     470     -10
i2cset_main                                         1239    1229     -10
i2cget_main                                          380     370     -10
i2cdump_main                                        1482    1472     -10
i2cdetect_main                                       682     672     -10
hwclock_main                                         406     396     -10
httpd_main                                           741     731     -10
grep_main                                            837     827     -10
getty_main                                          1559    1549     -10
fuser_main                                           297     287     -10
ftpgetput_main                                       345     335     -10
ftpd_main                                           2232    2222     -10
fstrim_main                                          251     241     -10
fsfreeze_main                                         77      67     -10
fsck_minix_main                                     2921    2911     -10
flock_main                                           314     304     -10
flashcp_main                                         740     730     -10
flash_eraseall_main                                  833     823     -10
fdformat_main                                        532     522     -10
expand_main                                          680     670     -10
eject_main                                           335     325     -10
dumpleases_main                                      630     620     -10
du_main                                              314     304     -10
dos2unix_main                                        441     431     -10
diff_main                                           1350    1340     -10
df_main                                             1064    1054     -10
date_main                                           1095    1085     -10
cut_main                                             961     951     -10
cryptpw_main                                         228     218     -10
crontab_main                                         575     565     -10
crond_main                                          1149    1139     -10
cp_main                                              370     360     -10
common_traceroute_main                              3834    3824     -10
common_ping_main                                    1767    1757     -10
comm_main                                            239     229     -10
cmp_main                                             655     645     -10
chrt_main                                            379     369     -10
chpst_main                                           704     694     -10
chpasswd_main                                        308     298     -10
chown_main                                           171     161     -10
chmod_main                                           158     148     -10
cat_main                                             428     418     -10
bzip2_main                                           120     110     -10
blkdiscard_main                                      264     254     -10
base64_main                                          221     211     -10
arping_main                                         1665    1655     -10
ar_main                                              556     546     -10
adjtimex_main                                        406     396     -10
adduser_main                                         882     872     -10
addgroup_main                                        411     401     -10
acpid_main                                          1198    1188     -10
optstring                                             11       -     -11
opt_string                                            18       -     -18
OPT_STR                                               25       -     -25
ubi_tools_main                                      1288    1258     -30
ls_options                                            31       -     -31
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 3/129 up/down: 86/-1383)      Total: -1297 bytes
   text	   data	    bss	    dec	    hex	filename
 915428	    485	   6876	 922789	  e14a5	busybox_old
 914629	    485	   6872	 921986	  e1182	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-08 21:55:02 +02:00
Denys Vlasenko
9536ef7c98 makedevs: make it NOEXEC
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-08-06 21:47:07 +02:00
Denys Vlasenko
72089cf6b4 config: deindent all help texts
Those two spaces after tab have no effect, and always a nuisance when editing.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-21 09:50:55 +02:00
Denys Vlasenko
4eed2c6c50 Update menuconfig items with approximate applet sizes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-18 22:01:24 +02:00
Denys Vlasenko
3c9688e587 makedevs: code shrink
function                                             old     new   delta
makedevs_main                                       1071    1052     -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-06 02:17:24 +02:00
Denys Vlasenko
3532e60ca8 makedevs: allow much longer filenames
function                                             old     new   delta
makedevs_main                                       1056    1071     +15

Patch by Kang-Che Sung <explorer09@gmail.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2017-07-06 02:04:32 +02:00
Denys Vlasenko
1d3a04a3a4 Code style fixes, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-28 01:22:57 +01:00
Denys Vlasenko
2c769c69b2 makedevs: make special node creation idempotent
When makedevs is called for a second time with the same device file,
it fails because the files already exist and mknod() gives -EEXIST.

Ignore EEXIST errors.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-27 23:27:54 +01:00
Denys Vlasenko
f88e3bfa8d Convert all miscutils/* applets to "new style" applet definitions
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-22 23:54:17 +01:00
Denys Vlasenko
fb4da16711 Split miscutils/Config.src items into miscutils/*.c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-11-22 23:14:24 +01:00
Bernhard Reutner-Fischer
14f55538f0 makedevs: fix help-text
pull
http://git.buildroot.net/buildroot/commit/?id=99ead3c2ead605d6504b9abad111778dc2a93ae6

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2011-05-30 23:00:47 +02:00
Pere Orga
5bc8c005a8 move remaining help text from include/usage.src.h
Signed-off-by: Pere Orga <gotrunks@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-11 03:29:49 +02:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Denys Vlasenko
0ef64bdb40 *: make GNU licensing statement forms more regular
This change retains "or later" state! No licensing _changes_ here,
only form is adjusted (article, space between "GPL" and "v2" and so on).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16 20:14:46 +02:00
Denys Vlasenko
7783248eaa *: s/xatoi_u/xatoi_positive/g - I got bored of mistyping xatoi_u as xatou_i
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-12 14:14:45 +02:00
Denys Vlasenko
651a2697f7 *: merge some common strings
text   data    bss    dec    hexfilename
 838650   8009      0 846659  ceb43busybox_old
 838519   8009      0 846528  ceac0busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-23 16:25:17 +01:00
Denis Vlasenko
b2dc913527 makedevs: shrink by Vladimir
function                                             old     new   delta
makedevs_main                                       1071    1049     -22
packed_usage                                       24744   24708     -36
2008-08-03 22:14:02 +00:00
Denis Vlasenko
e1fa817995 makedevs: shrink (by Vladimir); testsuite
function                                             old     new   delta
makedevs_main                                       1153    1071     -82
2008-08-01 02:15:05 +00:00
Denis Vlasenko
5415c856ea libbb: [x]fopen_for_{read,write} introduced and used.
(by Valdimir)

function                                             old     new   delta
config_open2                                           -      41     +41
config_read                                          507     542     +35
find_pair                                            169     187     +18
fopen_for_write                                        -      14     +14
fopen_for_read                                         -      14     +14
find_main                                            406     418     +12
xfopen_for_write                                       -      10     +10
xfopen_for_read                                        -      10     +10
popstring                                            134     140      +6
parse_inittab                                        396     401      +5
next_token                                           923     928      +5
pack_gzip                                           1659    1661      +2
bb__parsespent                                       117     119      +2
fallbackSort                                        1719    1717      -2
evalvar                                             1376    1374      -2
qrealloc                                              36      33      -3
...
...
...
...
singlemount                                         4579    4569     -10
process_stdin                                        443     433     -10
patch_main                                          1111    1101     -10
ifupdown_main                                       2175    2165     -10
file_action_grep                                      90      80     -10
uuidcache_init                                       649     637     -12
hush_main                                            797     785     -12
read_config                                          230     217     -13
dpkg_main                                           3835    3820     -15
read_line_input                                     3134    3110     -24
sysctl_main                                          232     203     -29
config_open                                           40      10     -30
WARN_BAD_LINE                                         44       -     -44
login_main                                          1714    1575    -139
------------------------------------------------------------------------------
(add/remove: 5/1 grow/shrink: 8/74 up/down: 174/-737)        Total: -563 bytes
2008-07-21 23:05:26 +00:00
Denis Vlasenko
6b06cb80be more of -Wall fixes from Cristian Ionescu-Idbohrn.
Some are fixing real bugs.

function                                             old     new   delta
syslogd_main                                         938     958     +20
get_signum                                           136     143      +7
obj_load                                             777     782      +5
recv_from_to                                         210     214      +4
get_next_block                                      1795    1799      +4
display_topmem_process_list                         1117    1121      +4
logread_main                                         484     487      +3
buffer_fill_and_print                                 73      76      +3
kill_main                                            687     689      +2
ll_remember_index                                    240     241      +1
do_stats                                             452     453      +1
if_readconf                                          166     165      -1
display_process_list                                1192    1191      -1
run_applet_and_exit                                  507     505      -2
print_signames                                        33      31      -2
parse_one_line                                      1092    1090      -2
find_out_spec                                         57      55      -2
add_ksymoops_symbols                                 421     419      -2
ash_main                                            1407    1402      -5
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 11/8 up/down: 54/-17)            Total: 37 bytes
2008-05-15 21:30:45 +00:00
Denis Vlasenko
8ee649a02e *: more uniform naming: s/xmalloc_getline/xmalloc_fgetline/ 2008-03-26 20:04:27 +00:00
Denis Vlasenko
9b49a5ed85 add -fvisibility=hidden to CC flags, mark XXX_main functions
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
fe7cd642b0 don't pass argc in getopt32, it's superfluous
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes
   text    data     bss     dec     hex filename
 773469    1058   11092  785619   bfcd3 busybox_old
 772644    1058   11092  784794   bf99a busybox_unstripped
2007-08-18 15:32:12 +00:00
Denis Vlasenko
e324184c05 s/#ifdef CONFIG_/#if ENABLE_/g 2007-08-13 10:36:25 +00:00
Denis Vlasenko
b6adbf1be2 usage.c: remove reference to busybox.h
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
51742f4bb0 style fixes. No code changes 2007-04-12 00:32:05 +00:00
Denis Vlasenko
06af216528 suppress warnings about easch <applet>_main() having
no preceding prototype
2007-02-03 17:28:39 +00:00
Bernhard Reutner-Fischer
7b1f23610f - use makedev to get device number, else it gives wrong major/minor numbers to devices files on systems which use big device numbers.
Closes #919
2007-01-21 11:20:01 +00:00
Denis Vlasenko
9a44c4f91c bb_xget[pw/gr]nam were horribly misnamed - fixed.
uidgid_get -> get_uidgid, add additional param
(numeric_ok). Make chown use it.
chown: fix "chown user: ...."
install: fix incorrect use of bb_xget[pw/gr]nam
2006-12-28 05:44:47 +00:00
Denis Vlasenko
e1a0d486e4 message string changes, mostly for consistency, also -32 bytes in .rodata 2006-10-20 13:28:22 +00:00
Denis Vlasenko
ea62077b85 add open_read_close() and similar stuff 2006-10-14 02:23:43 +00:00
Denis Vlasenko
2d5ca60bfb bb_get_[chomped]line_from_file wasn't descriptive enough.
Renaming...
2006-10-12 22:43:20 +00:00
Denis Vlasenko
1385899416 attempt to regularize atoi mess. 2006-10-08 12:49:22 +00:00
Denis Vlasenko
67b23e6043 getopt_ulflags -> getopt32.
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Denis Vlasenko
6d655be5df removed a lot of trailing \n in bb_msg() calls. It is added
automatically by function itself.
2006-09-06 19:02:46 +00:00
Bernhard Reutner-Fischer
d591a360d3 - merge -r15463:15564 from busybox_scratch branch through these changesets:
------------------------------------------------------------------------
r15465 | aldot | 2006-06-21 20:48:06 +0200 (Wed, 21 Jun 2006) | 3 lines

- use CONFIG_BUSYBOX_EXEC_PATH as before it one was broken by a recent revert.
- use xchdir() since all is invain if it fails there anyways, supposedly

------------------------------------------------------------------------
r15466 | aldot | 2006-06-21 20:55:16 +0200 (Wed, 21 Jun 2006) | 2 lines

- adjust docs to take CONFIG_BUSYBOX_EXEC_PATH into account.

------------------------------------------------------------------------
r15467 | aldot | 2006-06-21 21:31:24 +0200 (Wed, 21 Jun 2006) | 18 lines

- partial fallout of my TREE_USED touchup against gcc-4.2: rip unused vars, save
s 144 bytes
   text    data     bss     dec     hex filename
 862434   10156  645924 1518514  172bb2 busybox.old
 862322   10156  645892 1518370  172b22 busybox
function                                             old     new   delta
z_len                                                  4       -      -4
textend                                                4       -      -4
part_nb                                                4       -      -4
insize                                                 4       -      -4
ifile_size                                             4       -      -4
do_link                                                4       -      -4
new_text                                              70      60     -10
ipaddr_list_link                                      33      23     -10
gzip_main                                            898     822     -76
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/3 up/down: 0/-120)           Total: -120 bytes


------------------------------------------------------------------------
r15468 | aldot | 2006-06-21 21:43:05 +0200 (Wed, 21 Jun 2006) | 19 lines

- remove useless global exports
function                                             old     new   delta
rpm_main                                             940    1601    +661
rpm_getstring                                        107     112      +5
rpm_getint                                           148     153      +5
loop_through_files                                   103     106      +3
fileaction_dobackup                                  115     113      -2
fileaction_list                                        5       -      -5
rpm_getcount                                          42       -     -42
extract_cpio_gz                                      161       -    -161
rpm_gettags                                          504       -    -504
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 4/1 up/down: 674/-714)          Total: -40 bytes

   text    data     bss     dec     hex filename
 862322   10156  645892 1518370  172b22 busybox.old
 862290   10156  645892 1518338  172b02 busybox


------------------------------------------------------------------------
r15555 | aldot | 2006-06-30 14:10:11 +0200 (Fri, 30 Jun 2006) | 22 lines

- shrink syslog a little bit, move a big buffer (for 'line') off the bss, fold s
emaphore stuff into single caller manually.
  stats:
function                                             old     new   delta
logMessage                                           395     427     +32
message                                             1245    1257     +12
opts                                                   -       4      +4
small                                                  1       -      -1
local_logging                                          4       -      -4
doRemoteLog                                            4       -      -4
circular_logging                                       4       -      -4
syslogd_main                                        1299    1285     -14
static.res                                            36      16     -20
.rodata                                           186650  186586     -64
static.line                                         1025       -   -1025
------------------------------------------------------------------------------
(add/remove: 1/5 grow/shrink: 2/3 up/down: 48/-1136)        Total: -1088 bytes
cow@s37:~/src/busybox_scratch$ size sysklogd/syslogd.o{.orig,}
   text    data     bss     dec     hex filename
   3723     348    5242    9313    2461 sysklogd/syslogd.o.orig
   3697     348    4188    8233    2029 sysklogd/syslogd.o

==============================================================================
Overall bloatcheck for the changeset mentioned above:
function                                             old     new   delta
rpm_main                                             953    1608    +655
logMessage                                           395     427     +32
message                                             1245    1257     +12
opts                                                   -       4      +4
rpm_getstring                                        107     110      +3
rpm_getint                                           148     151      +3
loop_through_files                                   103     104      +1
small                                                  1       -      -1
fileaction_dobackup                                  115     113      -2
z_len                                                  4       -      -4
textend                                                4       -      -4
part_nb                                                4       -      -4
local_logging                                          4       -      -4
insize                                                 4       -      -4
ifile_size                                             4       -      -4
do_link                                                4       -      -4
doRemoteLog                                            4       -      -4
circular_logging                                       4       -      -4
fileaction_list                                        5       -      -5
new_text                                              70      60     -10
ipaddr_list_link                                      33      23     -10
clear_bufs                                            31      21     -10
syslogd_main                                        1287    1273     -14
builtin_help                                         190     176     -14
static.res                                            36      16     -20
builtin_source                                       229     199     -30
rpm_getcount                                          42       -     -42
gzip_main                                            842     786     -56
.rodata                                           227176  227112     -64
lash_main                                            609     527     -82
busy_loop                                           3883    3739    -144
extract_cpio_gz                                      155       -    -155
rpm_gettags                                          501       -    -501
static.line                                         1025       -   -1025
------------------------------------------------------------------------------
(add/remove: 1/15 grow/shrink: 6/12 up/down: 710/-2221)     Total: -1511 bytes
2006-08-20 17:35:13 +00:00
Rob Landley
d921b2ecc0 Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes...  General cleanup pass.  What I've
been doing for the last couple days.

And it conflicts!  I've removed httpd.c from this checkin due to somebody else
touching that file.  It builds for me.  I have to catch a bus.  (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
Bernhard Reutner-Fischer
c89982dcd7 - move #include busybox.h to the very top so we pull in the config
and eventual platform specific includes in early.
2006-06-03 19:49:21 +00:00
Bernhard Reutner-Fischer
56fbd21fa7 - return ret so we return something meaningful. 2006-04-24 17:41:29 +00:00
Bernhard Reutner-Fischer
d9cf7ac781 - patch from Denis Vlasenko to add and use bb_xchdir() 2006-04-12 18:39:58 +00:00
Bernhard Reutner-Fischer
771b186406 - commentary typos 2006-03-24 14:30:05 +00:00
Rob Landley
dfba741457 Robert P. Day removed 8 gazillion occurrences of "extern" on function
definitions.  (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Bernhard Reutner-Fischer
17329745fc - fix check for group and user, remove some whitespace while at it. 2005-12-21 15:07:30 +00:00
Rob Landley
1b751c894b Rob Sullivan sent in some cleanups, which I beat on slightly. 2005-10-28 09:24:33 +00:00
Bernhard Reutner-Fischer
d5bd137a24 - rename libbb's password helpers as suggested in libbb.h
my_getpwnam -> bb_xgetpwnam  /* dies on error */
  my_getgrnam -> bb_xgetgrnam  /* dies on error */
  my_getgrgid -> bb_getgrgid
  my_getpwuid -> bb_getpwuid
  my_getug    -> bb_getug
2005-09-20 21:06:17 +00:00
Eric Andersen
90161c9213 Fixup makedevs to handle regular files, and also fix
it to properly update file permissions as specified.
2005-07-18 22:40:59 +00:00
Eric Andersen
2ada89b60f a bit more polish 2005-07-18 09:45:35 +00:00
Eric Andersen
54e57da96a a bit of polish on makedevs 2005-07-18 09:42:37 +00:00
Eric Andersen
e8614dbcd7 Fixup device table based makedevs so it actually works 2005-07-18 09:28:36 +00:00