Commit Graph

11353 Commits

Author SHA1 Message Date
Denys Vlasenko
920185c69a cmp: remove history comment. it is more natural to keep it in source control
The comment was:

* Mar 16, 2003      Manuel Novoa III   (mjn3@codepoet.org)
*
* Original version majorly reworked for SUSv3 compliance, bug fixes, and
* size optimizations.  Changes include:
* 1) Now correctly distinguishes between errors and actual file differences.
* 2) Proper handling of '-' args.
* 3) Actual error checking of i/o.
* 4) Accept SUSv3 -l option.  Note that we use the slightly nicer gnu format
*    in the '-l' case.

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26 14:04:29 +02:00
Rob Landley
0c1ba443c8 cmp: ifdefectomy
Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26 14:01:14 +02:00
Matheus Izvekov
4640ccc399 cpio: "NNN blocks" should go to stderr
Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26 13:53:57 +02:00
Denys Vlasenko
9138817a27 find: fix -name matching for dotfiles. -1 byte
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26 09:54:04 +02:00
Denys Vlasenko
05273daf6f grep: makw -w support unconditional
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-26 08:45:44 +02:00
Denys Vlasenko
5f94346f73 date: support -d @SECONDS_SINCE_1970
function                                             old     new   delta
parse_datestr                                        647     721     +74

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-22 00:45:28 -04:00
Denys Vlasenko
238c83bd82 ftpd: work around LIST -aXYZ too, not only LIST -lXYZ
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-21 18:05:10 -04:00
Denys Vlasenko
5a7c72015c busybox --list option. +140 bytes. Rob wanted it.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-20 21:02:57 -04:00
Denys Vlasenko
f2c16edf99 sed: fix nested {} case
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-20 04:00:03 -04:00
Denys Vlasenko
96a1833231 sed: fix c cmd
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-19 22:36:07 -04:00
Denys Vlasenko
c175c46647 vi: discover window size even on serial consoles. optional
function                                             old     new   delta
edit_file                                            671     761     +90
wh_helper                                              -      57     +57
query_screen_dimensions                               54      63      +9
ar_main                                              533     542      +9
refresh                                              767     773      +6
vi_main                                              242     243      +1
text_yank                                             56      54      -2
get_terminal_width_height                            180     135     -45
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/2 up/down: 172/-47)           Total: 125 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-18 22:09:30 -07:00
Denys Vlasenko
def4783a8a vi: remove superfluous check on filename == ""
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-18 20:39:41 -07:00
Denys Vlasenko
43b094b584 remove stdio from allnoconfig build
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-18 20:16:11 -07:00
Denys Vlasenko
04cecd5e61 vi: code shrink
function                                             old     new   delta
vi_main                                              250     242      -8
colon                                               2980    2970     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-18)             Total: -18 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-16 22:13:55 -07:00
Denys Vlasenko
2bb651ae10 vi: code shrink; save/restore errno in signal handlers
function                                             old     new   delta
query_screen_dimensions                                -      54     +54
suspend_sig                                           50      64     +14
cont_sig                                              65      66      +1
catch_sig                                             42      32     -10
winch_sig                                             88      60     -28
edit_file                                            719     671     -48
refresh                                              848     767     -81
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/4 up/down: 69/-167)           Total: -98 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-16 20:55:52 -07:00
Denys Vlasenko
6f69f2dbc6 add a file which shows what builds on ancient RH9 image
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-16 19:32:12 -07:00
Tomas Heinrich
0358daf447 read_key: fix buffer length calculation
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-16 16:26:08 -07:00
Nguyễn Thái Ngọc Duy
36dcf4e516 ar: fix a regression: "ar t arch.a" stopped shoting files
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-15 16:55:04 -07:00
Denys Vlasenko
c2d413ba74 httpd_indexcgi example: trivial fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-15 08:37:59 -07:00
Denys Vlasenko
e6080a4d7e udhcpc: make help text better
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 14:04:26 -07:00
Denys Vlasenko
b9dd5ab6d9 loop: correct minor device number limit
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 13:52:41 -07:00
Denys Vlasenko
351ef7188a devmem: map two pages only if it is necessary
function                                             old     new   delta
devmem_main                                          463     469      +6

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 13:37:25 -07:00
Lauri Kasanen
375a8ef5ea mount: add an optional capability to create new /dev/loopN as needed
Signed-off-by: Lauri Kasanen <curaga@operamail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 12:31:26 -07:00
Denys Vlasenko
0ecc116592 dnsd: enforce alignment on packet buffer
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 10:14:25 -07:00
Ralf Rösch
8597da1934 modutils-24: [mips] modutlis-24 segfault fix for 2.4 kernel modules
handling DWARF sections solves the problem.

This seems to be a long outstanding bug:
http://permalink.gmane.org/gmane.linux.busybox/4533
http://www.linux-mips.org/archives/linux-mips/2004-08/msg00072.html

