Commit Graph

509 Commits

Author SHA1 Message Date
Peter Korsgaard
ddd1ec1c27 getty: wait up to 5 seconds for the output buffer to drain
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 15:15:19 +01:00
Denys Vlasenko
3ff9be31be getty: document bits we don't set - maybe we should set some of them?
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 11:28:43 +01:00
Denys Vlasenko
d7c25e98bf getty: add ECHOE explanation
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 03:31:23 +01:00
Denys Vlasenko
d8494934a7 getty: explain every bit in termios; remove redundant stuff in termios_final
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-26 03:26:38 +01:00
Denys Vlasenko
8d0e0cdadf move utmp.h include to libbb.h
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-25 23:21:46 +01:00
Denys Vlasenko
136091886e getty: flush _only_ input after switching to the next baud rate
It was originally like this, but at some point TCIFLUSH was
inadvertently changed to TCIOFLUSH.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 23:45:22 +01:00
Denys Vlasenko
7073964b5f getty: simplify macros; improve VSWTC[H] compat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 18:17:19 +01:00
Denys Vlasenko
faaf8cb3fa getty: more simplifications; explain how we treat parity now
function                                             old     new   delta
getty_main                                          1471    1434     -37

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 14:35:09 +01:00
Denys Vlasenko
6596380f52 getty: simplify code by going to more straignforward G trick
function                                             old     new   delta
getty_main                                          1615    1475    -140

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 04:43:04 +01:00
Denys Vlasenko
dc6cd12569 getty: add sleep before initial tcdrain; reduce another sleep from 1 to 0.1s
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 00:28:43 +01:00
Denys Vlasenko
1f0840450e getty: use cfsetspeed to save some bytes; cosmetic fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-24 00:16:50 +01:00
Denys Vlasenko
006416e8fe getty: more correct check for O_RDWR
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22 17:29:53 +01:00
Denys Vlasenko
2b57b6cd43 getty: comment out parity detection code; improve usage text
function                                             old     new   delta
packed_usage                                       28155   28191     +36
static.erase                                          12       -     -12
getty_main                                          1847    1621    -226
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 1/1 up/down: 36/-238)          Total: -202 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-22 03:06:40 +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
3b5acaa432 disable automatic selection of FEATURE_SUID; improve its help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-18 13:52:48 +01:00
Denys Vlasenko
bcdb9b8762 getty: fix -i (was ignored)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-01-09 21:44:51 +01:00
Denys Vlasenko
a9e25ffa67 su: document -l in --help text. Closes bug 2761
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-31 02:52:35 +01:00
Ian Wienand
260fb551ff login: apply PAM environment
login should apply the PAM environment modified by plugins
such as pam_env.  Other 'login's do a similar thing.

I tested this by setting some env variables with pam_env which were
correctly applied.

Signed-off-by: Ian Wienand <ianw@vmware.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-12-27 02:13:06 +01:00
Denys Vlasenko
631fd5ccd7 su: suppress "warning: unused variable 'user_buf'"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-30 09:47:56 +01:00
Tito Ragusa
a8dc97cb82 deluser: do not warn spuriously when deleting group by deluser
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-08 05:47:04 +01:00
Denys Vlasenko
e057b0f94f delgroup: correct the check for users who still use the group
Signed-off-by: Tito <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-11-07 17:51:58 +01:00
Denys Vlasenko
f595d8ed46 typo fix
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-06 22:17:30 +01:00
Tito Ragusa
1586c7a92c deluser: 2nd attempt at deluser/delgroup size reduction and improvements
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-11-06 22:14:55 +01:00
Denys Vlasenko
e4dcba1c10 *: whitespace fixes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 18:57:19 +02:00
Alexander Shishkin
78b286fea5 login: free fromhost upon cleaning up
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-28 05:49:55 +02:00
Denys Vlasenko
5360059131 libbb: introduce and use strcpy_and_process_escape_sequences
function                                             old     new   delta
strcpy_and_process_escape_sequences                    -      50     +50
bb_process_escape_sequence                           148     138     -10
printf_main                                          789     776     -13
getty_main                                          1897    1831     -66
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/3 up/down: 50/-89)            Total: -39 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-10-23 21:06:06 +02:00
Denys Vlasenko
ff19d525a9 add/remove-shell: use O_TRUNC instead of O_EXCL
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-20 15:14:32 +02:00
Alexander Shishkin
5be79ff27a add-shell, remove-shell: new applets
function                                             old     new   delta
add_remove_shell_main                                  -     259    +259
packed_usage                                       27408   27438     +30
applet_names                                        2326    2349     +23
applet_main                                         1364    1372      +8
applet_nameofs                                       682     686      +4
run_applet_and_exit                                  700     703      +3
dont_add                                               -       2      +2
applet_install_loc                                   171     172      +1
------------------------------------------------------------------------------
(add/remove: 3/0 grow/shrink: 6/0 up/down: 330/0)             Total: 330 bytes

Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-10-20 13:22:58 +02:00
Denys Vlasenko
6e852408a9 deluser: use the same licensing template in the header as other files do
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-09-30 18:51:25 +02:00
Harald Becker
361b1a6884 deluser: make it simpler, fix inability to delete user from group
Also makes menuconfig order more sensible

Signed-off-by: Harald Becker <ralda@gmx.de>
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-22 18:03:29 +02:00
Denys Vlasenko
9dc04124d5 getty: small code shrink
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
2010-09-01 11:31:43 +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
Jeremie Koenig
68fca4cd55 vlock: disable linux console calls on other systems
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-30 03:03:29 +02:00
Denys Vlasenko
f3ea792bad *: mass cosmetic removal of extra empty lines. no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-26 01:06:14 +02:00
Jeremie Koenig
f812eace18 init,loginutils: termios portability fixes
Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:45:42 +02:00
Jeremie Koenig
1d7266d3b5 mark Linux-specific configuration options
PLATFORM_LINUX is used as a dependency for applets or features
which require Linux-specific interfaces.

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-07-19 00:44:56 +02:00
Ladislav Michl
a73b87e934 *: s/"/bin/sh"/DEFAULT_SHELL, run_shell() API fix, remove unneeded strdup
function                                             old     new   delta
run_shell                                            157     166      +9
su_main                                              477     470      -7
sulogin_main                                         515     503     -12

