Commit Graph

9925 Commits (5a6617acb81020a3becd91bd21f427157d7c9dcd)

Author SHA1 Message Date
Denis Vlasenko 5a6617acb8 sysctl: fix broken -p [file] - close bug 231 2009-03-29 02:22:19 +00:00
Mike Frysinger b975febeea mark msh as deprecated 2009-03-29 00:52:41 +00:00
Mike Frysinger 40b8dc410e use bb_strtou() in umask/wait and check errno to see if there was a problem rather than using endp 2009-03-29 00:50:30 +00:00
Mike Frysinger 8ec1c9dc6e make sure we check job status whenever updating the prompt 2009-03-29 00:45:26 +00:00
Mike Frysinger 0b87e4ad15 test for invalid named variables 2009-03-28 21:06:38 +00:00
Mike Frysinger 7c3e52c1bd do not let handle_dollar() accept vars that start with a digit 2009-03-28 21:06:22 +00:00
Mike Frysinger 56bdea1b43 implement `wait` builtin 2009-03-28 20:01:58 +00:00
Denis Vlasenko e61f07f036 remove ((expr)) bash'ism 2009-03-28 19:31:34 +00:00
Denis Vlasenko 701ac1864b randomconfig fix 2009-03-28 19:22:08 +00:00
Mike Frysinger 5a82845f60 update the normally disabled debug code around the syntax() func to use new maybe_die() 2009-03-28 19:09:04 +00:00
Denis Vlasenko a2333c8938 randomtest fixes 2009-03-28 19:08:23 +00:00
Mike Frysinger 78f9d8eb7a add hush tests for parameter expansion 2009-03-28 18:55:34 +00:00
Mike Frysinger 6379bb4fde implement most POSIX parameter expansions (~+500bytes) 2009-03-28 18:55:03 +00:00
Mike Frysinger 42ab86520e make sure we exit based on test failure rather than always exiting with 0 2009-03-28 15:43:47 +00:00
Mike Frysinger 25a6ca0dd4 split up feature todo by posix/bash 2009-03-28 13:59:26 +00:00
Mike Frysinger ad88d5a4cf unify `set` handling with command line processing, fixup `set` argv processing so it doesnt clobber argv when setting options, and barf on unhandled set options 2009-03-28 13:44:51 +00:00
Mike Frysinger 19a7ea126a handle the "-s" command line option that POSIX requires 2009-03-28 13:02:11 +00:00
Mike Frysinger a71cfa8aa1 rename "-f" (fake) option to "-n" to match POSIX 2009-03-28 12:57:54 +00:00
Mike Frysinger d006edb2ca tweak format modifier in debug code to fixup gcc warning 2009-03-28 12:43:53 +00:00
Mike Frysinger ec2c655702 convert some of the ENABLE_FEATURE_EDITING from CPP if to C if 2009-03-28 12:24:44 +00:00
Mike Frysinger 39456a18a1 stop lying about [[ test support 2009-03-28 12:21:57 +00:00
Denis Vlasenko 781b672b37 mkfs.vfat: fix a problem with over-estimating FAT size 2009-03-28 12:17:20 +00:00
Mike Frysinger 70a2c8d531 make lash deprecation more prominent 2009-03-28 12:12:58 +00:00
Denis Vlasenko f54dd09171 mkfs.vfat: mkdosfs compat with choosing clyster size 2009-03-28 03:22:08 +00:00
Denis Vlasenko 14ee4e65f1 mkfs.vfat: more of pointless tweaking 2009-03-28 02:28:58 +00:00
Denis Vlasenko 020f465cbd mkfs.vfat: small tweak to comments 2009-03-28 02:18:49 +00:00
Denis Vlasenko 9d04b6b630 mkdosfs (aka mkfs.vfat): new applet by Vladimir
text    data     bss     dec     hex filename
 821202     476    7616  829294   ca76e busybox_old
 823577     476    7616  831669   cb0b5 busybox_unstripped
2009-03-28 02:13:01 +00:00
Denis Vlasenko 4d3a812b71 ls: warning fix
rm: accept and ignore -v (verbose)
2009-03-27 17:22:00 +00:00
Denis Vlasenko 3603cd2808 tail: fix tail +N syntax not working. Closes bug 221. 2009-03-27 02:36:02 +00:00
Mike Frysinger bfc0fae952 enable most job functions on no-mmu systems 2009-03-26 18:14:16 +00:00
Denis Vlasenko f9beb61a81 tftp: when we infer local name from remote (-r [/]path/path/file),
strip path. This mimics wget and is generally more intuitive.
2009-03-25 03:55:53 +00:00
Mike Frysinger b2705e1652 do not make startup banner depend on job support 2009-03-23 08:44:02 +00:00
Denis Vlasenko c0ea82a457 libbb: revent previous version of "concurrent history updating"
and replace it with one which does not "snoop" history written
by others. (1) it is what bug 185 needs, and (2) it is less bloaty:

function                                             old     new   delta
load_history                                           -     252    +252
read_line_input                                     3155    3287    +132
next_token                                           914     918      +4
qrealloc                                              36      33      -3
getoptscmd                                           713     708      -5
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/2 up/down: 388/-8)            Total: 380 bytes
2009-03-23 06:33:37 +00:00
Mike Frysinger ddbee974b4 move parse_stream out of ENABLE_HUSH_TICK to avoid implicit decl/build error 2009-03-22 22:48:41 +00:00
Denis Vlasenko 57abf9e947 libbb: make history saving/loading concurrent-safe
* all history writers always append (not overwrite) history files
* they reload history if they detect that file length has changed since last
write
* they trim history file only when it grows 4 times longer than MAXLINES
* they do this atomically by creating new file and renaming it to old

Unfortunately, this comes at a price:

function                                             old     new   delta
load_history                                           -     346    +346
read_line_input                                     3155    3358    +203
new_line_input_t                                      17      31     +14
...irrelevant small jitter...
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 5/5 up/down: 573/-13)           Total: 560 bytes
2009-03-22 19:00:05 +00:00
Denis Vlasenko 3fd1046300 timeout: fix parsing of -t NUM on MMU 2009-03-22 14:49:00 +00:00
Denis Vlasenko 424f79b48f hush: rearrange functions to reduce amount of forward references.
Minimal code changes.
2009-03-22 14:23:34 +00:00
Denis Vlasenko e1300f6fc7 hush: fix segv at repeated "set -- a b c" + "shift" 2009-03-22 11:41:18 +00:00
Denis Vlasenko 786ce17d6d hush: fix strcpy of potentially overlapping strings 2009-03-21 21:51:11 +00:00
Denis Vlasenko ccff0b962c msh testsuite: fix false positive, tweak run stript 2009-03-21 19:58:58 +00:00
Denis Vlasenko 3a014b85dc ls: make readlink error to not disrupt output (try ls -l /proc/self/fd).
libbb: make xmalloc_readlink_or_warn warning more specific.

