aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-06-11ash: revert over-zealous usage of FAST_FUNCDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-10added comments about [[ ]] to ash and hush. no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-10hush: add HUSH_BASH_COMPAT, make [[ special handling depend on itDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-10telnetd: more compact version of the fix for stray open fdsDenys Vlasenko
function old new delta telnetd_main 1520 1527 +7 make_new_session 510 416 -94 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 7/-94) Total: -87 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09telnetd: properly close fds in childDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09hush: specially handle [[ - suppress globbing & multiword expansionDenys Vlasenko
It's a bashism, but is surprisingly easy to do and costs very little code. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09randomconfig fixesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-09diff: tiny compat tweakDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-07hush: drop REDIRECT_INVALID; other minor tweaksDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-07hush: fix a segfault in export builtinDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-07stop using non-standard macro, use WEXITSTATUS insteadDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-06hush: make builtins work in pipes (eval ... | ...) on NOMMUDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05ifupdown: if $PATH is not set, do not set it to "" in childrenDenys Vlasenko
Also random code shrink: function old new delta set_environ 328 330 +2 static.label_buf 4 - -4 startup_PATH 4 - -4 my_environ 4 - -4 ifupdown_main 2148 2134 -14 setlocalenv 117 90 -27 get_var 139 112 -27 ------------------------------------------------------------------------------ (add/remove: 0/3 grow/shrink: 1/3 up/down: 2/-80) Total: -78 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05ftpd: allow multiple -S options to increase verbosity too, like -vDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05printf: accept negative numbers for %x; sh: overflowed numbers are 0Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05inetd: comment why we redirect stderr to networkDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05*: reduce #ifdef forestDenys Vlasenko
Remove unnecessary #if statements from the "more", "script", and "scriptreplay" commands. Bloatcheck says 0 bytes changed. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-05*: add FAST_FUNC to function ptrs where it makes senseDenys Vlasenko
function old new delta evalcommand 1195 1209 +14 testcmd - 10 +10 printfcmd - 10 +10 echocmd - 10 +10 func_exec 270 276 +6 echo_dg 104 109 +5 store_nlmsg 85 89 +4 pseudo_exec_argv 195 198 +3 dotcmd 287 290 +3 machtime_stream 29 31 +2 discard_stream 24 26 +2 argstr 1299 1301 +2 killcmd 108 109 +1 evalfor 226 227 +1 daytime_stream 43 44 +1 run_list 2544 2543 -1 lookupvar 62 61 -1 ipaddr_modify 1310 1309 -1 ... parse_stream 2254 2245 -9 evalpipe 356 347 -9 collect_if 210 197 -13 read_opt 869 851 -18 handle_dollar 681 658 -23 print_addrinfo 1342 1303 -39 iterate_on_dir 156 59 -97 print_route 1709 1609 -100 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 12/130 up/down: 74/-767) Total: -693 bytes text data bss dec hex filename 841748 467 7872 850087 cf8a7 busybox_old 841061 467 7872 849400 cf5f8 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-04ftpd: fix a case when with -w unknown commands are ignored with no error codeDenys Vlasenko
Signed-off-by: Stefan Seyfried <seife@suse.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-03rename CONFIG_FEATURE_TAR_GZIPBernhard Reutner-Fischer
CONFIG_FEATURE_TAR_GZIP was renamed to CONFIG_FEATURE_SEAMLESS_GZ. Adjust testsuite accordingly. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
2009-06-03tweak docsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-03hush: document a TODO in export builtinDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-03hush: fix a case when backgrounded cmd makes shell hangDenys Vlasenko
Signed-off-by: Bayram Kurumahmut <kbayram@ubicom.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-03hush: add support for local builtinDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-06-01bloat-o-meter: touchup argv handlingMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org> Reported-by: Matt Mackall <mpm@selenic.com>
2009-06-01bloat-o-meter: fix tab/space mixingMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01hush_test: stop mixing tabs/spaces for indentationMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01gitignore: add debugging related filesMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01hush: unify syntax_error_unterm_{ch,str} a bitMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01hush: push down expansion var in handle_dollar()Mike Frysinger
Declare the variable in the scope it is used rather than the entire function scope so it's obvious it is only used there. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01hush: add support for special vars in bracesMike Frysinger
Some people like to use ${?} rather than $?, so make sure we support all the special single char vars that use this form. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01hush_test: filter test output to avoid C lib differencesMike Frysinger
The getopt function in some C libraries wraps the option in single quotes while others do not. Avoid the issue by running sed on the output and strip all quotes. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01lineedit: fix warning about unused label when VI editing is disabledMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-06-01nc, hush: cosmetic cleanups, no code changesDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-29read_key: drop optimization where we read 3 bytes at onceDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-28hust: trivial simplification in builtin_typeDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-28hush: fix bug 353 (wrong handling of \x in assignments)Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-28hush: optimize type builtin a bit moreDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-28hush: optimize type builtin a bitDenys Vlasenko
function old new delta builtin_type 130 125 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-28only build common libarchive objs when neededMike Frysinger
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-28modprobe: fix more bugs in modprobe -rDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-28cpio.tests: fix false positiveDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-27hush: implement `type`Mike Frysinger
Implement support for the POSIX `type` command. Only POSIX stuff is supported here, no bash extensions like -p or -P. In the process, split the $PATH searching code out of builtin_source() and into its own find_in_path() function so we don't duplicate it. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-27hush: remove outdated TODO and superfluous macro; fix compile breakageDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-26POSIX conformance documentation for busyboxDavid Krakov
Attached a start for POSIX conformance documentation for busybox (see TODO file and discussion last week). A table of all options as defined by POSIX and as implemented by busybox (see for a FreeBSD example http://people.freebsd.org/~schweikh/posix-utilities.html). Only the tools that are stand-alone applets are documented (not ash built-ins as 'read'), as there are multiple shells. When there are two versions (echo) the stand-alone version was checked. I think this may be the wrong way to go, as most users will probably use the built-in version - but which shell? The table was auto-generated by running, for each POSIX utility, latest git allyesconfig* "busybox <tool> --help" and parsing the output, and comparing that to tool options extracted from its man page at http://www.opengroup.org/onlinepubs/9699919799/. This means that it the usage string is not correct, the table is also wrong. I noticed that for 'kill', for example, the usage string does not mention the -s, -q, -o options. For each option is set whether it exists in busybox and if it is, is it compliant to the standard. Of course, checking compliance can only be done manually - a process which will probably take some time (see 'cat' for example). I didn't post the auto-generation script (python, ugly) because the table will now change manually; I can post it if there is anyone interested. As for the tools not implemented by busybox at all, I think most of them are indeed fairly esotetic. Some I was suprised to see missing are link, file, newgrp, unlink. * Well, almost allyesconfig - but nothing very POSIX-y was disabled. Signed-off-by: David Krakov <krakov@gmail.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2009-05-26hush: tweak commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-26hush: rename last_waitpid_was_0 to we_have_childrenDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-26modprobe: fix modprobe -r. closes bug 315Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-25hush: fix SIGCHLD counting code, but keep it disabled for now.Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-05-25flash_lock, flash_unlock: new appletsDenys Vlasenko
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>