Signed-off-by: Ladislav Michl <Ladislav.Michl@seznam.cz>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-27 03:23:31 +02:00
Denys Vlasenko
d70e0e995e *: add INSERTs to *.src files where appropriate
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-08 12:15:11 +02:00
Denys Vlasenko
729ecb87bf bbconfig: make it independent from printf functions
function                                             old     new   delta
full_write2_str                                        -      25     +25
full_write1_str                                        -      25     +25
clear_main                                            21      20      -1
telnet_main                                         1488    1477     -11
getty_main                                          1932    1918     -14
full_write22_str                                      25       -     -25
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 0/3 up/down: 50/-51)             Total: -1 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-07 14:14:26 +02:00
Denys Vlasenko
2f32bf8be6 remove defconfig. Now "make defconfig" simply uses defaults from Config.in
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-06 04:14:28 +02:00
Denys Vlasenko
da929a95aa mass renaming Kbuild -> Kbuild.src, Config.in -> Config.src
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-06-04 20:10:51 +02:00
Denys Vlasenko
765b0eed3e getty: do not emit bogus error message on EOF
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-22 21:17:46 +02:00
Denys Vlasenko
f8d8aa1cea libbb: add skip_dev_pfx()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 18:50:05 +02:00
Denys Vlasenko
6dbbac5d4f Move utmp/wtmp support to "General configuration" section
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 18:48:32 +02:00
Denys Vlasenko
3a41611bc5 telnetd: write LOGIN/DEAD_PROCESS utmp records. Closes bug 1363
function                                             old     new   delta
write_new_utmp                                         -     253    +253
skip_dev_pfx                                           -      30     +30
handle_sigchld                                        42      72     +30
telnetd_main                                        1650    1673     +23
make_new_session                                     415     438     +23
...
login_main                                          1140    1148      +8
update_utmp                                          337     313     -24
write_wtmp                                           220     154     -66
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 11/6 up/down: 406/-115)         Total: ~291 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-05 22:10:38 +02:00
Denys Vlasenko
37f5bef63c libbb: split update_utmp from login/getty in preparation to use it for telnetd
function                                             old     new   delta
update_utent                                           -     339    +339
login_main                                          1498    1128    -370
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/1 up/down: 339/-370)          Total: -31 bytes

function                                             old     new   delta
update_utmp                                          246     337     +91
login_main                                          1128    1140     +12
getty_main                                          1908    1918     +10
...
update_utent                                         339       -    -339
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 5/6 up/down: 119/-368)         Total: -249 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-05 03:18:40 +02:00
Denys Vlasenko
4c721049c3 who: fix attempts to open '/dev/dev/ttyX'; make columns a bit wider, add -H
function                                             old     new   delta
who_main                                             292     363     +71

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-04 23:45:09 +02:00
Denys Vlasenko
26ffe81188 su: move restricted_shell into su.c (the only user)
function                                             old     new   delta
su_main                                              448     468     +20
buffer_fill_and_print                                179     196     +17
scriptreplay_main                                    205     208      +3
localcmd                                             275     277      +2
hash_find                                            233     234      +1
devmem_main                                          469     463      -6
install_main                                         724     716      -8
setusershell                                          11       -     -11
find_pair                                            187     169     -18
restricted_shell                                      49       -     -49
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 5/3 up/down: 43/-92)            Total: -49 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26 10:01:18 +01:00
Denys Vlasenko
fd686a262f setup_environment(): eliminate one parameter
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-26 09:52:45 +01:00
Bernhard Reutner-Fischer
99709ab033 crontab: use setup_environment
function                                             old     new   delta
setup_environment                                    184     198     +14
.rodata                                           131770  131747     -23
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 14/-23)             Total: -9 bytes

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2010-02-26 09:31:40 +01:00
Denys Vlasenko
cb7edc2661 adduser: copy /etc/skel to mew homes. +100 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-06 21:50:59 +01:00
Denys Vlasenko
c8e18ca12c remove now-unneeded memset
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-01 13:45:04 +01:00
Denys Vlasenko
38d3e64d25 adduser: create a group for net user too
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-10 04:25:05 +01:00
Denys Vlasenko
8ced1e5dc5 passwd: do not complain about /etc/shadow needlessly
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 22:21:55 +01:00
Denys Vlasenko
4653e442ba adduser: more fixes to "add user to specified group"
function                                             old     new   delta
update_passwd                                       1246    1295     +49
adduser_main                                         727     725      -2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 20:57:06 +01:00
Tito Ragusa
0681137972 adduser: fix a logical inversion which made -G GRP inoperative
Signed-off-by: Tito Ragusa <farmatito@tiscali.it>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-01-09 18:08:35 +01:00
Denys Vlasenko
8684cbb5cc libbb: robustify isXXXX(). +39 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-18 11:34:43 +01:00
Denys Vlasenko
6331cf059c *: use "can't" instead of "cannot"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-13 09:08:27 +01:00
Denys Vlasenko
c6fb2a6b5f passwd: do not complain if /etc/shadow is missing
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 19:18:49 +01:00
Denys Vlasenko
8131eea3dc *: introduce and use ffulsh_all()
function                                             old     new   delta
buffer_fill_and_print                                179     196     +17
fflush_all                                             -       9      +9
spawn                                                 87      92      +5
rtcwake_main                                         455     453      -2
...
alarm_intr                                            93      84      -9
readcmd                                             1072    1062     -10
bb_ask                                               345     333     -12
more_main                                            845     832     -13
flush_stdout_stderr                                   42      23     -19
xfflush_stdout                                        27       -     -27
flush_stderr                                          30       -     -30
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/50 up/down: 31/-397)         Total: -366 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02 14:19:51 +01:00
Denys Vlasenko
85ca327529 *: random code shrink
function                                             old     new   delta
alarm_handler                                         50      46      -4
ask                                                  228     211     -17
rtcwake_main                                         474     455     -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-29 13:27:31 +01:00
Denys Vlasenko
f2cbb03a37 *: optimize most of isXXXXX() macros
text    data     bss     dec     hex filename
 824164     453    6812  831429   cafc5 busybox_old
 823730     453    6812  830995   cae13 busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 03:16:08 +02:00
