summaryrefslogtreecommitdiff
path: root/debianutils/run_parts.c
Commit message (Collapse)AuthorAgeFilesLines
* *: make GNU licensing statement forms more regularDenys Vlasenko2010-08-161-1/+1
| | | | | | | 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>
* remove duplicate commentDenys Vlasenko2010-05-101-1/+0
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* *: code shrink and better "died from signal" reporting from wait4pidDenys Vlasenko2010-03-181-2/+2
| | | | | | | | | | | | | | 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>
* *: suppress ~60% of "aliased warnings" on gcc-4.4.1Denys Vlasenko2010-02-041-1/+1
| | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* switch_root: improve behavior on error; improve help textDenis Vlasenko2009-04-211-1/+1
| | | | | *: make "can't execute '%s'" message uniform
* *: mass renaming of USE_XXXX to IF_XXXXDenis Vlasenko2009-04-211-1/+1
| | | | | | and SKIP_XXXX to IF_NOT_XXXX - the second one was especially badly named. It was not skipping anything!
* - update my name. No obj-code changes ;)Bernhard Reutner-Fischer2008-09-251-1/+1
|
* libbb: make xrealloc_vector zero out the realloc'ed tailDenis Vlasenko2008-08-041-1/+1
| | | | | | | | | | | | | | 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
* libbb: introduce and use xrealloc_vectorDenis Vlasenko2008-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* *: rename ATTRIBUTE_XXX to just XXX.Denis Vlasenko2008-07-051-2/+2
|
* *: introduce and use FAST_FUNC: regparm on i386, otherwise no-onDenis Vlasenko2008-06-271-1/+1
| | | | | | | text data bss dec hex filename 808035 611 6868 815514 c719a busybox_old 804472 611 6868 811951 c63af busybox_unstripped
* *: use llist_pop for traverse-and-free list operationDenis Vlasenko2008-06-151-4/+2
| | | | | | | | | | | | | | | | | | 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
* patch: shrink by Pascal Bellard <pascal.bellard AT ads-lu.com> (-80 bytes)Denis Vlasenko2008-03-231-2/+0
| | | | | *: removal of #include <getopt.h>
* *: add -Wunused-parameter; fix resulting breakageDenis Vlasenko2008-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* run-parts: add --reverseDenis Vlasenko2008-02-281-16/+19
|
* add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko2007-10-111-1/+1
| | | | | EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
* run_parts: make it sort executables by name (required by API)Denis Vlasenko2007-09-231-73/+101
|
* don't pass argc in getopt32, it's superfluousDenis Vlasenko2007-08-181-1/+1
| | | | | | | | (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
* trylink: produce even more info about final link stageDenis Vlasenko2007-08-121-1/+1
| | | | | | | | | 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
* Replace index_in_[sub]str_array with index_in_[sub]strings,Denis Vlasenko2007-07-241-1/+1
| | | | | | | | | 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
* rework long option handling. saves ~1.2kDenis Vlasenko2007-07-231-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* introduce and use bb_basename()Denis Vlasenko2007-06-301-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* usage.c: remove reference to busybox.hDenis Vlasenko2007-05-261-2/+2
| | | | | *: s/include "busybox.h"/include "libbb.h"
* run_parts: do not check path portion of a name for "bad chars".Denis Vlasenko2007-04-291-7/+11
| | | | Needed for ifupdown. Patch by "Gabriel L. Somlo" <somlo@cmu.edu>
* getopt32: fix llist_t options ordering. llist_rev is not unused.Denis Vlasenko2007-04-081-3/+0
| | | | | | | | | | | | | | | | 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
* find: fix handling of -pruneDenis Vlasenko2007-04-081-1/+1
| | | | recursive_actions: uppercase flag constants
* - fold recurse, depthFirst and dereference params into one param flags.Bernhard Reutner-Fischer2007-03-291-3/+1
| | | | Minor size improvement (-16b for size, -24b according to bloat-o-meter).
* run_parts: I was wrong, NULL termination is already done becauseDenis Vlasenko2007-03-281-1/+1
| | | | G is pre-initialized to 0.
* run_parts: NULL-terminate list of arguments; fix perror/error usageDenis Vlasenko2007-03-281-5/+5
|
* - rewrite run-partsBernhard Reutner-Fischer2007-03-281-130/+89
| | | | | | | | | | | | | | | | | | | 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
* suppress warnings about easch <applet>_main() havingDenis Vlasenko2007-02-031-0/+1
| | | | no preceding prototype
* style cleanup: return(a) -> return a, part 1Denis Vlasenko2006-11-271-1/+1
|
* Closing bug 730. libbb run_parts is using scandir (a GNUism),Denis Vlasenko2006-11-261-8/+99
| | | | | and it is used only by run_parts applet, so move it there. Also saved ~30 bytes (prolly gcc autoinlining...).
* attempt to regularize atoi mess.Denis Vlasenko2006-10-081-22/+22
|
* - fix copy'n paste errors that got introduced when switching to the shorter ↵Bernhard Reutner-Fischer2006-09-131-1/+1
| | | | | | boilerplate. No object code changes.
* - move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer2006-06-021-16/+2
| | | | and eventual platform specific includes in early.
* just whitespaceTim Riker2006-01-251-3/+3
|
* change strange depend to libbb.h, but require busybox.h"Vladimir N. Oleynik"2005-10-061-1/+1
|
* Remove trailing whitespace. Update copyright to include 2004.Eric Andersen2004-03-151-9/+9
|
* Bruno Randolf writes:Eric Andersen2003-07-291-1/+3
| | | | | | | | | | | | | | | | | | | | | | | this patch fixes run_parts when it's called by ifupdown. 1) argv has to be a NULL terminated char* array, not just a string. 2) run_parts now explicitly sets the environment. this environment is populated from the /etc/network/interfaces config file and is needed by the scripts in /etc/network/if-pre-up.d/. when run-parts is called from the command line the environment is taken from the current process. Vladimir Oleynik then wrote: You can simplify this if use: + bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt); + buf[1] = NULL; + + run_parts(&buf, 2, environ); + free(buf[0]); --w vodz
* Move start_stop_daemon to debianutils.Eric Andersen2003-07-261-25/+31
| | | | Cleanup run_parts a bit and add long opts
* Major coreutils update.Manuel Novoa III2003-03-191-3/+3
|
* Patch by Stewart Brodie to terminate the string array correctlyGlenn L McGrath2003-01-081-1/+2
|
* Move awk from textutils to editors. Cleanup run-parts, saves 200 bytes, ↵Glenn L McGrath2002-11-111-190/+44
| | | | moves the guts of run_parts to libbb to be used by ifupdown.
* Move readlink, mktemp, run-parts and which to a new debianutils dir.Glenn L McGrath2002-11-111-0/+251