aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* adjtimex: make its help text and printed data a bit less crypticDenys Vlasenko2014-04-171-13/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb/obscure.c: code shrink. Suggested by Tito.Denys Vlasenko2014-04-161-1/+1
| | | | | | | function old new delta string_checker 97 92 -5 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: set $HOSTNAME is bash compat. Closes 7028Denys Vlasenko2014-04-152-1/+16
| | | | | | | | function old new delta hush_main 1056 1128 +72 ash_main 1442 1487 +45 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: provide usleep() fallback implementationBernhard Reutner-Fischer2014-04-132-2/+32
| | | | | | | | POSIX.1-2008 removed the usleep function, provide a fallback implementaion using the recommended nanosleep(). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* less: fix bugs discovered with "git log -p | less -m" on kernel treeDenys Vlasenko2014-04-131-14/+24
| | | | | | | function old new delta read_lines 685 733 +48 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: some simplificationsDenys Vlasenko2014-04-051-116/+120
| | | | | | | | | | | | function old new delta file_insert 301 315 +14 init_text_buffer 179 171 -8 colon 2889 2878 -11 file_size 37 - -37 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/2 up/down: 14/-56) Total: -42 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: clear undo buffer when we change to another fileDenys Vlasenko2014-04-031-69/+87
| | | | | | | | | | | | function old new delta init_text_buffer 156 190 +34 undo_push 360 382 +22 count_lines 74 72 -2 undo_pop 246 222 -24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 56/-26) Total: 30 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: undo code shrinkDenys Vlasenko2014-04-031-41/+42
| | | | | | | | function old new delta undo_push 414 395 -19 do_cmd 4803 4761 -42 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* vi: undo support for vi with intermediate queuingJody Bruchon2014-04-021-54/+448
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta undo_push - 411 +411 undo_pop - 288 +288 do_cmd 4160 4426 +266 char_insert 363 483 +120 undo_queue_commit - 61 +61 text_hole_delete 108 163 +55 string_insert 94 127 +33 colon 2864 2882 +18 yank_delete 92 101 +9 vi_main 273 280 +7 dot_scroll 88 93 +5 dot_right 29 34 +5 dot_prev 20 25 +5 dot_next 20 25 +5 dot_left 24 29 +5 dot_end 20 25 +5 dot_begin 20 25 +5 init_text_buffer 154 156 +2 text_hole_make 145 142 -3 file_insert 333 318 -15 ------------------------------------------------------------------------------ (add/remove: 3/0 grow/shrink: 15/2 up/down: 1305/-18) Total: 1287 bytes (without queuing it's ~870 bytes) Signed-off-by: Jody Bruchon <jody@jodybruchon.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: specify '-nostldlib' when linking to .o filesDrew Moseley2014-04-021-1/+2
| | | | | | | | | | | | | | | | | | | For certain cross build scenarios the LD variable is overridden to use the gcc executive to ensure all the target tuning parameters are used. In these cases, the executive errors out as shown below but since this step is only linking to a .o file the standard libs are not needed. $ make LD=gcc applets/built-in.o LD applets/built-in.o /usr/bin/ld: cannot find -lgcc_s /usr/bin/ld: cannot find -lgcc_s collect2: ld returned 1 exit status make[1]: *** [applets/built-in.o] Error 1 make: *** [applets_dir] Error 2 Signed-off-by: Drew Moseley <drew_moseley@mentor.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* swapon/swapoff: -a returns 0 on ignored errorsTito Ragusa2014-04-011-3/+2
| | | | | Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* swapon/swapoff: size reduction, cleanup, fixes, improvementsTito Ragusa2014-03-311-115/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1) real swapon/swapoff handles also devices on the commandline with -a; 2) xstat(device) in swap_enable_disable aborts on error when cycling through fstab so some devices are not handled; 3) duplicated code for ENABLE_FEATURE_SWAPON_DISCARD and ENABLE_FEATURE_SWAPON_PRI was moved to functions. 4) silence some error messages with -a; 5) minor cleanups and code refactoring reduced the size as per bloat-check: 6) I also added support for /proc/swaps handling to swapoff: "When the -a flag is given, swapping is disabled on all known swap devices and files (as found in /proc/swaps or /etc/fstab)." So now swapoff first cycles through /proc/swaps and then through fstab to swapoff all devices. function old new delta set_discard_flag - 106 +106 swap_enable_disable 147 238 +91 set_priority_flag - 79 +79 retrieve_file_data 470 467 -3 swap_on_off_main 638 418 -220 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 1/2 up/down: 276/-223) Total: 53 bytes Signed-off-by: Tito Ragusa <farmatito@tiscali.it> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: fix a case where progress bar isn't updated if writes are very slowDenys Vlasenko2014-03-271-2/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* add discard option -d to swaponMatt Whitlock2014-03-232-9/+85
| | | | | Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* fix interaction of -a and -p options in swaponMatt Whitlock2014-03-231-2/+5
| | | | | | | Swap entries in /etc/fstab inherit the priority specified on the command line unless they have 'pri' in their mount options. Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* avoid calling bb_strtou twice in MIN macro expansionMatt Whitlock2014-03-231-5/+8
| | | | | | | Also, the maximum allowable value of swap priority is technically SWAP_FLAG_PRIO_MASK >> SWAP_FLAG_PRIO_SHIFT. Signed-off-by: Matt Whitlock <busybox@mattwhitlock.name> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: add optional support for /etc/ntp.confDenys Vlasenko2014-03-232-4/+39
| | | | | | | | | | | | function old new delta add_peers - 98 +98 packed_usage 29470 29511 +41 ntp_init 407 428 +21 pw_encrypt 14 27 +13 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 3/0 up/down: 173/0) Total: 173 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* docs/new-applet-HOWTO.txt: tweak a bitDenys Vlasenko2014-03-171-18/+15
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: fix a bad check for uclibc >= 0.9.31Denys Vlasenko2014-03-161-4/+7
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* docs: update new-applet-HOWTO.txtBartosz Golaszewski2014-03-161-35/+62
| | | | | | | | This patch adds some information about the gen_build_files.sh script and how it allows to keep the Kbuild, Config.in etc. declarations in .c files. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash: make "locak VAR" unset VAR (bash does that)Denys Vlasenko2014-03-163-0/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* script: make it work even if fd 0 is closedDenys Vlasenko2014-03-162-1/+8
| | | | | | | Testcase: script -q -c "echo hey" /dev/null 0>&- Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: for "find", use POSIX not operator (!) instead of -notDenys Vlasenko2014-03-161-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* su: add a delay if the password is incorrectRomain Naour2014-03-161-0/+1
| | | | | Signed-off-by: Romain Naour <romain.naour@openwide.fr> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: fix a thinko about 2^64-1 factorizationDenys Vlasenko2014-03-151-5/+11
| | | | | | | function old new delta next_random 113 119 +6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: make "true" built-inDenys Vlasenko2014-03-141-0/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* random: cosmetic tweaks in debug codeDenys Vlasenko2014-03-131-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ash,hush: improve randomness of $RANDOM, add easy-ish way to test itDenys Vlasenko2014-03-132-17/+135
| | | | | | | | function old new delta next_random 68 113 +45 change_random 103 121 +18 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: trim help textDenys Vlasenko2014-03-071-4/+4
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: do not use strings for -i RANGE caseDenys Vlasenko2014-03-071-3/+5
| | | | | | | function old new delta shuf_main 482 496 +14 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: improve help textBartosz Golaszewski2014-03-071-3/+3
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: fix a segfault on 'shuf -e'Bartosz Golaszewski2014-03-071-1/+2
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* use [s]rand(), not [s]random()Denys Vlasenko2014-03-053-12/+12
| | | | | | | | rand() is the most standard C library function, and on uclibc they are the same. I guess they are the same in most todays' libc... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* shuf: new appletDenys Vlasenko2014-03-051-0/+150
| | | | | | | | | | | | | | | function old new delta shuf_main - 478 +478 packed_usage 29571 29719 +148 applet_names 2460 2465 +5 applet_main 1428 1432 +4 applet_nameofs 714 716 +2 ------------------------------------------------------------------------------ (add/remove: 2/0 grow/shrink: 4/0 up/down: 637/0) Total: 637 bytes Based on the code by Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* man: default to asciiDenys Vlasenko2014-03-031-1/+2
| | | | | | | | Default to ascii instead of latin1. Otherwise man pages can be displayed incorrectly. E.g. bullets show as "<B7>". Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ip link: add support for "address ETHADDR". Closes 4862Denys Vlasenko2014-03-011-2/+188
| | | | | | | function old new delta do_iplink 2175 2289 +114 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unlzma: add comments about possible bug from BZ 2689Denys Vlasenko2014-02-281-0/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unlzma: move some variables in "more local" scopeDenys Vlasenko2014-02-281-7/+10
| | | | | | No code changes as verified by objdump Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: ignore NAKs from "wrong" servers. Closes 4267Denys Vlasenko2014-02-271-1/+24
| | | | | | | function old new delta udhcpc_main 2716 2814 +98 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ls: make "ls -s DIR" show total too. Clases 4946Denys Vlasenko2014-02-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: fix compilation breakageDenys Vlasenko2014-02-271-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix -w match if first match isn't a word, but second is. Closes 4520Denys Vlasenko2014-02-272-14/+21
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* xargs: add support for -I and -i. Closes 493Denys Vlasenko2014-02-274-56/+176
| | | | | | | | | | | | | | | | | | function old new delta process_stdin_with_replace - 195 +195 xmalloc_substitute_string - 145 +145 xargs_main 808 884 +76 count_strstr - 45 +45 packed_usage 29580 29571 -9 parse_params 1445 1416 -29 func_exec 285 138 -147 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 1/3 up/down: 461/-185) Total: 276 bytes text data bss dec hex filename 922156 932 17692 940780 e5aec busybox_old 922440 932 17692 941064 e5c08 busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: code shrinkDenys Vlasenko2014-02-261-5/+3
| | | | | | | function old new delta func_exec 306 285 -21 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nc: fix option bit positions. Closes 6926Denys Vlasenko2014-02-261-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hwclock: fix setting of tz_minuteswest. Closes 5414Denys Vlasenko2014-02-251-2/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* build system: remove a dead link from Config help textDenys Vlasenko2014-02-251-4/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* du, copy_file: fix file matching on cramfs. Closes 5456Denys Vlasenko2014-02-251-4/+15
| | | | | | | | | | | function old new delta is_in_ino_dev_hashtable 88 108 +20 add_to_ino_dev_hashtable 150 142 -8 reset_ino_dev_hashtable 84 75 -9 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/2 up/down: 20/-17) Total: 3 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* libbb: trivial code shrinkDenys Vlasenko2014-02-251-6/+11
| | | | | | | function old new delta reset_ino_dev_hashtable 84 74 -10 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sysctl: do not error out showing write-only data. Closes 6386Denys Vlasenko2014-02-241-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>