aboutsummaryrefslogtreecommitdiff
path: root/shell/lash.c
AgeCommit message (Collapse)Author
2007-06-25Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms ↵Denis Vlasenko
<wharms@bfs.de>)
2007-06-13*: BB_BANNER -> bb_banner (it is not a const or #define)!Denis Vlasenko
correct_password: explain in detail why it is ok to use bb_banner fsck_minix: make it print bb version, not it's own (outdated/irrelevant) one Marginal size difference: text data bss dec hex filename 679119 2700 15632 697451 aa46b busybox_old 679091 2700 15632 697423 aa44f busybox_unstripped
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-05-26xpipe: introduce (saves ~170 bytes)Denis Vlasenko
udhcp/signalpipe.c: use pipe instead of socketpair.
2007-04-14lash: recognize and use NOFORK appletsDenis Vlasenko
lash,hush: fix kill buglet (didn't properly recognize ESRCH)
2007-04-14hush: use NOFORK applets as appropriate. Net reduction of code size.Denis Vlasenko
2007-04-12lash: "forking" applets are actually can be treated the same way as ↵Denis Vlasenko
"non-forked". Also save a bit of space on trailing NULL array elements.
2007-04-12fix realloc-of-non-malloced pointer, and reduce size while at itDenis Vlasenko
2007-04-12pass a copy of argv[i] to NOFORK applets (they may permute it etc).Denis Vlasenko
set/save/restore more shared global variables whan call one applet from another
2007-04-11bb_full_fd_action: remove potential xmalloc from NOFORK pathDenis Vlasenko
cat: stop using stdio.h opens libbb: introduce & use open[3]_or_warn function old new delta open3_or_warn - 54 +54 bb_cat 115 144 +29 open_or_warn - 25 +25 unlzma 2404 2412 +8 chattr_main 334 339 +5 xstrtoul_range_sfx 251 255 +4 telnet_main 1514 1510 -4 static.opt 4 - -4 qgravechar 122 118 -4 fuser_add_pid 61 54 -7 fuser_add_inode 154 147 -7 writeFileToTarball 1542 1534 -8 refresh 1156 1148 -8 do_show 856 846 -10 read_leases 212 200 -12 setup_redirects 236 222 -14 iproute_list_or_flush 1582 1568 -14 read_config 427 411 -16 write_leases 284 264 -20 hash_file 338 318 -20 copy_file 1760 1740 -20 do_iproute 2610 2588 -22 bb_full_fd_action 320 269 -51 open_to_or_warn 103 49 -54 fuser_main 1660 1596 -64 .rodata 131160 131096 -64 ------------------------------------------------------------------------------ (add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
2007-04-11style fixes, no code changes.Denis Vlasenko
2007-04-11rename: run_applet_by_name -> run_applet_and_exitDenis Vlasenko
2007-04-10Rename two config options:Denis Vlasenko
FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS Make SH_STANDALONE depend on PREFER_APPLETS. getopt.c: more randomconfig-induced fixes
2007-04-10style fixes. No code changes.Denis Vlasenko
2007-04-08add some missed statics on constant objects.Denis Vlasenko
fix few #ifndef ENABLE_xxx # size busybox_old busybox_unstripped text data bss dec hex filename 677152 2920 18208 698280 aa7a8 busybox_old 676420 2920 18208 697548 aa4cc busybox_unstripped
2007-03-31lash: make -c work; crush buffer overrun and free of non-malloced ptrDenis Vlasenko
(from Mats Erik Andersson <mats.andersson64@comhem.se>)
2007-03-31lash: style cleanupDenis Vlasenko
2007-03-24random style fixes (extra spaces deleted)Denis Vlasenko
2007-02-11syslogd: fix "readpath bug" by using readlink insteadDenis Vlasenko
libbb: rename xgetcwd and xreadlink
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2007-01-30lash: -Wwrite-strings fixesDenis Vlasenko
2007-01-22cleanups: unnecessary casts, unified const_1, eliminate cross-.c fileDenis Vlasenko
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED", removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
2007-01-22cmdedit is not a 'command' editing anymore, it's just editing (generic),Denis Vlasenko
so rename stuff accordingly.
2007-01-22Convert cmdedit into more generic line input facilityDenis Vlasenko
(make history and completion optional at runtime). Use it for fdisk, as an example. Some unrelated fixes in fdisk are also here.
2007-01-19openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup codeDenis Vlasenko
(will close all fd's > 2 on daemonization now) getty: fix "getty -" support, and also do not try to chown/chmod "-" telnetd: fix "lost ctty" bug Yet another attempt on saner function names: bb_sanitize_server_stdio(0/1) -> bb_sanitize_stdio() + bb_daemonize();
2006-12-26style fixesDenis Vlasenko
last xcalloc replaced by xzalloc
2006-12-22remove useless casts (type*) xzalloc(...)Denis Vlasenko
2006-11-27fix remaining survivors of the return(a) cleanupDenis Vlasenko
2006-11-21httpd: LC_TIME locale _must_ be POSIX to httpd! We speak over the net!Denis Vlasenko
2006-10-26rename functions to more understandable namesDenis Vlasenko
2006-10-26silly size savings and capitalization fixesDenis Vlasenko
2006-10-03bb_applet_name -> applet_nameDenis Vlasenko
2006-10-03getopt_ulflags -> getopt32.Denis Vlasenko
It is impossible to formulate sane ABI based on size of ulong because it can be 32-bit or 64-bit. Basically it means that you cannot portably use more that 32 option chars in one call anyway... Make it explicit.
2006-08-20- merge -r15463:15564 from busybox_scratch branch through these changesets:Bernhard Reutner-Fischer
------------------------------------------------------------------------ r15465 | aldot | 2006-06-21 20:48:06 +0200 (Wed, 21 Jun 2006) | 3 lines - use CONFIG_BUSYBOX_EXEC_PATH as before it one was broken by a recent revert. - use xchdir() since all is invain if it fails there anyways, supposedly ------------------------------------------------------------------------ r15466 | aldot | 2006-06-21 20:55:16 +0200 (Wed, 21 Jun 2006) | 2 lines - adjust docs to take CONFIG_BUSYBOX_EXEC_PATH into account. ------------------------------------------------------------------------ r15467 | aldot | 2006-06-21 21:31:24 +0200 (Wed, 21 Jun 2006) | 18 lines - partial fallout of my TREE_USED touchup against gcc-4.2: rip unused vars, save s 144 bytes text data bss dec hex filename 862434 10156 645924 1518514 172bb2 busybox.old 862322 10156 645892 1518370 172b22 busybox function old new delta z_len 4 - -4 textend 4 - -4 part_nb 4 - -4 insize 4 - -4 ifile_size 4 - -4 do_link 4 - -4 new_text 70 60 -10 ipaddr_list_link 33 23 -10 gzip_main 898 822 -76 ------------------------------------------------------------------------------ (add/remove: 0/6 grow/shrink: 0/3 up/down: 0/-120) Total: -120 bytes ------------------------------------------------------------------------ r15468 | aldot | 2006-06-21 21:43:05 +0200 (Wed, 21 Jun 2006) | 19 lines - remove useless global exports function old new delta rpm_main 940 1601 +661 rpm_getstring 107 112 +5 rpm_getint 148 153 +5 loop_through_files 103 106 +3 fileaction_dobackup 115 113 -2 fileaction_list 5 - -5 rpm_getcount 42 - -42 extract_cpio_gz 161 - -161 rpm_gettags 504 - -504 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 4/1 up/down: 674/-714) Total: -40 bytes text data bss dec hex filename 862322 10156 645892 1518370 172b22 busybox.old 862290 10156 645892 1518338 172b02 busybox ------------------------------------------------------------------------ r15555 | aldot | 2006-06-30 14:10:11 +0200 (Fri, 30 Jun 2006) | 22 lines - shrink syslog a little bit, move a big buffer (for 'line') off the bss, fold s emaphore stuff into single caller manually. stats: function old new delta logMessage 395 427 +32 message 1245 1257 +12 opts - 4 +4 small 1 - -1 local_logging 4 - -4 doRemoteLog 4 - -4 circular_logging 4 - -4 syslogd_main 1299 1285 -14 static.res 36 16 -20 .rodata 186650 186586 -64 static.line 1025 - -1025 ------------------------------------------------------------------------------ (add/remove: 1/5 grow/shrink: 2/3 up/down: 48/-1136) Total: -1088 bytes cow@s37:~/src/busybox_scratch$ size sysklogd/syslogd.o{.orig,} text data bss dec hex filename 3723 348 5242 9313 2461 sysklogd/syslogd.o.orig 3697 348 4188 8233 2029 sysklogd/syslogd.o ============================================================================== Overall bloatcheck for the changeset mentioned above: function old new delta rpm_main 953 1608 +655 logMessage 395 427 +32 message 1245 1257 +12 opts - 4 +4 rpm_getstring 107 110 +3 rpm_getint 148 151 +3 loop_through_files 103 104 +1 small 1 - -1 fileaction_dobackup 115 113 -2 z_len 4 - -4 textend 4 - -4 part_nb 4 - -4 local_logging 4 - -4 insize 4 - -4 ifile_size 4 - -4 do_link 4 - -4 doRemoteLog 4 - -4 circular_logging 4 - -4 fileaction_list 5 - -5 new_text 70 60 -10 ipaddr_list_link 33 23 -10 clear_bufs 31 21 -10 syslogd_main 1287 1273 -14 builtin_help 190 176 -14 static.res 36 16 -20 builtin_source 229 199 -30 rpm_getcount 42 - -42 gzip_main 842 786 -56 .rodata 227176 227112 -64 lash_main 609 527 -82 busy_loop 3883 3739 -144 extract_cpio_gz 155 - -155 rpm_gettags 501 - -501 static.line 1025 - -1025 ------------------------------------------------------------------------------ (add/remove: 1/15 grow/shrink: 6/12 up/down: 710/-2221) Total: -1511 bytes
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only had one user), clean up lots of #includes... General cleanup pass. What I've been doing for the last couple days. And it conflicts! I've removed httpd.c from this checkin due to somebody else touching that file. It builds for me. I have to catch a bus. (Now you know why I'm looking forward to Mercurial.)
2006-07-12A couple things that got tangled up in my tree, easier to check in both thanRob Landley
untangle them: Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the signal list to that required by posix (they can specify the numbers for the rest if they really need them). (This is preparatory cleanup for adding a timeout applet like Roberto Foglietta wants.) Export the itoa (added due to Denis Vlasenko, although it's not quite his preferred implementation) from xfuncs.c so it's actually used, and remove several other redundant implementations of itoa and utoa() in the tree.
2006-07-09Bugfix from Shaun Jackman (check that argv[optind] isn't null beforeRob Landley
dereferencing it) plus a bunch of tweaks from me.
2006-07-01Patch from Shaun Jackman moving the var=value logic to here it can do some good.Rob Landley
2006-07-01Get rid of all "#if 0" content."Robert P. J. Day"
2006-07-01Remove all usage of the "register" storage class specifier."Robert P. J. Day"
2006-06-20Cleanup patch from Shaun Jackman converting %m to perror.Rob Landley
2006-06-19Make some 64 bit warnings go away on x86-64.Rob Landley
2006-06-13Patch from Shaun Jackman to detect "name=value" variable assignments. RandomRob Landley
cleanup at the end by me to make some unrelated #ifdefs go away...
2006-06-13Make lash smaller. (Use llist_t for file closing, and different allocationRob Landley
functions.)
2006-06-07- reuse strings and messages. Saves about 600BBernhard Reutner-Fischer
2006-06-032006-06-02 Shaun Jackman <sjackman@gmail.com>Bernhard Reutner-Fischer
* shell/lash.c (pseudo_exec) [_NEWLIB_VERSION]: Remove the __getopt_initialized hackery.
2006-06-02- move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer
and eventual platform specific includes in early.
2006-03-10Patch from Denis Vlasenko turning static const int (which gets emitted intoRob Landley
the busybox binary) into enums (which don't).
2006-02-16moved BB_BANNER to applets/version.c file: make kernel like version, "Vladimir N. Oleynik"
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-01-30fix up yet more annoying signed/unsigned and mixed type errorsEric Andersen