Denys Vlasenko
adf922ec28 *: a few more NOINLINEs
function                                             old     new   delta
print_linkinfo                                         -     815    +815
do_msg                                                 -     783    +783
INET_setroute                                          -     757    +757
varvalue                                               -     746    +746
do_sem                                                 -     637    +637
inflate_codes                                          -     617    +617
INET6_setroute                                         -     491    +491
edir                                                   -     370    +370
sync_cursor                                            -     298    +298
update_utmp                                            -     246    +246
searchLines                                            -     165    +165
setup_alarm                                            -     144    +144
may_wakeup                                             -     101    +101
getNum                                               566     371    -195
refresh                                             1166     848    -318
rtcwake_main                                         809     479    -330
getty_main                                          2396    1921    -475
chpst_main                                          1373     746    -627
inflate_unzip_internal                              1335     567    -768
evalvar                                             1384     612    -772
ipaddr_list_or_flush                                2160    1246    -914
route_main                                          1585     245   -1340
ipcs_main                                           2523    1049   -1474
------------------------------------------------------------------------------
(add/remove: 13/0 grow/shrink: 0/10 up/down: 6170/-7213)    Total: -1043 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08 14:35:37 +02:00
Denys Vlasenko
c297ea97e2 login: log PAM errors to syslog, not stderr
By Ian Wienand (ianw AT vmware.com)

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-25 01:50:45 +02:00
Denys Vlasenko
d069e5398d a few more GCC-isms removed
text    data     bss     dec     hex filename
 824641     458    6956  832055   cb237 busybox_old
 824631     458    6956  832045   cb22d busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-09 23:12:10 +02:00
Denys Vlasenko
2907e79749 add comment about /etc/gshadow, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-13 01:27:47 +02:00
Denys Vlasenko
189f74d0f2 passwd + /etc/shadow: chage "change time" field too
function                                             old     new   delta
update_passwd                                       1171    1270     +99

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-13 01:15:30 +02:00
Denys Vlasenko
09e63bb81f df: fix "df /"
also, clean up mount checks in mkfs/fsck.

function                                             old     new   delta
find_mount_point                                     243     261     +18
sha1_process_block64                                 497     510     +13
find_main                                            436     444      +8
display_speed                                         85      90      +5
df_main                                              795     793      -2
parse_command                                       1463    1460      -3
static.ignored_mounts                                  8       -      -8
mkfs_minix_main                                     2962    2937     -25
fsck_minix_main                                     3065    2970     -95
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/4 up/down: 44/-133)           Total: -89 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 04:50:36 +02:00
Denys Vlasenko
9b1b62adc4 Patches to enable FreeBSD build
platform.h: fix wrong check for endianness, fix lchown
aliasing to chown on uclibc.

Code seems to not be affected in my testing.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-07-05 03:34:12 +02:00
Denys Vlasenko
f3b92d3856 getopt: FEATURE_GETOPT_LONG for -l; rename GETOPT_LONG to LONG_OPTS
Signed-off-by: Colin Watson <cjwatson@ubuntu.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-19 12:10:38 +02:00
Denys Vlasenko
bf2af9acb2 flash_lock, flash_unlock: new applets
By Thierry Reding (thierry.reding AT avionic-design.de)

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-25 04:15:37 +02:00
Denys Vlasenko
1b0a93edb9 adduser/addgroup: make system id range configurable.
By Tito (farmatito AT tiscali.it).

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-14 00:23:34 +02:00
Denis Vlasenko
c2931aa2df adduser/addgroup: support specifying uid/gid, add system
account creation mode. By Tito.

function                                             old     new   delta
adduser_main                                         650     726     +76
addgroup_main                                        341     402     +61
addgroup_longopts                                      -      16     +16
adduser_longopts                                      97     103      +6
packed_usage                                       26161   26163      +2
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 161/0)             Total: 161 bytes
2009-04-22 21:35:52 +00:00
Denis Vlasenko
f9d4fc3cf8 switch_root: improve behavior on error; improve help text
*: make "can't execute '%s'" message uniform
2009-04-21 20:40:51 +00:00
Denis Vlasenko
5e34ff29bc *: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
2009-04-21 11:09:40 +00:00
Denis Vlasenko
7223424815 pointless whitespace/comment fixes, no code changes 2009-04-14 09:58:11 +00:00
Denis Vlasenko
829bbd3b57 *: unify concurrent-safe update of /etc/{passwd,group,[g]shadow}
by Tito (farmatito AT tiscali.it)

function                                             old     new   delta
update_passwd                                        743    1171    +428
bb_perror_nomsg                                        -       9      +9
find_main                                            436     444      +8
passwd_main                                         1023    1027      +4
nameval                                              202     206      +4
chpasswd_main                                        315     319      +4
bb__parsespent                                       119     117      -2
adduser_main                                         654     650      -4
addgroup_main                                        345     341      -4
sv_main                                             1228    1222      -6
deluser_main                                         173     160     -13
bb_internal_putpwent                                  69       -     -69
add_user_to_group                                    231       -    -231
del_line_matching                                    460      31    -429
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 5/6 up/down: 457/-758)         Total: -301 bytes
2009-04-14 00:51:05 +00:00
Denis Vlasenko
32a385f5b0 getty: fix handling of speed 0;
stop using non-portable way of setting speeds.

