Commit Graph

10695 Commits

Author SHA1 Message Date
Dan Fandrich
21a542d7d7 platform compatibility work (by Dan Fandrich)
Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 11:05:00 +01:00
Denys Vlasenko
d83bbf4193 rename sent_ESC_br_n6 variable to sent_ESC_br6n
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 10:47:49 +01:00
Denys Vlasenko
eb62d7c383 libbb/lineedit: try to make FEATURE_EDITING_ASK_TERMINAL less ugly
function                                             old     new   delta
read_line_input                                     4809    4829     +20
lineedit_read_key                                    207     223     +16
put_prompt                                           110     117      +7
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/0 up/down: 43/0)               Total: 43 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 10:34:06 +01:00
Denys Vlasenko
1502a8b4ce libbb/xrealloc_vector.c: better comment
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 10:01:01 +01:00
Denys Vlasenko
12450dbeef libbb/bb_do_delay.c: shrink
function                                             old     new   delta
difftime                                               9       -      -9
bb_do_delay                                           88      38     -50
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-59)             Total: -59 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 09:54:34 +01:00
Denys Vlasenko
52b971f516 libbb/ask_confirmation.c: shrink
function                                             old     new   delta
bb_ask_confirmation                                   95      76     -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 09:49:04 +01:00
Denys Vlasenko
b204e6b61a httpd_indexcgi: fix off-by-one error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 09:29:01 +01:00
Denys Vlasenko
dac863a4cc sed: shrink usage text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 09:11:17 +01:00
Rob Landley
7b28415483 Minor usage tweak for sed.
Makes it slightly smaller and (in my opinion) clearer.

Signed-off-by: Rob Landley <rob@landley.net>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27 09:07:08 +01:00
Denys Vlasenko
727e1b536e read_key,lineeedit: parse position answerback faster; sanitize its use
it's still not reliable, and probably cannot be made so...
added comment with explanation.