Signed-off-by: Ralf Rösch <ralf.roesch@rw-gmbh.de>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 09:45:37 -07:00
Denys Vlasenko
60f659f9d9 hwclock: improve, and then disable clever sync code: it's bloat
...and hardware is too stupid to benefit from it anyway

function                                             old     new   delta
hwclock_main                                         439     319    -120

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-14 09:19:20 -07:00
Denys Vlasenko
d7b5289209 xargs: do not decrease orig_arg_max to negative values
Based on patch by Nguyễn Thái Ngọc Duy <pclouds@gmail.com>

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-09 14:58:40 +02:00
Nguyễn Thái Ngọc Duy
125d0154e6 Exclude syslog code if FEATURE_SYSLOG is not set
syslog.h and syslog(...) may not exist in such configuration

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-09 14:34:28 +02:00
Denys Vlasenko
e69ad87802 tar: fix "hardlinks to symlinks chown" bug 1519.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-09 14:11:45 +02:00
Denys Vlasenko
02365a6ef7 tar: fix mishandling of repeated hardlink in tarball; expand tests
function                                             old     new   delta
data_extract_all                                     727     767     +40
get_header_tar                                      1576    1572      -4

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-09 10:52:52 +02:00
Steve Bennett
823b636cd1 ipcalc: more correct checking for proper number of arguments
function                                             old     new   delta
ipcalc_main                                          581     569     -12

Signed-off-by: Steve Bennett <steveb@workware.net.au>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-07 19:16:12 +02:00
Denys Vlasenko
39601843d7 ps: fix non-DESKTOP option handling code
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-07 18:03:34 +02:00
Denys Vlasenko
1854bc1aa2 hexdump: make -s 0xNNNNN work
function                                             old     new   delta
hexdump_main                                         603     605      +2

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 23:33:28 +02:00
Denys Vlasenko
64827a2e5d fix typo
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 18:51:29 +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
87fb72032e init: clear utmp entries for dead processes, if they (entries) exist
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 18:49:28 +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
f6916dbed4 telnetd: fill hostname field in utmp/wtmp records
function                                             old     new   delta
get_lsa                                                -     109    +109
make_new_session                                     438     504     +66
get_peer_lsa                                           -      10     +10
ftpd_main                                           2340    2267     -73
get_sock_lsa                                         101      10     -91
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 1/2 up/down: 185/-164)           Total: 21 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 17:43:29 +02:00
Denys Vlasenko
fcad7681f8 fdisk: make comment more clear
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 16:56:33 +02:00
Denys Vlasenko
5ab6b0f563 udhcp: s/sipservers/sipsrv/ to match other similar option names
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 16:52:59 +02:00
Denys Vlasenko
d958e909cd fdisk: make 'b' command optionally adjust C/H/S; "fdisk IMAGE_FILE" sets cylinders
function                                             old     new   delta
set_hsc_start_end                                      -     189    +189
get_boot                                            1644    1713     +69
fdisk_main                                          2620    2652     +32
get_partition_start_from_dev_start                     -      15     +15
get_partition_start                                   15       -     -15
set_partition                                        286     120    -166
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 2/1 up/down: 305/-181)          Total: 124 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 02:32:26 +02:00
Denys Vlasenko
5ea1de2235 fdisk: code shrink without logic changes
function                                             old     new   delta
create_doslabel                                      113     110      -3
set_start_sect                                         8       4      -4
set_nr_sects                                           8       4      -4
get_start_sect                                         8       4      -4
get_nr_sects                                           8       4      -4
store4_little_endian                                  21       -     -21
read4_little_endian                                   33       -     -33
is_cleared_partition                                  84      21     -63
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 0/6 up/down: 0/-136)           Total: -136 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 02:31:43 +02:00
Denys Vlasenko
37bc1eb5cd removed extra \n in fdisk help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-06 00:04:08 +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
f8fcc184b6 udhcpd: note missing sanity checks on INFORM message handling
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-04 22:36:34 +02:00
Denys Vlasenko
290346948d update examples/udhcp/udhcpd.conf
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-04 15:38:22 +02:00
Denys Vlasenko
4f3aa51f9d udhcp: implement "raw" binary options. Closes bug 735
function                                             old     new   delta
allocate_tempopt_if_needed                             -      76     +76
udhcp_str2optset                                     351     415     +64
attach_option                                        380     398     +18
len_of_option_as_string                               11      12      +1
dhcp_option_lengths                                   11      12      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 4/0 up/down: 160/0)             Total: 160 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-04 15:31:12 +02:00
Denys Vlasenko
4836331924 libbb: factor out hex2bin() for infiniband address parser
function                                             old     new   delta
hex2bin                                                -     149    +149
in_ib                                                172      27    -145

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-04-04 15:29:32 +02:00