function                                             old     new   delta
cfsetispeed                                            -      76     +76
cfsetospeed                                            -      57     +57
cfgetispeed                                            -      20     +20
2009-04-12 13:05:40 +00:00
Mike Frysinger
fe013a74ff patch by Stuart Hughes <seh@zee2.com> and Guenter <lists@gknw.net> to make "0" a special baud rate for getty where it uses this as "leave baud rate unchanged" 2009-04-09 07:08:04 +00:00
Denis Vlasenko
3266aa9ec2 trailing whitespace removal 2009-04-01 11:24:04 +00:00
Denis Vlasenko
a2333c8938 randomtest fixes 2009-03-28 19:08:23 +00:00
Denis Vlasenko
54ac03a618 *: remove LOG_NOWAIT 2009-03-11 15:59:49 +00:00
Denis Vlasenko
73c571a5ff *: move get_sock_lsa and xwrite_str to libbb, use where appropriate
function                                             old     new   delta
get_sock_lsa                                           -      72     +72
buffer_fill_and_print                                179     196     +17
parse_expr                                           824     832      +8
read_base64                                          343     348      +5
nameval                                              202     206      +4
fbset_main                                          1694    1698      +4
expand                                              1849    1853      +4
udhcp_send_kernel_packet                             249     252      +3
udhcp_get_option                                     223     222      -1
chat_main                                           1246    1245      -1
pack_gzip                                           1661    1659      -2
doset                                                299     297      -2
bb__parsespent                                       119     117      -2
test_main                                            260     257      -3
qgravechar                                           109     106      -3
tcpudpsvd_main                                      1834    1830      -4
sysctl_display_all                                   589     580      -9
xopen_xwrite_close                                    44      33     -11
prs                                                   30      18     -12
find_main                                            418     406     -12
full_write2_str                                       25      12     -13
adduser_main                                         667     654     -13
evaltreenr                                           817     802     -15
evaltree                                             817     802     -15
tftpd_main                                           526     493     -33
ftpd_main                                           2050    1990     -60
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 7/18 up/down: 117/-211)         Total: -94 bytes
2009-03-09 00:12:37 +00:00
Denis Vlasenko
8e5de2aab7 login: fix buglet introduced by "simplification" 2009-02-24 17:10:24 +00:00
Denis Vlasenko
512c8ae053 login: small simplification by Walter Harms. -10 bytes 2009-02-02 00:15:57 +00:00
Denis Vlasenko
4eff8efa59 login: cleanup work by Walter Harms. No logic changes. 2009-02-02 00:15:00 +00:00
Denis Vlasenko
f478fde33c adduser: allow adding to group 0; don't _create_ /etc/shadow,
only append data if it exists.

function                                             old     new   delta
adduser_main                                         642     667     +25
2009-01-12 09:20:49 +00:00
Bernhard Reutner-Fischer
e44a4e316d - isascii() is obsolescent in SUSv4 and furthermore looks redundant in this spot 2009-01-09 14:49:11 +00:00
Denis Vlasenko
4e12b1a2a9 libbb: introduce and use xmalloc_ttyname (-32 in bss).
ash: small code shrink

   text    data     bss     dec     hex filename
 793669     504    7524  801697   c3ba1 busybox_old
 793659     504    7492  801655   c3b77 busybox_unstripped
2008-12-23 23:36:47 +00:00
Denis Vlasenko
db12d1d733 Fix forgotten license comments 2008-12-07 00:52:58 +00:00
Denis Vlasenko
15437e3e2a libbb: add xgetgrnam too. ~0 code size change 2008-12-05 16:23:06 +00:00
Bernhard Reutner-Fischer
9c6d12993f - -4b and use proper define; add license note 2008-12-04 14:19:21 +00:00
Denis Vlasenko
e45930e890 Fold mkpasswd applet into cryptpw.
mkpasswd is in Debian, OTOH cryptpw was added to busybox earlier.
Trying to make both camps happy by making those two applets just aliases.
They are command-line compatible. We can decide whether we want to drop one
(and which one) later.