function                                             old     new   delta
xmalloc_readlink_or_warn                              33      61     +28
showfiles                                           1495    1460     -35
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 28/-35)             Total: -7 bytes
2009-03-21 19:11:23 +00:00
Denis Vlasenko 05af832097 cpio: more compat: -0 and -L options
function                                             old     new   delta
cpio_main                                           1417    1473     +56
2009-03-20 23:01:48 +00:00
Denis Vlasenko 83518d18a3 Compatibility fixes:
grep: support -z
find: support --mindepth
  together +45 bytes
cpio: support -p (configurable, +230 bytes)
libbb: tweaks for cpio
2009-03-20 22:17:13 +00:00
Denis Vlasenko 0b28103cc7 cd: "support" -v by ignoring it 2009-03-20 14:04:00 +00:00
Denis Vlasenko feecc7b74e hush: tweak testsuite 2009-03-20 12:12:33 +00:00
Denis Vlasenko a8b6dff97f hush: fix bug 207 and "hush -c" parameter passing.
Now hush -c 'printf "%s\n" "$@"' (prints "\n")
 and hush -c 'printf "%s\n" "$@"' qwe asd (prints "asd\n")
 both work correctly
2009-03-20 12:05:14 +00:00
Denis Vlasenko 5368ad53e9 ash: expand comment 2009-03-20 10:20:08 +00:00
Denis Vlasenko 11fb7cf5af hush: fix set [--] params. Closes bug 199.
function                                             old     new   delta
builtin_set                                           55     194    +139
add_strings_to_strings                                 -     130    +130
add_string_to_strings                                110      26     -84
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 1/1 up/down: 269/-84)           Total: 185 bytes
2009-03-20 10:13:08 +00:00
Denis Vlasenko 1bb3d7e450 ash: add missing comma in debug scaffolding 2009-03-20 07:45:36 +00:00
Denis Vlasenko b9e70ddf2d ash: fix a case where we close wrong descriptor; add debug hack for that 2009-03-20 01:24:08 +00:00