aboutsummaryrefslogtreecommitdiff
path: root/debianutils/run_parts.c
AgeCommit message (Collapse)Author
2016-07-06getopt32: add new syntax of 'o:+' and 'o:*' for -o NUM and -o LISTDenys Vlasenko
In many cases, this aqllows to drop use of opt_complementary. Approximately -400 bytes: function old new delta getopt32 1423 1502 +79 opt_string 17 18 +1 OPT_STR 24 25 +1 uniq_main 416 406 -10 timeout_main 279 269 -10 sulogin_main 270 260 -10 readprofile_main 1825 1815 -10 ps_main 543 533 -10 pidof_main 245 235 -10 pgrep_main 611 601 -10 od_main 2600 2590 -10 mkfs_minix_main 2684 2674 -10 mkfs_ext2_main 2603 2593 -10 microcom_main 712 702 -10 makemime_main 315 305 -10 ionice_main 282 272 -10 inetd_main 2074 2064 -10 ifplugd_main 1144 1134 -10 halt_main 353 343 -10 getopt_main 636 626 -10 fdisk_main 2854 2844 -10 env_main 206 196 -10 dmesg_main 319 309 -10 conspy_main 1214 1204 -10 awk_main 981 971 -10 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 3/22 up/down: 81/-220) Total: -139 bytes text data bss dec hex filename 919373 906 14060 934339 e41c3 busybox_old 918969 906 14060 933935 e402f busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21*: add most of the required setup_common_bufsiz() callsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2016-04-21libbb: make bb_common_bufsiz1 1 kbyte, add capability to use bss tail for itDenys Vlasenko
The config item is FEATURE_USE_BSS_TAIL. When it is off (default): function old new delta read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 push 46 44 -2 inetd_main 2136 2134 -2 uevent_main 421 418 -3 addLines 97 92 -5 bb_common_bufsiz1 8193 1024 -7169 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 8/5 up/down: 62/-7181) Total: -7119 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829901 4086 1904 835891 cc133 busybox_unstripped FEATURE_USE_BSS_TAIL=y: read_config 210 228 +18 doCommands 2279 2294 +15 ipneigh_list_or_flush 763 772 +9 ipaddr_list_or_flush 1256 1261 +5 display_process_list 1301 1306 +5 conspy_main 1378 1383 +5 do_lzo_compress 352 355 +3 do_lzo_decompress 565 567 +2 inetd_main 2136 2134 -2 bb_common_bufsiz1 8193 - -8193 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 8/1 up/down: 62/-8195) Total: -8133 bytes text data bss dec hex filename 829850 4086 9080 843016 cdd08 busybox_old 829911 4086 880 834877 cbd3d busybox_unstripped FIXME: setup_common_bufsiz() calls are missing. Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-19debianutils/*: convert to new-style "one file" appletsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-10-08join some common strings, -400 bytesDenys Vlasenko
function old new delta print_intel_cstates 499 511 +12 file_insert 355 364 +9 dpkg_main 2944 2940 -4 ifenslave_main 645 640 -5 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/2 up/down: 21/-9) Total: 12 bytes text data bss dec hex filename 937564 932 17676 956172 e970c busybox_old 937164 932 17676 955772 e957c busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-10-16Fix some compiler warnings emitted by gcc-4.8.0Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28run-parts: fix unicode creep in --helpPeter Korsgaard
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28run-parts: stop providing incompatible short optionsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2013-02-28run-parts: add --exit-on-error | -e supportPeter Korsgaard
The "big" run-parts supports a handy --exit-on-error to stop execution on errors, so lets support it as well. Upstream doesn't have a short option for it, but I've used '-e' for busybox. Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2012-06-21tweak help textsDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-09-14login: new option LOGIN_SESSION_AS_CHILDIan Wienand
Signed-off-by: Ian Wienand <ianw@vmware.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-06-05*: remove "Options:" string from help textsDenys Vlasenko
function old new delta packed_usage 28706 28623 -83 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2011-04-03move help text from include/usage.src.h to debianutils/*.c e2fsprogs/*.c ↵Pere Orga
editors/*.c loginutils/*.c mailutils/*.c Signed-off-by: Pere Orga <gotrunks@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-08-16*: make GNU licensing statement forms more regularDenys Vlasenko
This change retains "or later" state! No licensing _changes_ here, only form is adjusted (article, space between "GPL" and "v2" and so on). Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-05-10remove duplicate commentDenys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-03-18*: code shrink and better "died from signal" reporting from wait4pidDenys Vlasenko
function old new delta parse 964 967 +3 udhcp_run_script 670 665 -5 singlemount 911 906 -5 mount_it_now 360 355 -5 inotifyd_main 521 516 -5 xspawn 21 - -21 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 1/4 up/down: 3/-41) Total: -38 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2010-02-04*: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2009-04-21switch_root: improve behavior on error; improve help textDenis Vlasenko
*: make "can't execute '%s'" message uniform
2009-04-21*: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
2008-09-25- update my name. No obj-code changes ;)Bernhard Reutner-Fischer
2008-08-04libbb: make xrealloc_vector zero out the realloc'ed tailDenis Vlasenko
function old new delta xrealloc_vector_helper 51 76 +25 man_main 712 705 -7 act 250 234 -16 create_list 91 70 -21 getopt_main 695 664 -31 load_dep_bb 281 248 -33 fileAction 744 709 -35 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/6 up/down: 25/-143) Total: -118 bytes
2008-07-08libbb: introduce and use xrealloc_vectorDenis Vlasenko
function old new delta xrealloc_vector_helper - 51 +51 create_list 84 99 +15 getopt_main 690 695 +5 passwd_main 1049 1053 +4 get_cached 85 89 +4 msh_main 1377 1380 +3 add_match 42 41 -1 read_lines 720 718 -2 grave 1068 1066 -2 fill_match_lines 143 141 -2 add_to_dirlist 67 65 -2 add_input_file 49 47 -2 act 252 250 -2 fsck_main 2252 2246 -6 man_main 765 757 -8 bb_internal_initgroups 228 220 -8 cut_main 1052 1041 -11 add_edge_to_node 55 43 -12 dpkg_main 3851 3835 -16 ifupdown_main 2202 2178 -24 sort_main 838 812 -26 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 5/15 up/down: 82/-124) Total: -42 bytes
2008-07-05*: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko
2008-06-27*: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko
text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
2008-06-15*: use llist_pop for traverse-and-free list operationDenis Vlasenko
function old new delta append_file_list_to_list 109 111 +2 udhcpc_main 2414 2413 -1 run_parts_main 325 324 -1 od_main 2324 2323 -1 getopt_main 709 707 -2 env_main 253 251 -2 sed_main 659 656 -3 ps_main 522 519 -3 traceroute_main 3960 3954 -6 sort_main 844 838 -6 diff_main 866 858 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33) Total: -31 bytes
2008-03-23patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)Denis Vlasenko
*: removal of #include <getopt.h>
2008-03-17*: add -Wunused-parameter; fix resulting breakageDenis Vlasenko
function old new delta procps_scan 1265 1298 +33 aliascmd 278 283 +5 parse_file_cmd 116 120 +4 dname_enc 373 377 +4 setcmd 90 93 +3 execcmd 57 60 +3 count_lines 72 74 +2 process_command_subs 340 339 -1 test_main 409 407 -2 mknod_main 179 177 -2 handle_incoming_and_exit 2653 2651 -2 argstr 1312 1310 -2 shiftcmd 131 128 -3 exitcmd 46 43 -3 dotcmd 297 294 -3 breakcmd 86 83 -3 evalpipe 353 349 -4 evalcommand 1180 1176 -4 evalcmd 109 105 -4 send_tree 374 369 -5 mkfifo_main 82 77 -5 evalsubshell 152 147 -5 typecmd 75 69 -6 letcmd 61 55 -6 add_cmd 1190 1183 -7 main 891 883 -8 ash_main 1415 1407 -8 parse_stream 1377 1367 -10 alloc_procps_scan 55 - -55 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 7/21 up/down: 54/-148) Total: -94 bytes text data bss dec hex filename 797195 658 7428 805281 c49a1 busybox_old 797101 658 7428 805187 c4943 busybox_unstripped
2008-02-28run-parts: add --reverseDenis Vlasenko
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-09-23run_parts: make it sort executables by name (required by API)Denis Vlasenko
2007-08-18don't pass argc in getopt32, it's superfluousDenis Vlasenko
(add/remove: 0/0 grow/shrink: 12/131 up/down: 91/-727) Total: -636 bytes text data bss dec hex filename 773469 1058 11092 785619 bfcd3 busybox_old 772644 1058 11092 784794 bf99a busybox_unstripped
2007-08-12trylink: produce even more info about final link stageDenis Vlasenko
trylink: explain how to modify link and drastically decrease amount of padding (unfortunately, needs hand editing ATM). *: add ALIGN1 / ALIGN2 to global strings and arrays of bytes and shorts size saving: 0.5k
2007-07-24Replace index_in_[sub]str_array with index_in_[sub]strings,Denis Vlasenko
which scans thru "abc\0def\0123\0\0" type strings. Saves 250 bytes. text data bss dec hex filename 781266 1328 11844 794438 c1f46 busybox_old 781010 1328 11844 794182 c1e46 busybox_unstripped
2007-07-23rework long option handling. saves ~1.2kDenis Vlasenko
function old new delta tar_longopts - 222 +222 static.udhcpc_longopts - 192 +192 start_stop_daemon_longopts - 150 +150 getopt32 1045 1185 +140 static.wget_longopts - 111 +111 static.od_longopts - 105 +105 getopt_longopts - 96 +96 install_longopts - 67 +67 ipcalc_longopts - 63 +63 static.hwclock_longopts - 54 +54 ftpgetput_longopts - 52 +52 static.dumpleases_longopts - 32 +32 env_longopts - 31 +31 runparts_longopts - 30 +30 mv_longopts - 24 +24 mkdir_longopts - 19 +19 find_pair 164 180 +16 bb_null_long_options - 16 +16 setconsole_longopts - 10 +10 display_speed 91 98 +7 collect_blk 467 474 +7 show_color 4 1 -3 ls_main 913 904 -9 bb_default_long_options 16 - -16 ls_color_opt 32 10 -22 setconsole_long_options 32 - -32 arith 2077 2030 -47 mv_long_options 48 - -48 mkdir_long_options 48 - -48 env_long_options 48 - -48 static.options 248 184 -64 runparts_long_options 80 - -80 ftpgetput_long_options 96 - -96 static.hwclock_long_options 112 - -112 install_long_options 112 - -112 static.long_options 144 - -144 static.wget_long_options 160 - -160 longopts 160 - -160 static.arg_options 304 - -304 tar_long_options 320 - -320 long_options 384 - -384 ------------------------------------------------------------------------------ (add/remove: 17/15 grow/shrink: 4/5 up/down: 1444/-2209) Total: -765 bytes text data bss dec hex filename 782618 1328 11900 795846 c24c6 busybox_old 781354 1328 11900 794582 c1fd6 busybox_unstripped
2007-06-30introduce and use bb_basename()Denis Vlasenko
function old new delta bb_basename - 26 +26 sv_main 1226 1225 -1 passwd_main 1985 1983 -2 showdirs 482 478 -4 sendCgi 1811 1807 -4 make_device 1354 1350 -4 handleIncoming 2443 2439 -4 func_name 82 78 -4 service_name 2292 2285 -7 main 909 901 -8 cmp_main 555 547 -8 test_main 434 422 -12 act 228 216 -12 find_pair 180 164 -16 rmmod_main 298 280 -18 find_pid_by_name 156 134 -22 modprobe_main 1606 1576 -30 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/16 up/down: 26/-156) Total: -130 bytes text data bss dec hex filename 734933 3028 14400 752361 b7ae9 busybox_old 734801 3028 14400 752229 b7a65 busybox_unstripped
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-04-29run_parts: do not check path portion of a name for "bad chars".Denis Vlasenko
Needed for ifupdown. Patch by "Gabriel L. Somlo" <somlo@cmu.edu>
2007-04-08getopt32: fix llist_t options ordering. llist_rev is not unused.Denis Vlasenko
function old new delta tar_main 705 695 -10 sort_main 928 918 -10 decode_format_string 886 876 -10 run_parts_main 197 185 -12 ps_main 513 500 -13 wget_main 2764 2750 -14 awk_main 1014 1000 -14 od_main 2886 2866 -20 llist_rev 25 - -25 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/8 up/down: 0/-128) Total: -128 bytes
2007-04-08find: fix handling of -pruneDenis Vlasenko
recursive_actions: uppercase flag constants
2007-03-29- fold recurse, depthFirst and dereference params into one param flags.Bernhard Reutner-Fischer
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
2007-03-28run_parts: I was wrong, NULL termination is already done becauseDenis Vlasenko
G is pre-initialized to 0.
2007-03-28run_parts: NULL-terminate list of arguments; fix perror/error usageDenis Vlasenko
2007-03-28- rewrite run-partsBernhard Reutner-Fischer
text data bss dec hex filename 1029 0 0 1029 405 debianutils/run_parts.o-old 478 0 0 478 1de debianutils/run_parts.o-new-bare 600 0 0 600 258 debianutils/run_parts.o-new-full bare, i.e. without long opts and fancy stuff ./scripts/bloat-o-meter bb_old busybox_unstripped function old new delta act - 215 +215 run_parts_main 216 201 -15 valid_name 50 - -50 runparts_long_options 64 - -64 .rodata 124323 124163 -160 run_parts 513 - -513 ------------------------------------------------------------------------------ (add/remove: 1/3 grow/shrink: 0/2 up/down: 215/-802) Total: -587 bytes
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2006-11-27style cleanup: return(a) -> return a, part 1Denis Vlasenko
2006-11-26Closing bug 730. libbb run_parts is using scandir (a GNUism),Denis Vlasenko
and it is used only by run_parts applet, so move it there. Also saved ~30 bytes (prolly gcc autoinlining...).
2006-10-08attempt to regularize atoi mess.Denis Vlasenko
2006-09-13- fix copy'n paste errors that got introduced when switching to the shorter ↵Bernhard Reutner-Fischer
boilerplate. No object code changes.
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-01-25just whitespaceTim Riker