function                                             old     new   delta
cryptpw_main                                         183     314    +131
static.methods                                        21       -     -21
packed_usage                                       25707   25648     -59
mkpasswd_main                                        307       -    -307
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/1 up/down: 131/-387)         Total: -256 bytes
2008-12-04 12:05:26 +00:00
Denis Vlasenko
d7a805efaf libbb: introduce and use xgetpwnam. ~ -150 bytes. 2008-12-03 19:05:55 +00:00
Bernhard Reutner-Fischer
82b1429966 - add new applet mkpasswd(1)
function                                             old     new   delta
bb_ask                                                 -     355    +355
mkpasswd_main                                          -     296    +296
.rodata                                           121746  121847    +101
packed_usage                                       24632   24689     +57
static.methods                                         -      21     +21
gmatch                                               229     248     +19
bb_ask_stdin                                           -      11     +11
applet_names                                        1949    1958      +9
applet_main                                         1172    1176      +4
sulogin_main                                         503     505      +2
applet_nameofs                                       586     588      +2
sha256_hash                                          329     327      -2
correct_password                                     208     206      -2
parse_command                                       1442    1439      -3
get_cred_or_die                                      145     141      -4
passwd_main                                         1054    1044     -10
bb_askpass                                           348       -    -348
------------------------------------------------------------------------------
(add/remove: 4/1 grow/shrink: 7/5 up/down: 877/-369)          Total: 508 bytes
2008-12-03 18:48:39 +00:00
Denis Vlasenko
0c68a874e7 libbb: password/group function helpers rewritten by Tito:
function                                             old     new   delta
xgetpwuid                                              -      27     +27
uid2uname_utoa                                         -      22     +22
gid2group_utoa                                         -      22     +22
uid2uname                                              -      18     +18
gid2group                                              -      18     +18
buffer_fill_and_print                                179     196     +17
print_user                                            12      24     +12
print_group                                           12      24     +12
get_cached                                            89      99     +10
...
print_common                                         134     120     -14
vlock_main                                           415     396     -19
logger_main                                          410     387     -23
crontab_main                                         642     609     -33
bb_getpwuid                                           42       -     -42
bb_getgrgid                                           42       -     -42
bb_getug                                              80       -     -80
------------------------------------------------------------------------------
(add/remove: 6/3 grow/shrink: 9/11 up/down: 187/-296)        Total: -109 bytes
2008-12-02 22:56:59 +00:00
Denis Vlasenko
9e0a7c9c41 remove a few superfluous includes 2008-11-25 13:33:11 +00:00
Denis Vlasenko
6b1e3d7e73 libbb: remove glibc-style bloat from sha_crypt. -1130 bytes.
cryptpw: add more difficult test vectors.
2008-11-13 12:23:46 +00:00
Denis Vlasenko
2211d5268c libbb: add optionl support for SHA256/512 encrypted passwords
function                                             old     new   delta
sha_crypt                                              -    2423   +2423
cryptpw_main                                         128     183     +55
to64                                                   -      29     +29
pw_encrypt                                           974    1000     +26
str_rounds                                             -      11     +11
login_main                                          1532    1541      +9
packed_usage                                       25215   25200     -15
__md5_to64                                            29       -     -29
------------------------------------------------------------------------------
(add/remove: 3/1 grow/shrink: 3/1 up/down: 2553/-44)         Total: 2509 bytes
2008-11-10 18:52:35 +00:00
Denis Vlasenko
3fa36e2350 *: a bit of code shrink
function                                             old     new   delta
stop_handler                                          41      38      -3
sulogin_main                                         508     504      -4
got_cont                                               4       -      -4
cont_handler                                          11       -     -11
startservice                                         309     297     -12
processorstart                                       423     409     -14
tcpudpsvd_main                                      1861    1843     -18
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/5 up/down: 0/-66)             Total: -66 bytes
2008-11-09 00:15:11 +00:00
Denis Vlasenko
73cc54388d move documentation to docs/ 2008-11-08 22:31:19 +00:00
Denis Vlasenko
2ec94a7ee8 login: fix /etc/nologin handling (should prohibit non-root LOGINS,
not running login by non-root). minor code shrink.

function                                             old     new   delta
login_main                                          1669    1602     -67
2008-11-07 12:59:31 +00:00
Denis Vlasenko
694b514148 login: fix /etc/nologin support
build system: fix config warnings ("Overlong line")

function                                             old     new   delta
login_main                                          1735    1774     +39
__libc_tcdrain                                         -      23     +23
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/0 up/down: 62/0)               Total: 62 bytes
2008-11-07 01:12:16 +00:00
Denis Vlasenko
202ac504e1 *: code shrink by adding a wrapper around very common tcsetattr(0, TCSANOW, xx) op
function                                             old     new   delta
tcsetattr_stdin_TCSANOW                                -      14     +14
set_sane_term                                        116     113      -3
top_main                                            1277    1273      -4
make_new_session                                     421     415      -6
rawmode                                              133     126      -7
reset_term                                            18      10      -8
die                                                   43      35      -8
cookmode                                              62      54      -8
vlock_main                                           425     415     -10
read_line_input                                     3165    3155     -10
bb_askpass                                           357     347     -10
fsck_minix_main                                     3079    3065     -14
getty_main                                          2375    2332     -43
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/12 up/down: 14/-131)         Total: -117 bytes
2008-11-05 13:20:58 +00:00
Denis Vlasenko
905ed8730f add serial HOWTO doc 2008-11-05 12:19:39 +00:00
Denis Vlasenko
40fdcbb270 more whitespace fixes 2008-10-29 01:20:13 +00:00
Denis Vlasenko
9504e444b8 whitespace fixes, no code changes 2008-10-29 01:19:15 +00:00
Denis Vlasenko
9725daa03a halt: reinstate -w even if !FEATURE_WTMP; beautify code in halt.c 2008-09-11 09:54:23 +00:00
Bernhard Reutner-Fischer
9b44613202 - don't free user-supplied string (via -e)
- fix helptext

function                                             old     new   delta
chpasswd_main                                        300     319     +19
packed_usage                                       24352   24344      -8
.rodata                                           122227  122195     -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/2 up/down: 19/-40)            Total: -21 bytes
2008-08-05 09:56:56 +00:00
Denis Vlasenko
084266ed52 fix several problems with config parser:
a bug where it underflows the string
 a bug where it never frees parser_t struct
make read_config() return 0 if parser is NULL,
 make config_close() accept and ignore NULL parser -
 eliminates many if() blocks
reverse the sense of parser bit flags - negative flags
 are harder to grok.
hexdump: revert the change to use config parser, it is BIGGER
 and also requires additional quirks in parser
*: explicitly use PARSER_NORMAL instead of 0

