aboutsummaryrefslogtreecommitdiff
path: root/libbb
AgeCommit message (Collapse)Author
2009-11-17libbb: fix vasprintf implementationDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15libbb: added xfdopen_for_read/writeDenys Vlasenko
function old new delta xfdopen_helper - 40 +40 logdir_open 1163 1184 +21 process_stdin 433 443 +10 xfdopen_for_write - 9 +9 doCommands 2465 2474 +9 patch_main 1214 1222 +8 bbunpack 457 465 +8 xfdopen_for_read - 7 +7 scan_tree 258 262 +4 xstrtoul_range_sfx 230 231 +1 sendmail_main 957 955 -2 passwd_main 1027 1023 -4 parse 969 964 -5 test_main 253 247 -6 sed_main 655 649 -6 dos2unix_main 437 429 -8 fbsplash_main 950 938 -12 handle_dir_common 371 354 -17 expand_vars_to_list 2197 2169 -28 update_passwd 1275 1246 -29 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 7/10 up/down: 117/-117) Total: 0 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15date: restore hadling of MMDDhhmm[[CC]YY][.ss] date formatDenys Vlasenko
function old new delta date_main 698 889 +191 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15some non-gnu compilers can't have non-const struct initializersDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-15use utimes() rather than obsolescent utime()Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-11-13*: use "can't" instead of "cannot"Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-11tidy up O_NONBLOCK usage. use libbb functions in stty.Denys Vlasenko
Added O_RDONLY where improves readability. Note: O_RDONLY == 0, so it is there even if not specified. function old new delta stty_main 1289 1235 -54 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-11ash: fix bad interaction of "stty -echo" + ASK_TERMINALDenys Vlasenko
function old new delta read_line_input 4820 4886 +66 put_prompt 108 47 -61 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 66/-61) Total: 5 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-08wget: factor out progress bar codeMagnus Damm
Signed-off-by: Magnus Damm <magnus.damm@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-07big endian warning fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02passwd: do not complain if /etc/shadow is missingDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-11-02*: introduce and use ffulsh_all()Denys Vlasenko
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-01Add more compat code for non GNU environmentsDan Fandrich
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-29lineedit: REALLY fix compile error nowDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-29lineedit: compile fixDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-29echo et al: support \e escapeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27add and use xopen_nonblocking (-18b)Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27platform compatibility work (by Dan Fandrich)Dan Fandrich
Signed-off-by: Dan Fandrich <dan@coneharvesters.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27rename sent_ESC_br_n6 variable to sent_ESC_br6nDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27libbb/lineedit: try to make FEATURE_EDITING_ASK_TERMINAL less uglyDenys Vlasenko
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-27libbb/xrealloc_vector.c: better commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-27libbb/bb_do_delay.c: shrinkDenys Vlasenko
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-27libbb/ask_confirmation.c: shrinkDenys Vlasenko
function old new delta bb_ask_confirmation 95 76 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26read_key,lineeedit: parse position answerback faster; sanitize its useDenys Vlasenko
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-26read_key: ignore unknown keys (do not return them to caller byte-by-byte)Denys Vlasenko
function old new delta read_key 568 601 +33 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26read_key: remove handling for ctrl-up/down, we don't use that. -12 bytesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-26read_key: document more weird key sequencesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-25lineedit: handle Ctrl-arrowsDenys Vlasenko
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-23build failure fix and some cosmeticsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-22*: remove last function calls to isspaceDenys Vlasenko
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*: use better isspace implementationDenys Vlasenko
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-20add B921600Bernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-10-15move generate_uuid from mkswap to libbbVladimir Dronnikov
Signed-off-by: Vladimir Dronnikov <dronnikov@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-14lineedit: do not hardcode ctrl-C and ctrl-D, use termios fields.Denys Vlasenko
Unexpected code shrink is probably a gcc glitch: function old new delta read_line_input 4771 4629 -142 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-14comment anc Config.in changes, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-13libbb/human_readable.c: shrink; and reduce bss usageDenys Vlasenko
also, move smart_ulltoaN there and comment usage locations function old new delta static.unit_chars 7 9 +2 utoa_to_buf 110 108 -2 make_human_readable_str 262 258 -4 fallbackSort 1723 1719 -4 static.fmt 97 92 -5 static.fmt_tenths 10 - -10 static.str 21 4 -17 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/5 up/down: 2/-42) Total: -40 bytes text data bss dec hex filename 820981 453 6932 828366 ca3ce busybox_old 820968 453 6916 828337 ca3b1 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-11libbb: revert the change where spawn reports exec failureDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08libbb: make spawn() print "can't execute '%s'" on execv errorDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-08*: code shrink via NOINLINEDenys Vlasenko
function old new delta expand_vars_to_list - 2118 +2118 lzo1x_optimize - 1429 +1429 run_pipe 358 1775 +1417 arith_apply - 1335 +1335 mainQSort3 - 1198 +1198 logdir_open - 1163 +1163 rewrite - 1039 +1039 dump_identity - 987 +987 do_shm - 884 +884 cpio_o - 863 +863 cpio_main 1450 560 -890 ipcs_main 3442 2523 -919 bb_dump_dump 2611 1488 -1123 process_dev 4572 3405 -1167 logdirs_reopen 1308 86 -1222 arith 2084 707 -1377 mainSort 2622 1202 -1420 do_lzo_compress 2276 799 -1477 run_list 2491 943 -1548 expand_variables 2280 135 -2145 ------------------------------------------------------------------------------ (add/remove: 9/0 grow/shrink: 1/10 up/down: 12433/-13288) Total: -855 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-10-05unpackers: check errors from close() tooDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-29find: -follow should not error out on dandling linksDenys Vlasenko
function old new delta recursive_action 425 465 +40 find_main 436 465 +29 test_main 247 253 +6 need_print 1 - -1 doCommands 2523 2521 -2 compare_keys 737 735 -2 xdev_dev 4 - -4 xdev_count 4 - -4 recurse_flags 4 - -4 mkfs_vfat_main 1609 1605 -4 actions 4 - -4 fileAction 588 583 -5 ------------------------------------------------------------------------------ (add/remove: 0/5 grow/shrink: 3/4 up/down: 75/-30) Total: 45 bytes text data bss dec hex filename 822711 450 7684 830845 cad7d busybox_old 822773 445 7668 830886 cada6 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-29libbb/lineedit: restore ^D handling for unicodeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-27libbb/lineedit: fix the case when we configured history to have 0 linesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23*: more portability fixes by Dan FandrichDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-23*: optimize code size in strtoul callsDenys Vlasenko
function old new delta bb_parse_mode 433 431 -2 rtnl_rtntype_a2n 202 198 -4 ParseField 511 498 -13 bb_init_module_24 4730 4675 -55 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/4 up/down: 0/-74) Total: -74 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-22pidof/killall: fix bug 625 (kernel threads get stale "binary name")Denys Vlasenko
function old new delta procps_scan 1622 1642 +20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-19ps,top: add an option to show threads. +260 bytes of codeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-12fix read_cmdline API and a small buglet where "[comm]" may be too narrowDenys Vlasenko
function old new delta func_args 25 26 +1 read_cmdline 119 114 -5 display_process_list 1462 1447 -15 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 1/-20) Total: -19 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-11top, ps: do not output trailing spacesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-09-11top: add -m ("memory") optionDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>