function                                             old     new   delta
put_prompt                                            52     110     +58
read_key                                             601     607      +6
lineedit_read_key                                    201     207      +6
win_changed                                          108     104      -4
read_line_input                                     4824    4809     -15
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 3/2 up/down: 70/-19)             Total: 51 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26 15:23:32 +01:00
Tomas Heinrich
d31a8793eb lsmod: unicode-aware column formatting
Signed-off-by: Tomas Heinrich <heinrich.tomas@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26 12:35:30 +01:00
Denys Vlasenko
0f91b3d0dc read_key: ignore unknown keys (do not return them to caller byte-by-byte)
function                                             old     new   delta
read_key                                             568     601     +33

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26 12:09:06 +01:00
Denys Vlasenko
180f585ac3 read_key: remove handling for ctrl-up/down, we don't use that. -12 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26 00:59:59 +01:00
Denys Vlasenko
9d71fc6381 read_key: document more weird key sequences
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26 00:50:52 +01:00
Denys Vlasenko
a17eeb847e lineedit: handle Ctrl-arrows
function                                             old     new   delta
read_line_input                                     4629    4824    +195
BB_isalnum                                             -      39     +39
BB_ispunct                                             -      35     +35
BB_isspace                                             -      31     +31
static.esccmds                                        69      93     +24
vi_word_motion                                       165     162      -3
vi_back_motion                                       204     198      -6
vi_end_motion                                        172     163      -9
bb_iswspace                                           28       -     -28
bb_iswpunct                                           32       -     -32
bb_iswalnum                                           37       -     -37
------------------------------------------------------------------------------
(add/remove: 3/3 grow/shrink: 5/8 up/down: 334/-129)          Total: 205 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 23:50:56 +01:00
Denys Vlasenko
77c066ea5c modutils: add FEATURE_INSMOD_TRY_MMAP option
function                                             old     new   delta
try_to_mmap_module                                     -     121    +121
bb_init_module_24                                   4514    4578     +64
bb_init_module                                       119     173     +54
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 239/0)             Total: 239 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 04:35:22 +01:00
Bernhard Reutner-Fischer
30f3c1d5fd tar: add support for -o as synonym to --no-same-owner. +5 bytes
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 02:13:32 +02:00
Denys Vlasenko
f645037ffb tar: handle "tar fx TARFILE" etc
function                                             old     new   delta
tar_main                                             702     751     +49

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 01:32:45 +02:00
Denys Vlasenko
b87d972817 patch: add Rob's version for reference, it may handle fuzz and offsets
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 00:39:51 +02:00
Denys Vlasenko
6f2ebae843 patch: add another test (currently fails)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25 00:35:04 +02:00
Denys Vlasenko
0939f2ebd2 fix up potential printf's with unsafe format strings
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-24 17:47:56 +02:00
Denys Vlasenko
4b8b37f981 mkfs_ext2: fix compile error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-24 17:20:29 +02:00
Denys Vlasenko
17c838bc6d patch: add longopts, --dry-run, add one more test
function                                             old     new   delta
patch_main                                          1110    1214    +104
static.patch_longopts                                  -      47     +47
packed_usage                                       26738   26761     +23
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/0 up/down: 174/0)             Total: 174 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-24 17:11:55 +02:00
Vladimir Dronnikov
1dacfbb1f4 ftpget/put: make 3rd parameter optional
function                                             old     new   delta
packed_usage                                       26728   26738     +10
ftpgetput_main                                       343     351      +8

Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 23:34:43 +02:00
Denys Vlasenko
337a31b074 ifplugd: fix compile error
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 18:31:02 +02:00
Denys Vlasenko
50be9631e1 date: line up tabs in usage text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 16:25:20 +02:00
Denys Vlasenko
d93fc61725 ls: fix "ls | cat" to not show "total NNN" header
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 16:22:25 +02:00
Bernhard Reutner-Fischer
ca22cda709 date: handle long options
RFC2822 obsoletes RFC822; Silently accept --rfc-822 and return rfc2822
output for compatibility.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-23 16:07:37 +02:00
Denys Vlasenko
9d57a8073a libbb.h: tidy it up a bit. no code changes (verified)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 14:24:44 +02:00
Denys Vlasenko
11c12c4720 fix isalnum and isxdigit. Unfortunately, +285 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 13:57:24 +02:00
Denys Vlasenko
a7a1fd02cb eliminate all remaining users of ctype. ~600 byte large tables are gone.
function                                             old     new   delta
skip_thing                                           253     278     +25
find_range                                           497     508     +11
ask                                                  220     228      +8
...
setlocalenv                                           90      82      -8
bb_strtoll                                            84      76      -8
bb_strtol                                             85      77      -8
is_well_formed_var_name                               75      66      -9
expand                                               651     641     -10
endofname                                            104      92     -12
buffer_fill_and_print                                196     179     -17
isxdigit                                              18       -     -18
httpd_main                                           729     711     -18
__GI_isxdigit                                         18       -     -18
ispunct                                               20       -     -20
isalnum                                               20       -     -20
__GI_ispunct                                          20       -     -20
__GI_isalnum                                          20       -     -20
toupper                                               29       -     -29
tolower                                               29       -     -29
__GI_toupper                                          29       -     -29
__GI_tolower                                          29       -     -29
do_cmd                                              4454    4330    -124
------------------------------------------------------------------------------
(add/remove: 0/12 grow/shrink: 14/29 up/down: 81/-549)       Total: -468 bytes
   text	   data	    bss	    dec	    hex	filename
 823051	    445	   7548	 831044	  cae44	busybox_old
 821970	    441	   7548	 829959	  caa07	busybox_unstripped

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 13:05:03 +02:00
Denys Vlasenko
56b3eec162 small optimizations of toupper/tolower
function                                             old     new   delta
in_ib                                                191     172     -19

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 13:03:59 +02: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
7b4cd6f7b0 libbb: smaller isdigit. -95 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 02:22:03 +02:00
Denys Vlasenko
c1947f18f5 build failure fix and some cosmetics
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-23 01:30:26 +02:00
Denys Vlasenko
c0dab37d0a *: remove last function calls to isspace
function                                             old     new   delta
xstrtoul_range_sfx                                   232     231      -1
xstrtoull_range_sfx                                  295     293      -2
trim                                                  82      80      -2
trim_trailing_spaces_and_print                        57      52      -5
isspace                                               18       -     -18

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 22:28:08 +02:00
Denys Vlasenko
6935ec9c0b networking/interface.c: tiny code shrink
function                                             old     new   delta
if_readlist_proc                                     634     631      -3

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 19:42:26 +02:00
Denys Vlasenko
f125b6d341 *: use better isspace implementation
function                                             old     new   delta
asciifile                                             90     106     +16
expand                                               653     658      +5
skip_non_whitespace                                   21      25      +4
bb_iswspace                                           25      28      +3
readcmd                                             1071    1072      +1
find_range                                           496     497      +1
singlemount                                          772     771      -1
ifupdown_main                                       2134    2133      -1
edir                                                 370     369      -1
volume_id_set_label_string                            82      79      -3
trim                                                  85      82      -3
rtc_adjtime_is_utc                                   141     138      -3
rewrite                                             1039    1036      -3
do_cmd                                              4465    4462      -3
bb_dump_add                                          358     355      -3
awk_split                                            553     550      -3
fbset_main                                          1273    1268      -5
skip_thing                                           259     253      -6
get_trimmed_slice                                     46      39      -7
bb__parsegrent                                       245     238      -7
parse_file_cmd                                       116     108      -8
check                                               1532    1523      -9
bb__pgsreader                                        198     188     -10
dot_skip_over_ws                                      61      46     -15
colon                                               3032    3012     -20
if_readlist_proc                                     655     634     -21
normalize                                            193     165     -28
add_cmd                                             1162    1133     -29
get_key                                              528     476     -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 6/23 up/down: 30/-241)         Total: -211 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 19:41:45 +02:00
Denys Vlasenko
46e364dbfe mkfs_ext2: code shrink
function                                             old     new   delta
mkfs_ext2_main                                      2505    2492     -13

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 12:41:44 +02:00
Denys Vlasenko
09bbb2892d mkfs_ext2: fix a bug where we don't fully respect -n on files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 12:27:10 +02:00
Denys Vlasenko
c1ab01b61b mke2fs: mention -F in usage text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 12:24:48 +02:00
Denys Vlasenko
838e07aace trimming help text
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 12:15:33 +02:00
Denys Vlasenko
149a32a19b mkfs_ext2: use compatible inode sizes; add -I <inodesize>. (by Vladimir)
function                                             old     new   delta
mkfs_ext2_main                                      2385    2495    +110
packed_usage                                       26400   26447     +47
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 157/0)             Total: 157 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 12:12:17 +02:00
Denys Vlasenko
3945bc1534 tune2fs: new applet by Vladimir. Only supports -L LABEL
function                                             old     new   delta
tune2fs_main                                           -     165    +165
packed_usage                                       26692   26702     +10
applet_names                                        2148    2156      +8
applet_main                                         1264    1268      +4
applet_nameofs                                       632     634      +2
applet_install_loc                                   158     159      +1
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/0 up/down: 190/0)             Total: 190 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 00:55:55 +02:00
Denys Vlasenko
481ca9604d mkfs_ext2: 1.41.9 compat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22 00:38:52 +02:00
Denys Vlasenko
a46317b6f3 df: trivial 64-bit fix
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-21 23:28:20 +02:00
Denys Vlasenko
010fb00708 mkfs_ext2: make sure we extend the image to requested size
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-21 23:23:55 +02:00
Denys Vlasenko
eaba48467c cosmetics in mkfs_ext2.txt
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-21 14:25:21 +02:00
Denys Vlasenko
1d6e4473fa mkfs_ext2_test: disable incomtatible behavior in standard mke2fs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-21 14:14:51 +02:00
Denys Vlasenko
ece01ee8ca mkfs_ext2: e2fsck 1.14.4 compat
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-21 14:01:25 +02:00