function                                             old     new   delta
login_main                                          1575    1596     +21
config_close                                          18      29     +11
bbunpack                                             383     391      +8
qgravechar                                           106     109      +3
rtnl_tab_initialize                                  121     117      -4
expand                                              1697    1693      -4
man_main                                             717     712      -5
nameif_main                                          674     668      -6
hexdump_main                                         597     591      -6
read_config                                          217     209      -8
dnsd_main                                           1478    1470      -8
sysctl_main                                          203     189     -14
config_open2                                          44      25     -19
make_device                                         1177    1141     -36
config_read                                          597     549     -48
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/11 up/down: 43/-158)         Total: -115 bytes
2008-07-26 23:08:31 +00:00
Bernhard Reutner-Fischer
3e8669f359 - wrap overlong lines (Cristian Ionescu-Idbohrn)
- s/\.  /. /g;# (me)
2008-07-22 18:27:53 +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
Bernhard Reutner-Fischer
d73cbd31a2 - first pass to unify/cleanup uid handling (-236b)
This needs further love, alot of love.. Tito?
2008-07-21 14:41:33 +00:00
Denis Vlasenko
c185e290ee config help fixes 2008-07-16 23:45:11 +00:00
Denis Vlasenko
a60f84ebf0 *: rename ATTRIBUTE_XXX to just XXX. 2008-07-05 09:18:54 +00:00
Denis Vlasenko
defc1ea340 *: introduce and use FAST_FUNC: regparm on i386, otherwise no-on
text    data     bss     dec     hex filename
 808035     611    6868  815514   c719a busybox_old
 804472     611    6868  811951   c63af busybox_unstripped
2008-06-27 02:52:20 +00:00
Denis Vlasenko
f45c4f41b7 whitespace and comment fixes, no code changes 2008-06-16 04:09:25 +00:00
Denis Vlasenko
57c899e4c2 even more of help text fixes 2008-06-15 20:15:27 +00:00
Denis Vlasenko
1dba30f2de fix config help text 2008-06-15 20:14:26 +00:00
Bernhard Reutner-Fischer
f54a088429 - fix copy'n paste error.
thanks, vda! :)
2008-06-15 19:02:31 +00:00
Denis Vlasenko
b4c5bf615e Specially for Bernhard Fischer introduce USE_BB_CRYPT
which selects between libc/custom crypt routines.
2008-06-15 18:35:34 +00:00
Denis Vlasenko
04087c6bbd cryptpw: fix "cryptpw -a des -- TEXT" case
libbb/pw_encrypt_des.c: optimize

function                                             old     new   delta
cryptpw_main                                         177     157     -20
des_crypt                                           1682    1512    -170
pw_encrypt                                          1036     842    -194
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-384)           Total: -384 bytes

Run tested.
2008-06-15 08:12:00 +00:00
Denis Vlasenko
fdddab0c61 make pw_encrypt() return malloc'ed string.
text    data     bss     dec     hex filename
 759802     604    6684  767090   bb472 busybox_old
 759804     604    6676  767084   bb46c busybox_unstripped
2008-06-12 16:56:52 +00:00
Denis Vlasenko
4ea83bf562 uclibc insists on having 70k static buffer for crypt.
For bbox it's not acceptable. Roll our own des and md5 crypt
implementation. Against older uclibc:

   text    data     bss     dec     hex filename
 759945     604    6684  767233   bb501 busybox_old
 759766     604    6684  767054   bb44e busybox_unstripped

so, we still save on code size.
2008-06-12 16:55:59 +00:00
Bernhard Reutner-Fischer
62d8503589 - use ut_user rather than ut_name (Cristian Ionescu-Idbohrn)
- use ut_tv.tv_sec rather than ut_time (me)
- shrink halt a little bit (me):
halt_main                                            464     433     -31
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-31)             Total: -31 bytes
2008-06-01 10:10:22 +00:00
Bernhard Reutner-Fischer
5e25ddb7d3 - use STD*_FILENO some more. No object-code changes 2008-05-19 09:48:17 +00:00
Bernhard Reutner-Fischer
636a1f85e8 - use EXIT_{SUCCESS,FAILURE}. No object-code changes 2008-05-19 09:29:47 +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
c93b162248 patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)
*: removal of #include <getopt.h>
2008-03-23 22:55:25 +00:00
Denis Vlasenko
a7d6c8bab9 adduser/addgroup: check username for invalid chars
(by Tito <farmatito AT tiscali.it>). +129 bytes when enabled.
2008-03-19 23:15:26 +00:00
Denis Vlasenko
b44c790e41 *: fix various kinds of damage to letter 'c' in Arkadiusz Mickiewicz' surname.
chrt,taskset,dc,eject: shrink
crontab: call "vi" with just name, no path
watchdog: intercept all fatal signals

function                                             old     new   delta
xstrtoull_range                                        -      35     +35
static.sg_commands                                     -      18     +18
packed_usage                                       23698   23712     +14
watchdog_main                                        148     151      +3
crontab_main                                         637     638      +1
base                                                   1       -      -1
static.ps                                              4       -      -4
pointer                                                4       -      -4
stack_machine                                         99      92      -7
run_command                                          273     260     -13
eject_main                                           360     343     -17
static.C                                              30      12     -18
ptok                                                  61      38     -23
xstrtol_range                                         27       -     -27
get_token                                             35       -     -35
taskset_main                                         586     550     -36
chrt_main                                            411     372     -39
dc_main                                              158     117     -41
time_main                                           1127    1037     -90
------------------------------------------------------------------------------
(add/remove: 2/5 grow/shrink: 3/9 up/down: 71/-355)          Total: -284 bytes
   text    data     bss     dec     hex filename
 793680     662    7420  801762   c3be2 busybox_old
 793327     662    7412  801401   c3a79 busybox_unstripped
2008-03-17 09:29:43 +00:00
Denis Vlasenko
4ee7cd4f6f *: mode tcp/udpsvd to networking, delete ipsvd/*
*/Config.in: fixes to text
svlogd: make it NOMMU capable

function                                             old     new   delta
processorstart                                       378     420     +42
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 42/0)               Total: 42 bytes
   text    data     bss     dec     hex filename
 797153     662    7420  805235   c4973 busybox_old
 797196     662    7420  805278   c499e busybox_unstripped
