aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* ip: code shrinkDenys Vlasenko2013-07-153-20/+16
| | | | | | | | | | | | | function old new delta do_ipaddr 78 81 +3 do_iprule 140 139 -1 do_iptunnel 283 278 -5 iprule_modify 851 841 -10 ipaddr_modify 1293 1236 -57 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/4 up/down: 3/-73) Total: -70 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* typo fix in commentDenys Vlasenko2013-07-141-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Commonalize typical [b,]k,m suffix structDenys Vlasenko2013-07-1311-58/+22
| | | | | | | | | | | | | function old new delta bkm_suffixes - 32 +32 static.km_suffixes 24 - -24 suffixes 32 - -32 static.bkm 32 - -32 head_tail_suffixes 32 - -32 ------------------------------------------------------------------------------ (add/remove: 2/6 grow/shrink: 0/0 up/down: 72/-160) Total: -88 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* chrt: remove warning for _POSIX_PRIORITY_SCHEDULINGBernhard Reutner-Fischer2013-07-081-3/+0
| | | | Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* typo fix in commentDenys Vlasenko2013-07-081-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* tail: code shrinkDenys Vlasenko2013-07-081-16/+15
| | | | | | | | | | function old new delta tail_main 1548 1613 +65 tail_read 136 34 -102 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 65/-102) Total: -37 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sed: remove now-redundant backslash-newline handlingDenys Vlasenko2013-07-081-16/+2
| | | | | | | | | | | 4b0bb9e0fd9ec06e9e61b1a1527ace99ea9fe571 added this code in 2007, then in a2215b98f7d65bc613b9c8f008d79672402c6a07 more general fix was added. function old new delta add_cmd_block 98 58 -40 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sed: document where we are more liberal then GNUDenys Vlasenko2013-07-081-0/+6
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Call setlocale("") , not "C", if we want to set the default oneDenys Vlasenko2013-07-071-3/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unicode: check $LC_CTYPE too to detect Unicode modeDenys Vlasenko2013-07-054-2/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* foo*sum: Correct syntax errorCristian Ionescu-Idbohrn2013-07-041-1/+1
| | | | | | | coreutils/md5_sha1_sum.c:156:3: error: expected '}' before 'else' Signed-off-by: Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com> Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* tail: track file size only in -f modeDenys Vlasenko2013-07-021-11/+15
| | | | | | This eliminates extra fstat and lseek calls on every read Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* foo*sum: report I/O errors, don't merely exit with 1.Denys Vlasenko2013-07-021-1/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* unicode: check $LC_ALL to detect Unicode mode, not only $LANGDenys Vlasenko2013-07-023-6/+18
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* wget: do not abort if "_" is encountered in a HTTP headerDenys Vlasenko2013-07-011-2/+10
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* cryptpw: do not segfault on EOF. Closes 6350Denys Vlasenko2013-06-301-7/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: change execl sentinels from NULL to (char*)0Rich Felker2013-06-303-3/+3
| | | | | Signed-off-by: Rich Felker <dalias@aerifal.cx> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ubi_tools: enhance -s option to allow size multiplier to match mtd-utilsDenys Vlasenko2013-06-301-1/+8
| | | | | | | | | | Based on patch by Paul B. Henson <henson@acm.org> function old new delta static.size_suffixes - 32 +32 ubi_tools_main 1141 1148 +7 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ubi_tools: add forgotten argv++Denys Vlasenko2013-06-301-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ubi_tools: extend supported volume size to 64 bits; shrink codeDenys Vlasenko2013-06-301-149/+154
| | | | | | | | | | | function old new delta get_num_from_file - 90 +90 packed_usage 29395 29377 -18 ubi_tools_main 1349 1141 -208 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/2 up/down: 90/-226) Total: -136 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ubimkvol: add -m option to create volume of maximum sizePaul B. Henson2013-06-301-6/+45
| | | | | Signed-off-by: Paul B. Henson <henson@acm.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* pstree: fix theoretically unsafe codeDenys Vlasenko2013-06-281-1/+1
| | | | | | In practice, p->comm is never long enough to trigger the bug, but still. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ping: code shrinkDenys Vlasenko2013-06-281-13/+14
| | | | | | | function old new delta unpack_tail 262 243 -19 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Move create_icmp[6]_socket to its only user, and simplify itDenys Vlasenko2013-06-285-99/+44
| | | | | | | | | | | | | function old new delta run_applet_and_exit 711 714 +3 sendping_tail 239 236 -3 common_ping_main 1798 1770 -28 create_icmp_socket 65 - -65 create_icmp6_socket 65 - -65 ------------------------------------------------------------------------------ (add/remove: 0/4 grow/shrink: 1/2 up/down: 3/-161) Total: -158 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* losetup: assorted fixes. Closes 6314Denys Vlasenko2013-06-272-18/+23
| | | | | | | | | | | | | "losetup -d" was not complaining that LOOPDEV is missing. "losetup -a" was listing only up to /dev/loop9. "losetup -f" looped forever if llop0 was taken, and never tried anything after /dev/loop9. "-o" with other options (say, -r) had no effect. function old new delta losetup_main 376 419 +43 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* lsof: correct check for symbolic linkThomas De Schampheleire2013-06-271-3/+6
| | | | | | | | | | | | | | | | | | | | Busybox lsof used the d_type field of a 'struct dirent' to verify whether the entry is a symbolic link. This field, however, is not portable. On at least one board [1] I have seen, that field is 0, and the check fails even though the entry is a link. The explicit check for a symbolic link is really only needed to skip the default directory entries '.' and '..'. The directory /proc/<pid>/fd/ should not contain anything else but these two and symbolic links. With these assumptions, this patch replaces the explicit link check with a basic check for '.' and '..' (and any hidden file). In the unlikely case that there are other file types, xmalloc_readlink() will return NULL, and we can skip the entry. [1] A MIPS-based board with glibc 2.9, Linux 2.6.32.27. Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* nslookup: set default DNS server again. Hopefully helps with 675Denys Vlasenko2013-06-271-2/+13
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* md5/sha512: a better fix for strict aliasing warningsDenys Vlasenko2013-06-272-3/+4
| | | | | | | The locations *are* well-aligned for direct stores on any architecture. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* md5/sha512: fix strict aliasing warningsMike Frysinger2013-06-191-3/+3
| | | | | | | | | | | | | | | | | | | | If the target can tolerate these issues, then gcc is smart enough to generate the same code (x86_64 produces the same code). If the target can't, then it needs the memcpy anyways. libbb/hash_md5_sha.c: In function 'common64_end': libbb/hash_md5_sha.c:87:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[64 - 8]) = t; libbb/hash_md5_sha.c: In function 'sha512_end': libbb/hash_md5_sha.c:886:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[128 - 8]) = t; libbb/hash_md5_sha.c:889:4: warning: dereferencing type-punned pointer will break strict-aliasing rules *(uint64_t *) (&ctx->wbuffer[128 - 16]) = t; Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* pstree: stop truncating thread namesMike Frysinger2013-06-191-3/+10
| | | | | | | | | This also fixes a minor buffer overflow when displaying threads as add_proc() only expects COMM_LEN bytes, but we give it one more than that. Reported-by: Dag Wieers <dag@wieers.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
* ntpd: set offset to 0.0 in "usync" eventDenys Vlasenko2013-05-231-3/+8
| | | | | | | function old new delta ntpd_main 1030 1026 -4 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: set G.last_script_run even if script isn't configuredDenys Vlasenko2013-05-221-2/+2
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: make "unsync" code actually work.Denys Vlasenko2013-05-221-3/+13
| | | | | | While at it: don't run "periodic" if interrupted by a signal. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* ntpd: drop delay outliers; run "unsync" handler if no replies for some timeDenys Vlasenko2013-05-221-8/+34
| | | | | | | | | | function old new delta ntpd_main 960 1029 +69 recv_and_process_peer_pkt 834 892 +58 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 127/0) Total: 127 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sulogin: allow system maintenance login if root password is emptyJonathan Liu2013-05-212-3/+5
| | | | | | | | | | | | | | The current password checking is unable to distinguish between the user entering an empty password or pressing Control-D. As a result, an empty password always results in normal startup. We modify bb_ask to return NULL if Control-D is pressed without entering a password. The sulogin applet is then modified to only proceed to normal startup if bb_ask returns NULL. This covers EOF with no password, interrupt by timeout and ^C. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* sulogin: correct lying commentDenys Vlasenko2013-05-211-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* init: remove special-case code for machines with less tham 1 MB of RAM.Denys Vlasenko2013-05-211-15/+18
| | | | | | | function old new delta init_main 920 781 -139 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stty: disable CIBAUD leak check - it is not necessary on LinuxDenys Vlasenko2013-05-171-1/+6
| | | | | | | function old new delta stty_main 1233 1196 -37 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* stty: code shrinkDenys Vlasenko2013-05-171-30/+29
| | | | | | | function old new delta set_mode 759 725 -34 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcp: code shrinkDenys Vlasenko2013-05-171-17/+13
| | | | | | | | function old new delta attach_option 416 413 -3 allocate_tempopt_if_needed 74 - -74 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* udhcpc: fix a problem with binary-encoded options #2Denys Vlasenko2013-05-171-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find:: get rid of nested function (it's a gcc-ism)Denys Vlasenko2013-05-161-6/+45
| | | | | | | | | | | function old new delta alloc_action - 80 +80 parse_params 1459 1445 -14 static.alloc_action 98 - -98 ------------------------------------------------------------------------------ (add/remove: 1/1 grow/shrink: 0/1 up/down: 80/-112) Total: -32 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: fix grep -x to not set REG_NOSUBJames Hogan2013-05-162-1/+15
| | | | | | | | | | | | | | | When -F isn't specified (and !ENABLE_EXTRA_COMPAT), grep -x uses regexec's regmatch_t output to determine if the match was the entire line. However it also set the REG_NOSUB flag which makes it ignore the regmatch_t argument. Add an exception to the setting of REG_NOSUB for OPT_x and add some test cases to test the behaviour of -x. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Natanael Copa <ncopa@alpinelinux.org> Cc: Denys Vlasenko <vda.linux@googlemail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* volume_id_internal.h: drop unoptimized byteswap routinesDenys Vlasenko2013-05-151-36/+16
| | | | | | | function old new delta volume_id_probe_hfs_hfsplus 802 627 -175 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* grep: don't bail out on first mismatch if '-w' option is setBartosz Golaszewski2013-05-152-8/+20
| | | | | Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix build failures caused by not compiling open_transformer.c (#2)Denys Vlasenko2013-05-151-0/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* find: support -HLPDenys Vlasenko2013-05-141-3/+12
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* mdev: use $DEVNAME in uevent sysfs file for device node nameNikolaus Voss2013-05-131-12/+35
| | | | | | | | | | | | | | 516530c932bd17d87c9eb4347a490be051e495f4 uses $DEVNAME variable for device node name. This is fine, but only works for hotplugging, "mdev -s" will behave differently when DEVNAME and basename(path) differ. This patch extracts the DEVNAME from the uevent sysfs file in make_device(), thus works for hot- and coldplugging; so using the environment DEVNAME on hotplug events is no longer necessary. Signed-off-by: Nikolaus Voss <n.voss@weinmann.de> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* hush: fix build failure if FEATURE_EDITING=y && !HUSH_INTERACTIVEDenys Vlasenko2013-05-121-3/+3
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* Fix build failures caused by not compiling open_transformer.cDenys Vlasenko2013-05-121-12/+23
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>