2008-03-17 09:13:22 +00:00
Denis Vlasenko
1d42665b6b *: shrink: use Vladimir's "o+" specifier instead of xatou(opt_param)
function                                             old     new   delta
getopt32                                            1370    1385     +15
sulogin_main                                         490     494      +4
realpath_main                                         84      86      +2
sleep_main                                            76      77      +1
mt_main                                              256     257      +1
printenv_main                                         75      74      -1
fdformat_main                                        546     545      -1
usleep_main                                           44      42      -2
setlogcons_main                                       77      75      -2
ed_main                                             2654    2649      -5
deallocvt_main                                        69      64      -5
addgroup_main                                        373     368      -5
mkfs_minix_main                                     2989    2982      -7
tail_main                                           1221    1213      -8
sv_main                                             1254    1241     -13
du_main                                              348     328     -20
tftp_main                                            325     302     -23
split_main                                           581     558     -23
nc_main                                             1000     977     -23
diff_main                                            891     868     -23
arping_main                                         1797    1770     -27
ls_main                                              893     847     -46
od_main                                             2797    2750     -47
readprofile_main                                    1944    1895     -49
tcpudpsvd_main                                      1973    1922     -51
udhcpc_main                                         2590    2513     -77
grep_main                                            824     722    -102
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 5/22 up/down: 23/-560)         Total: -537 bytes
   text    data     bss     dec     hex filename
 796973     658    7428  805059   c48c3 busybox_old
 796479     662    7420  804561   c46d1 busybox_unstripped
2008-03-17 09:09:09 +00:00
Denis Vlasenko
62a90cdd74 *: shrink by using [f]open_or_warn_stdin where appropriate
function                                             old     new   delta
lsattr_main                                           62     143     +81
open_or_warn_stdin                                     -      36     +36
fclose_if_not_stdin                                   20      47     +27
xfopen_stdin                                           -      20     +20
tac_main                                             336     356     +20
cksum_main                                           249     259     +10
bb_argv_dash                                           -       8      +8
su_main                                              448     455      +7
cmp_main                                             630     633      +3
passwd_main                                         1072    1074      +2
uudecode_main                                        317     315      -2
text_yank                                            110     108      -2
handle_incoming_and_exit                            2653    2651      -2
flags                                                  5       1      -4
write_leases                                         235     230      -5
fopen_or_warn_stdin                                   48      42      -6
fold_main                                            648     642      -6
static.argv_dash                                       8       -      -8
sum_main                                             142     128     -14
tail_main                                           1237    1221     -16
sed_main                                             711     695     -16
cmp_xfopen_input                                      17       -     -17
bb_cat                                               113      96     -17
catv_main                                            328     306     -22
strings_main                                         457     434     -23
hash_file                                            298     274     -24
sum_file                                             353     325     -28
sort_main                                            904     859     -45
expand_main                                          736     686     -50
cut_main                                            1116    1065     -51
md5_sha1_sum_main                                    549     493     -56
lsattr_args                                           90       -     -90
read_stduu                                           408     255    -153
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 7/20 up/down: 214/-657)        Total: -443 bytes
   text    data     bss     dec     hex filename
 797417     658    7428  805503   c4a7f busybox_old
 796973     658    7428  805059   c48c3 busybox_unstripped
2008-03-17 09:07:36 +00:00
Denis Vlasenko
85c247161b *: fix fallout from -Wunused-parameter
function                                             old     new   delta
bbunpack                                             358     366      +8
passwd_main                                         1070    1072      +2
handle_incoming_and_exit                            2651    2653      +2
getpty                                                88      86      -2
script_main                                          975     972      -3
inetd_main                                          2036    2033      -3
dname_enc                                            377     373      -4
make_new_session                                     474     462     -12
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/5 up/down: 12/-24)            Total: -12 bytes
   text    data     bss     dec     hex filename
 797429     658    7428  805515   c4a8b busybox_old
 797417     658    7428  805503   c4a7f busybox_unstripped
2008-03-17 09:04:04 +00:00
Denis Vlasenko
68404f13d4 *: add -Wunused-parameter; fix resulting breakage
function                                             old     new   delta
procps_scan                                         1265    1298     +33
aliascmd                                             278     283      +5
parse_file_cmd                                       116     120      +4
dname_enc                                            373     377      +4
setcmd                                                90      93      +3
execcmd                                               57      60      +3
count_lines                                           72      74      +2
process_command_subs                                 340     339      -1
test_main                                            409     407      -2
mknod_main                                           179     177      -2
handle_incoming_and_exit                            2653    2651      -2
argstr                                              1312    1310      -2
shiftcmd                                             131     128      -3
exitcmd                                               46      43      -3
dotcmd                                               297     294      -3
breakcmd                                              86      83      -3
evalpipe                                             353     349      -4
evalcommand                                         1180    1176      -4
evalcmd                                              109     105      -4
send_tree                                            374     369      -5
mkfifo_main                                           82      77      -5
evalsubshell                                         152     147      -5
typecmd                                               75      69      -6
letcmd                                                61      55      -6
add_cmd                                             1190    1183      -7
main                                                 891     883      -8
ash_main                                            1415    1407      -8
parse_stream                                        1377    1367     -10
alloc_procps_scan                                     55       -     -55
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148)          Total: -94 bytes
   text    data     bss     dec     hex filename
 797195     658    7428  805281   c49a1 busybox_old
 797101     658    7428  805187   c4943 busybox_unstripped
2008-03-17 09:00:54 +00:00
Denis Vlasenko
397de617f3 help text: regularize format, and shrink
getty: shrink, and improve comments
mount: OPT_ALL is superfluous, we already have OPT_a

function                                             old     new   delta
bcode                                                 47      25     -22
getty_main                                          2503    2349    -154
packed_usage                                       23928   23698    -230
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-406)           Total: -406 bytes
   text    data     bss     dec     hex filename
 798031     658    7428  806117   c4ce5 busybox_old
 797604     658    7428  805690   c4b3a busybox_unstripped
2008-03-17 08:55:44 +00:00
Denis Vlasenko
cdf62770af dos2unix: tiny shrink
login,su: fix setup_environment() so that it works as intended
          (parameter names were a bit misleading)
fdisk: shrink
help text: shrink

function                                             old     new   delta
login_main                                          1658    1701     +43
setup_environment                                    206     203      -3
dos_compatible_flag                                    4       1      -3
dos2unix_main                                        383     375      -8
get_boot                                            1724    1702     -22
fdisk_main                                          2949    2889     -60
packed_usage                                       24250   23948    -302
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 43/-398)          Total: -355 bytes
   text    data     bss     dec     hex filename
 798768     661    7428  806857   c4fc9 busybox_old
 798327     658    7428  806413   c4e0d busybox_unstripped
2008-03-17 08:42:43 +00:00
Denis Vlasenko
8e2cfec1cd libbb: introduse and use signal_[no_]SA_RESTART_empty_mask and sigaction_set
signal_SA_RESTART_empty_mask                           -      65     +65
signal_no_SA_RESTART_empty_mask                        -      54     +54
dd_main                                             1325    1369     +44
sigaction_set                                          -      19     +19
dname_enc                                            373     377      +4
UNSPEC_print                                          64      66      +2
setsignal                                            296     294      -2
bb_signals_recursive                                  95      92      -3
bb_askpass                                           367     361      -6
inetd_main                                          1810    1797     -13
rx_main                                              912     883     -29
sigdelset                                             32       -     -32
__sigdelset                                           32       -     -32
__GI_sigdelset                                        32       -     -32
sighup_handler                                        84      37     -47
arping_main                                         1844    1797     -47
fsck_main                                           1869    1807     -62
run_list                                            1917    1844     -73
vlock_main                                           492     409     -83
progressmeter                                        883     798     -85
handle_incoming_and_exit                            2737    2651     -86
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 3/12 up/down: 188/-632)        Total: -444 bytes
2008-03-12 23:19:35 +00:00
Denis Vlasenko
4cf1d08fc2 nc: remove a bit of bloat
inetd: more NOMMU fixes
rx: shrink
devfsd: minor shrink
vlock: shrink
tcpudp: narrow down window where we have no wildcard socket

parse_one_line                                      1015    1102     +87
init_ring                                              -      53     +53
xzalloc_lsa                                            -      48     +48
read_byte                                             51      50      -1
rearm_alarm                                           28      25      -3
nc_main                                             1028    1000     -28
initring                                              53       -     -53
vlock_main                                           583     496     -87
reread_config_file                                  1089     991     -98
rx_main                                             1046     912    -134
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/6 up/down: 188/-404)         Total: -216 bytes
   text    data     bss     dec     hex filename
 800120     661    7428  808209   c5511 busybox_old
 799796     661    7428  807885   c53cd busybox_unstripped
2008-03-12 23:13:50 +00:00
Denis Vlasenko
400d8bb45e less,klogd,syslogd,nc,tcpudp: exit on signal by killing itself, not exit(1)
*: minor shrink
2008-02-24 13:36:01 +00:00
Denis Vlasenko
c9ca0a3274 mount: recognize "dirsync" (closes bug 835)
mount: sanitize environ if called by non-root
*: adjust for slightly different sanitize routine
2008-02-18 11:08:33 +00:00
Denis Vlasenko
25591c322c libbb: introduce bb_signals and bb_signals_recursive,
which sets same handler for many signals. sig_catch is nuked
(bb_signals_recursive is more descriptive name).
*: use them as appropriate. 

function                                             old     new   delta
bb_signals_recursive                                   -      95     +95
bb_signals                                             -      52     +52
run_command                                          258     273     +15
svlogd_main                                         1368    1377      +9
runsv_main                                          1746    1752      +6
runsvdir_main                                       1643    1646      +3
UNSPEC_print                                          64      66      +2
time_main                                           1128    1127      -1
...
resize_main                                          246     210     -36
sig_catch                                             63       -     -63
set_fatal_sighandler                                  85      14     -71
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 5/24 up/down: 182/-548)        Total: -366 bytes
2008-02-16 22:58:56 +00:00
Denis Vlasenko
753f42ab8d adduser: optional support for long options. +110 bytes.
closes bug 2134.
2008-02-15 15:17:23 +00:00
Denis Vlasenko
95dc672326 getty: don't try to detect parity on local lines
(Joakim Tjernlund <Joakim.Tjernlund at transmode.se>)
2008-02-02 19:05:36 +00:00
Bernhard Reutner-Fischer
f470196a41 - fix conflicting decls of syslog related facilitynames and prioritynames tables 2008-01-27 12:50:12 +00:00
Denis Vlasenko
f3fca91e9f getty: a small code shrink
touch                                                  -      40     +40
fakehost                                               4       -      -4
getty_main                                          2546    2493     -53
2007-12-04 18:46:01 +00:00
Denis Vlasenko
d0bbbdcd6e getty: don't accept ancient '#' and '@' as backspace/kill line,
it only confuses people.
(Alexander Griesser <alexander.griesser@lkh-vil.or.at> (LKH Villach))
various other cleanups.

function                                             old     new   delta
getty_main                                          2526    2546     +20
static.baud_index                                      4       -      -4
parse_speeds                                          91       -     -91
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 1/0 up/down: 20/-95)            Total: -75 bytes
   text    data     bss     dec     hex filename
 773152    1086    9008  783246   bf38e busybox_old
 773081    1086    9008  783175   bf347 busybox_unstripped
2007-12-04 09:48:40 +00:00
Denis Vlasenko
abbd363261 xreadlink: code shrink
udhcp: add missing tryagain member to client_config

function                                             old     new   delta
xmalloc_readlink_follow                              169     154     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-15)             Total: -15 bytes
2007-11-08 17:40:23 +00:00