people/mcb30/busybox.git
13 years agotrylink: s/strip/$STRIP/g
vda [Wed, 10 Oct 2007 10:05:35 +0000 (10:05 +0000)]
trylink: s/strip/$STRIP/g

git-svn-id: svn://busybox.net/trunk/busybox@20213 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotypo fix in help text
vda [Tue, 9 Oct 2007 18:08:04 +0000 (18:08 +0000)]
typo fix in help text

git-svn-id: svn://busybox.net/trunk/busybox@20212 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrylink: trivial cleanup
vda [Tue, 9 Oct 2007 18:01:13 +0000 (18:01 +0000)]
trylink: trivial cleanup

git-svn-id: svn://busybox.net/trunk/busybox@20211 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrylink: reformat link flags for readability
vda [Tue, 9 Oct 2007 13:49:26 +0000 (13:49 +0000)]
trylink: reformat link flags for readability
trylink: add --sort-section alignment:
    text           data     bss     dec     hex filename
-   6557            428    3260   10245    2805 busybox
+   6555            428    3260   10243    2803 busybox
- 909621           1076   12108  922805   e14b5 libbusybox.so.1.8.0.svn
+ 908868           1050   12016  921934   e114e libbusybox.so.1.8.0.svn

git-svn-id: svn://busybox.net/trunk/busybox@20210 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrylink: remove useless redirects, add missing error checks
vda [Tue, 9 Oct 2007 13:08:02 +0000 (13:08 +0000)]
trylink: remove useless redirects, add missing error checks

git-svn-id: svn://busybox.net/trunk/busybox@20209 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrylink: trivial fixes
vda [Tue, 9 Oct 2007 10:15:41 +0000 (10:15 +0000)]
trylink: trivial fixes

git-svn-id: svn://busybox.net/trunk/busybox@20208 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomake "individual applets" build less noisy.
vda [Mon, 8 Oct 2007 22:16:14 +0000 (22:16 +0000)]
make "individual applets" build less noisy.
add *.tmp to list of files deleted by make mrproper.

git-svn-id: svn://busybox.net/trunk/busybox@20207 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowhitespace fix
vda [Mon, 8 Oct 2007 20:45:42 +0000 (20:45 +0000)]
whitespace fix

git-svn-id: svn://busybox.net/trunk/busybox@20206 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoadd libbb/appletlib.c
vda [Mon, 8 Oct 2007 19:32:12 +0000 (19:32 +0000)]
add libbb/appletlib.c

git-svn-id: svn://busybox.net/trunk/busybox@20205 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomake --help work for "individual applets" too.
vda [Sun, 7 Oct 2007 21:00:41 +0000 (21:00 +0000)]
make --help work for "individual applets" too.

git-svn-id: svn://busybox.net/trunk/busybox@20202 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolibbusybox: move (possibly compressed) help stuff into libbusybox.
vda [Sun, 7 Oct 2007 20:46:34 +0000 (20:46 +0000)]
libbusybox: move (possibly compressed) help stuff into libbusybox.
Makes individual binaries much smaller.

git-svn-id: svn://busybox.net/trunk/busybox@20201 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrim too verbose help messages
vda [Sun, 7 Oct 2007 19:13:55 +0000 (19:13 +0000)]
trim too verbose help messages

git-svn-id: svn://busybox.net/trunk/busybox@20200 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowebsite: "BusyBox Weekly News" didn't really work, remove link
vda [Sun, 7 Oct 2007 18:10:44 +0000 (18:10 +0000)]
website: "BusyBox Weekly News" didn't really work, remove link

git-svn-id: svn://busybox.net/trunk/busybox@20195 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoash: revert "cat | jobs" fix, it causes more problems than good
vda [Sun, 7 Oct 2007 18:02:52 +0000 (18:02 +0000)]
ash: revert "cat | jobs" fix, it causes more problems than good

git-svn-id: svn://busybox.net/trunk/busybox@20194 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 4
vda [Sun, 7 Oct 2007 17:06:26 +0000 (17:06 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 4

git-svn-id: svn://busybox.net/trunk/busybox@20192 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 3
vda [Sun, 7 Oct 2007 17:06:01 +0000 (17:06 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 3

git-svn-id: svn://busybox.net/trunk/busybox@20191 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 2
vda [Sun, 7 Oct 2007 17:05:42 +0000 (17:05 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 2

git-svn-id: svn://busybox.net/trunk/busybox@20190 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoreviving libbusybox, adding CONFIG_INDIVIDUAL part 1
vda [Sun, 7 Oct 2007 17:05:22 +0000 (17:05 +0000)]
reviving libbusybox, adding CONFIG_INDIVIDUAL part 1

git-svn-id: svn://busybox.net/trunk/busybox@20189 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- mark TODO: use index_in_str_array()
aldot [Sat, 6 Oct 2007 20:47:53 +0000 (20:47 +0000)]
- mark TODO: use index_in_str_array()

git-svn-id: svn://busybox.net/trunk/busybox@20188 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agochpst: fix whitespace damage
vda [Fri, 5 Oct 2007 22:11:06 +0000 (22:11 +0000)]
chpst: fix whitespace damage
svlogd: fix bug (two different "line" variables); stop using data/bss

function                                             old     new   delta
processorstop                                        419     432     +13
rotate                                               514     525     +11
buffer_pwrite                                        493     499      +6
sig_term_handler                                      68      70      +2
sig_hangup_handler                                    34      36      +2
sig_alarm_handler                                     34      36      +2
rmoldest                                             305     307      +2
processorstart                                       401     403      +2
logdir_close                                         188     190      +2
tmaxflag                                               1       -      -1
rotateasap                                             1       -      -1
repl                                                   1       -      -1
reopenasap                                             1       -      -1
linecomplete                                           1       -      -1
exitasap                                               1       -      -1
wstat                                                  4       -      -4
verbose                                                9       5      -4
replace                                                4       -      -4
nearest_rotate                                         4       -      -4
linemax                                                4       -      -4
linelen                                                4       -      -4
line                                                   4       -      -4
fndir                                                  4       -      -4
fl_flag_0                                              4       -      -4
fdwdir                                                 4       -      -4
dirn                                                   4       -      -4
dir                                                    4       -      -4
blocked_sigset                                         4       -      -4
sig_child_handler                                    248     239      -9
logdirs_reopen                                      1263    1240     -23
buffer_pread                                         532     473     -59
svlogd_main                                         1466    1367     -99
------------------------------------------------------------------------------
(add/remove: 0/18 grow/shrink: 9/5 up/down: 42/-248)         Total: -206 bytes
   text    data     bss     dec     hex filename
 770916     989    9496  781401   bec59 busybox_old
 770768     980    9448  781196   beb8c busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20187 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agochpst: stop using data/bss
vda [Fri, 5 Oct 2007 21:23:49 +0000 (21:23 +0000)]
chpst: stop using data/bss

function                                             old     new   delta
chpst_main                                          1066    1089     +23
set_user                                               4       -      -4
root                                                   4       -      -4
nicelvl                                                4       -      -4
limitt                                                 4       -      -4
limits                                               196     192      -4
limitr                                                 4       -      -4
limitp                                                 4       -      -4
limito                                                 4       -      -4
limitl                                                 4       -      -4
limitf                                                 4       -      -4
limitd                                                 4       -      -4
limitc                                                 4       -      -4
limita                                                 4       -      -4
env_user                                               4       -      -4
env_dir                                                4       -      -4
------------------------------------------------------------------------------
(add/remove: 0/14 grow/shrink: 1/1 up/down: 23/-60)           Total: -37 bytes
   text    data     bss     dec     hex filename
 770892    1029    9520  781441   bec81 busybox_old
 770916     989    9496  781401   bec59 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20186 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agostat: code shrink; stop using bss; stop using strncat incorrectly
vda [Fri, 5 Oct 2007 20:31:23 +0000 (20:31 +0000)]
stat: code shrink; stop using bss; stop using strncat incorrectly

function                                             old     new   delta
printfs                                                -      28     +28
strcatc                                                -      26     +26
human_time                                            41      44      +3
print_it                                             229     219     -10
buf                                                   30       -     -30
print_statfs                                         420     358     -62
print_stat                                          1089     921    -168
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 1/3 up/down: 57/-270)          Total: -213 bytes
   text    data     bss     dec     hex filename
 771105    1029    9552  781686   bed76 busybox_old
 770892    1029    9520  781441   bec81 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20185 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodelete now unused check_header_gzip.c
vda [Fri, 5 Oct 2007 20:29:31 +0000 (20:29 +0000)]
delete now unused check_header_gzip.c
sum: do not use uintmax needlessly

git-svn-id: svn://busybox.net/trunk/busybox@20184 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotail: sizeof(buf) is sizeof(char*)! must be BUFSIZ
vda [Fri, 5 Oct 2007 19:17:16 +0000 (19:17 +0000)]
tail: sizeof(buf) is sizeof(char*)! must be BUFSIZ

git-svn-id: svn://busybox.net/trunk/busybox@20183 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoadd tests for gunzip
vda [Fri, 5 Oct 2007 15:27:03 +0000 (15:27 +0000)]
add tests for gunzip

git-svn-id: svn://busybox.net/trunk/busybox@20182 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agogunzip: support concatenated gz files.
vda [Fri, 5 Oct 2007 15:26:08 +0000 (15:26 +0000)]
gunzip: support concatenated gz files.

   text    data     bss     dec     hex filename
 770988    1029    9552  781569   bed01 busybox.t0/busybox
 771105    1029    9552  781686   bed76 busybox.t3/busybox

git-svn-id: svn://busybox.net/trunk/busybox@20181 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotail: work correctly on /proc files (Kazuo TAKADA <kztakada@sm.sony.co.jp>)
vda [Tue, 2 Oct 2007 10:17:56 +0000 (10:17 +0000)]
tail: work correctly on /proc files (Kazuo TAKADA <kztakada@sm.sony.co.jp>)

git-svn-id: svn://busybox.net/trunk/busybox@20170 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agologger: fix a problem of losing all argv except first
vda [Tue, 2 Oct 2007 09:57:41 +0000 (09:57 +0000)]
logger: fix a problem of losing all argv except first

git-svn-id: svn://busybox.net/trunk/busybox@20169 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago- ditch 2 bytes
aldot [Mon, 1 Oct 2007 18:04:42 +0000 (18:04 +0000)]
- ditch 2 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20164 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoprintf("%s\n") -> puts()
vda [Mon, 1 Oct 2007 12:05:12 +0000 (12:05 +0000)]
printf("%s\n") -> puts()

git-svn-id: svn://busybox.net/trunk/busybox@20160 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
vda [Mon, 1 Oct 2007 11:58:38 +0000 (11:58 +0000)]
'simple' error message functions by Loic Grenie <loic.grenie@gmail.com>.
263 bytes saved.

git-svn-id: svn://busybox.net/trunk/busybox@20159 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: fix glob() abuse. Code was making unfounded assumptions how
vda [Mon, 1 Oct 2007 10:02:25 +0000 (10:02 +0000)]
hush: fix glob() abuse. Code was making unfounded assumptions how
glob() works, and it broke horribly on specific uclibc config.

git-svn-id: svn://busybox.net/trunk/busybox@20158 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: int->smallint for flag vars; make some names more "greppable"
vda [Mon, 1 Oct 2007 10:00:45 +0000 (10:00 +0000)]
hush: int->smallint for flag vars; make some names more "greppable"

git-svn-id: svn://busybox.net/trunk/busybox@20157 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: feeble attempt at making it more NOMMU-friendly
vda [Mon, 1 Oct 2007 09:59:47 +0000 (09:59 +0000)]
hush: feeble attempt at making it more NOMMU-friendly

git-svn-id: svn://busybox.net/trunk/busybox@20156 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohush: stop doing manual acounting of open fd's, kernel can do it for us
vda [Mon, 1 Oct 2007 09:59:01 +0000 (09:59 +0000)]
hush: stop doing manual acounting of open fd's, kernel can do it for us

git-svn-id: svn://busybox.net/trunk/busybox@20155 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agointroduce and use close_on_exec_on(fd). -50 bytes.
vda [Sun, 30 Sep 2007 23:50:48 +0000 (23:50 +0000)]
introduce and use close_on_exec_on(fd). -50 bytes.

git-svn-id: svn://busybox.net/trunk/busybox@20153 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomove udhcp_{client/server}_config to common_bufsiz1
vda [Sun, 30 Sep 2007 17:55:43 +0000 (17:55 +0000)]
move udhcp_{client/server}_config to common_bufsiz1

udhcp_run_script                                    1108    1151     +43
init_packet                                          209     210      +1
udhcpc_main                                         2395    2393      -2
udhcp_client_config                                   56       -     -56
udhcp_server_config                                   88       -     -88
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/1 up/down: 44/-146)          Total: -102 bytes
   text    data     bss     dec     hex filename
 771326    1029    9696  782051   beee3 busybox_old
 771383    1029    9552  781964   bee8c busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20149 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodhcpreplay: code shrink, -40 bytes
vda [Sun, 30 Sep 2007 17:54:10 +0000 (17:54 +0000)]
dhcpreplay: code shrink, -40 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20148 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agofixlet to pgrep/pkill
vda [Sun, 30 Sep 2007 16:36:02 +0000 (16:36 +0000)]
fixlet to pgrep/pkill

git-svn-id: svn://busybox.net/trunk/busybox@20147 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoprint_signames_and_exit -> print_signames (because of "ash calls kill_main")
vda [Sun, 30 Sep 2007 16:32:01 +0000 (16:32 +0000)]
print_signames_and_exit -> print_signames (because of "ash calls kill_main")

git-svn-id: svn://busybox.net/trunk/busybox@20146 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoreplace printf with fputs where appropriate
vda [Sun, 30 Sep 2007 16:22:36 +0000 (16:22 +0000)]
replace printf with fputs where appropriate

git-svn-id: svn://busybox.net/trunk/busybox@20145 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolibiproute: add missing break's
vda [Sun, 30 Sep 2007 16:04:21 +0000 (16:04 +0000)]
libiproute: add missing break's

git-svn-id: svn://busybox.net/trunk/busybox@20144 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoannounce 1.7.2 on the website
vda [Sun, 30 Sep 2007 00:06:42 +0000 (00:06 +0000)]
announce 1.7.2 on the website

git-svn-id: svn://busybox.net/trunk/busybox@20137 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agosmall code shrink
vda [Sat, 29 Sep 2007 23:26:52 +0000 (23:26 +0000)]
small code shrink

git-svn-id: svn://busybox.net/trunk/busybox@20134 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agobuild system: pass EXTRA_LDFLAGS to final link stage
vda [Sat, 29 Sep 2007 22:52:25 +0000 (22:52 +0000)]
build system: pass EXTRA_LDFLAGS to final link stage

git-svn-id: svn://busybox.net/trunk/busybox@20133 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrivial typo fix
vda [Sat, 29 Sep 2007 22:49:26 +0000 (22:49 +0000)]
trivial typo fix

git-svn-id: svn://busybox.net/trunk/busybox@20132 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agopgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>
vda [Sat, 29 Sep 2007 22:26:01 +0000 (22:26 +0000)]
pgrep,pkill: new applets by Loic Grenie <loic.grenie@gmail.com>

git-svn-id: svn://busybox.net/trunk/busybox@20131 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoxrealloc_getcwd_or_warn: smaller cod and less wasted RAM at run time
vda [Sat, 29 Sep 2007 19:19:55 +0000 (19:19 +0000)]
xrealloc_getcwd_or_warn: smaller cod and less wasted RAM at run time

git-svn-id: svn://busybox.net/trunk/busybox@20120 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoremove if() which is always true
vda [Sat, 29 Sep 2007 18:27:14 +0000 (18:27 +0000)]
remove if() which is always true

git-svn-id: svn://busybox.net/trunk/busybox@20118 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agobunzip2: trim verbose messages
vda [Fri, 28 Sep 2007 23:45:56 +0000 (23:45 +0000)]
bunzip2: trim verbose messages

   text    data     bss     dec     hex filename
 770752    1029    9696  781477   beca5 busybox_old
 770691    1029    9696  781416   bec68 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20109 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: trivial simplification
vda [Fri, 28 Sep 2007 22:35:29 +0000 (22:35 +0000)]
httpd: trivial simplification

git-svn-id: svn://busybox.net/trunk/busybox@20108 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomore "if (p) free(p)" fixes; fix a typo in comment
vda [Fri, 28 Sep 2007 22:13:55 +0000 (22:13 +0000)]
more "if (p) free(p)" fixes; fix a typo in comment

git-svn-id: svn://busybox.net/trunk/busybox@20104 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agofix "if (p) free(p)" constructs
vda [Fri, 28 Sep 2007 22:07:23 +0000 (22:07 +0000)]
fix "if (p) free(p)" constructs

git-svn-id: svn://busybox.net/trunk/busybox@20103 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoremove stray semicolon
vda [Fri, 28 Sep 2007 21:56:36 +0000 (21:56 +0000)]
remove stray semicolon

git-svn-id: svn://busybox.net/trunk/busybox@20102 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: paranoia-induced fix against theoretical div-by-0 case
vda [Fri, 28 Sep 2007 13:41:41 +0000 (13:41 +0000)]
hdparm: paranoia-induced fix against theoretical div-by-0 case

git-svn-id: svn://busybox.net/trunk/busybox@20084 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: more robust (re overflows) code. +38 bytes.
vda [Fri, 28 Sep 2007 13:38:08 +0000 (13:38 +0000)]
hdparm: more robust (re overflows) code. +38 bytes.

git-svn-id: svn://busybox.net/trunk/busybox@20083 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotrivial fix in setfiles. spotted by Yuichi Nakamura <ynakam@hitachisoft.jp>
vda [Fri, 28 Sep 2007 11:37:38 +0000 (11:37 +0000)]
trivial fix in setfiles. spotted by Yuichi Nakamura <ynakam@hitachisoft.jp>

git-svn-id: svn://busybox.net/trunk/busybox@20082 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: reduce possibility of numeric overflow in -T.
vda [Fri, 28 Sep 2007 11:21:47 +0000 (11:21 +0000)]
hdparm: reduce possibility of numeric overflow in -T.

do_time                                              386     410     +24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 24/0)               Total: 24 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20081 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoassorted static vars removal
vda [Fri, 28 Sep 2007 10:29:17 +0000 (10:29 +0000)]
assorted static vars removal

function                                             old     new   delta
tcpudpsvd_main                                      1829    1839     +10
update_status                                        567     569      +2
sigterm                                                1       -      -1
.........
dhcprelay_signal_handler                               8       -      -8
nfs_strerror                                          60      49     -11
singlemount                                         4579    4564     -15
static.p                                              16       -     -16
svstatus                                              20       -     -20
dhcprelay_xid_list                                    32       -     -32
runsv_main                                          1785    1746     -39
static.buf                                            74      28     -46
svd                                                   56       -     -56
dhcprelay_main                                      1141    1080     -61
------------------------------------------------------------------------------
(add/remove: 0/20 grow/shrink: 2/10 up/down: 12/-386)        Total: -374 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20080 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: simplify timing measurement (it wa the last last user
vda [Fri, 28 Sep 2007 10:28:03 +0000 (10:28 +0000)]
hdparm: simplify timing measurement (it wa the last last user
of setitimer in the tree).

static.thousand                                       16       -     -16
read_big_block                                        81      46     -35
getitimer                                             41       -     -41
setitimer                                             47       -     -47
__GI_setitimer                                        47       -     -47
do_time                                              480     386     -94
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/2 up/down: 0/-280)           Total: -280 bytes

M    miscutils/hdparm.c

git-svn-id: svn://busybox.net/trunk/busybox@20079 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: get rid of static variables
vda [Fri, 28 Sep 2007 10:25:32 +0000 (10:25 +0000)]
hdparm: get rid of static variables

process_dev                                         5309    5311      +2
unregister_hwif                                        1       -      -1
...........
Xreadahead                                             4       -      -4
seek_to_zero                                          25      17      -8
hdparm_main                                         1242    1227     -15
do_time                                              547     480     -67
------------------------------------------------------------------------------
(add/remove: 0/83 grow/shrink: 1/3 up/down: 2/-248)          Total: -246 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20078 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolibbb: make const_int_0 reside in rodata
vda [Thu, 27 Sep 2007 20:49:57 +0000 (20:49 +0000)]
libbb: make const_int_0 reside in rodata

git-svn-id: svn://busybox.net/trunk/busybox@20069 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolibbb: align bb_common_bufsiz1 to "long long"
vda [Thu, 27 Sep 2007 20:46:08 +0000 (20:46 +0000)]
libbb: align bb_common_bufsiz1 to "long long"

git-svn-id: svn://busybox.net/trunk/busybox@20068 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoless: make 'f' page forward
vda [Thu, 27 Sep 2007 17:11:48 +0000 (17:11 +0000)]
less: make 'f' page forward

git-svn-id: svn://busybox.net/trunk/busybox@20067 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowget: -O FILE is allowed to overwrite existing file (compat)
vda [Thu, 27 Sep 2007 15:07:23 +0000 (15:07 +0000)]
wget: -O FILE is allowed to overwrite existing file (compat)

git-svn-id: svn://busybox.net/trunk/busybox@20066 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agozcip: fix unaligned trap on ARM
vda [Thu, 27 Sep 2007 11:15:42 +0000 (11:15 +0000)]
zcip: fix unaligned trap on ARM

git-svn-id: svn://busybox.net/trunk/busybox@20065 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoremove stray '/*' within comment
vda [Thu, 27 Sep 2007 10:26:59 +0000 (10:26 +0000)]
remove stray '/*' within comment

git-svn-id: svn://busybox.net/trunk/busybox@20064 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohdparm: use fixed fd #3 for device being interrogated
vda [Thu, 27 Sep 2007 10:23:34 +0000 (10:23 +0000)]
hdparm: use fixed fd #3 for device being interrogated
(surprisingly, on i386 almost no code size change)

git-svn-id: svn://busybox.net/trunk/busybox@20063 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agointroduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
vda [Thu, 27 Sep 2007 10:20:47 +0000 (10:20 +0000)]
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).

git-svn-id: svn://busybox.net/trunk/busybox@20062 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agostyle and message text fixes
vda [Thu, 27 Sep 2007 10:17:53 +0000 (10:17 +0000)]
style and message text fixes

git-svn-id: svn://busybox.net/trunk/busybox@20061 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolineedit: plug memory leak
vda [Thu, 27 Sep 2007 10:17:16 +0000 (10:17 +0000)]
lineedit: plug memory leak

git-svn-id: svn://busybox.net/trunk/busybox@20060 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agovlock: get rid of statics
vda [Thu, 27 Sep 2007 10:12:02 +0000 (10:12 +0000)]
vlock: get rid of statics

git-svn-id: svn://busybox.net/trunk/busybox@20059 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agointroduce safe_poll (fixes a problem in top)
vda [Thu, 27 Sep 2007 10:09:59 +0000 (10:09 +0000)]
introduce safe_poll (fixes a problem in top)

function                                             old     new   delta
safe_poll                                              -      77     +77
svlogd_main                                         1470    1466      -4
zcip_main                                           1530    1524      -6
forkexec                                            1345    1338      -7
decode_format_string                                 795     788      -7
collect_blk                                          474     467      -7
buffer_pread                                         540     532      -8
tftp                                                1182    1172     -10
microcom_main                                        763     749     -14
arpping                                              441     424     -17
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 0/9 up/down: 77/-80)             Total: -3 bytes
   text    data     bss     dec     hex filename
 770162    1034   10404  781600   bed20 busybox_old
 770158    1034   10404  781596   bed1c busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20058 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomake variables static
vda [Thu, 27 Sep 2007 10:08:02 +0000 (10:08 +0000)]
make variables static

git-svn-id: svn://busybox.net/trunk/busybox@20057 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocheck-lxdialog.sh: no point in giving up, maybe -lcurses will work?
vda [Wed, 26 Sep 2007 18:18:59 +0000 (18:18 +0000)]
check-lxdialog.sh: no point in giving up, maybe -lcurses will work?

git-svn-id: svn://busybox.net/trunk/busybox@20044 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoload_policy: update (Yuichi Nakamura <ynakam@hitachisoft.jp>)
vda [Wed, 26 Sep 2007 18:01:32 +0000 (18:01 +0000)]
load_policy: update (Yuichi Nakamura <ynakam@hitachisoft.jp>)

git-svn-id: svn://busybox.net/trunk/busybox@20043 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agochcon: trivial fix
vda [Wed, 26 Sep 2007 17:55:55 +0000 (17:55 +0000)]
chcon: trivial fix

git-svn-id: svn://busybox.net/trunk/busybox@20042 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agolosetup: support -f (Loic Grenie <loic.grenie@gmail.com>)
vda [Wed, 26 Sep 2007 17:54:18 +0000 (17:54 +0000)]
losetup: support -f (Loic Grenie <loic.grenie@gmail.com>)

function                                             old     new   delta
losetup_main                                         238     278     +40
packed_usage                                       23021   23027      +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/0 up/down: 46/0)               Total: 46 bytes

git-svn-id: svn://busybox.net/trunk/busybox@20041 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agorunsvdir: fix "linear wait time" bug
vda [Wed, 26 Sep 2007 12:18:07 +0000 (12:18 +0000)]
runsvdir: fix "linear wait time" bug

git-svn-id: svn://busybox.net/trunk/busybox@20039 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoinetd: move struct fields around -> save .25 k of code
vda [Wed, 26 Sep 2007 10:46:18 +0000 (10:46 +0000)]
inetd: move struct fields around -> save .25 k of code

function                                             old     new   delta
freeconfig                                            75      76      +1
register_rpc                                         200     196      -4
dupconfig                                            165     159      -6
reapchild                                            173     166      -7
retry                                                 93      82     -11
goaway                                               112     101     -11
getconfigent                                        1241    1222     -19
setup                                                645     592     -53
inetd_main                                          2160    2107     -53
config                                              1602    1518     -84
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/9 up/down: 1/-248)           Total: -247 bytes
   text    data     bss     dec     hex filename
 773951    1038   10332  785321   bfba9 busybox_old
 773703    1038   10332  785073   bfab1 busybox_unstripped

git-svn-id: svn://busybox.net/trunk/busybox@20038 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoinstall: fix bug in "install -c file dir" (tries to copy dir into dir too)
vda [Wed, 26 Sep 2007 10:34:54 +0000 (10:34 +0000)]
install: fix bug in "install -c file dir" (tries to copy dir into dir too)
install: 'support' (ignore) -v and -b

git-svn-id: svn://busybox.net/trunk/busybox@20037 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agodocumentation bits in comments, no code changes
vda [Tue, 25 Sep 2007 18:35:28 +0000 (18:35 +0000)]
documentation bits in comments, no code changes

git-svn-id: svn://busybox.net/trunk/busybox@20025 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agocp: -r and -R imply -d (coreutils compat)
vda [Tue, 25 Sep 2007 18:06:36 +0000 (18:06 +0000)]
cp: -r and -R imply -d (coreutils compat)

git-svn-id: svn://busybox.net/trunk/busybox@20024 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: small auth and IPv6 fixes (Kim B. Heino <Kim.Heino@bluegiga.com>)
vda [Tue, 25 Sep 2007 11:58:33 +0000 (11:58 +0000)]
httpd: small auth and IPv6 fixes (Kim B. Heino <Kim.Heino@bluegiga.com>)

git-svn-id: svn://busybox.net/trunk/busybox@20012 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoed: large cleanup
vda [Tue, 25 Sep 2007 11:55:57 +0000 (11:55 +0000)]
ed: large cleanup

function                                             old     new   delta
bad_nums                                               -      43     +43
skip_blank                                             -      24     +24
getNum                                               557     578     +21
insertLine                                           159     163      +4
setCurNum                                             31      33      +2
lastNum                                                4       -      -4
fileName                                               4       -      -4
dirty                                                  4       -      -4
curNum                                                 4       -      -4
curLine                                                4       -      -4
bufUsed                                                4       -      -4
bufSize                                                4       -      -4
bufPtr                                                 4       -      -4
bufBase                                                4       -      -4
printLines                                           357     345     -12
findLine                                             165     152     -13
lines                                                 16       -     -16
deleteLines                                          203     144     -59
readLines                                            538     473     -65
addLines                                             163      87     -76
marks                                                104       -    -104
termEdit                                             140       -    -140
ed_main                                             3125    2654    -471
------------------------------------------------------------------------------
(add/remove: 2/12 grow/shrink: 3/6 up/down: 94/-992)         Total: -898 bytes
   text    data     bss     dec     hex filename
 771142    1034   10564  782740   bf194 busybox_old
 770265    1034   10404  781703   bed87 busybox_unstripped

# size */ed.o
   text    data     bss     dec     hex filename
   6370       0     156    6526    197e editors.org/ed.o
   5505       0       0    5505    1581 editors/ed.o

git-svn-id: svn://busybox.net/trunk/busybox@20010 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoinsmod: fix help text to not show options if only 2.6 was selected
vda [Mon, 24 Sep 2007 20:14:32 +0000 (20:14 +0000)]
insmod: fix help text to not show options if only 2.6 was selected

git-svn-id: svn://busybox.net/trunk/busybox@19997 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoinsmod: shorten message text; style fixes
vda [Mon, 24 Sep 2007 19:54:36 +0000 (19:54 +0000)]
insmod: shorten message text; style fixes

git-svn-id: svn://busybox.net/trunk/busybox@19996 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotar: add a comment about previous subtle fix
vda [Mon, 24 Sep 2007 19:32:53 +0000 (19:32 +0000)]
tar: add a comment about previous subtle fix

git-svn-id: svn://busybox.net/trunk/busybox@19995 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agotar: strip leading '/' BEFORE memorizing hardlink's name
vda [Mon, 24 Sep 2007 19:07:57 +0000 (19:07 +0000)]
tar: strip leading '/' BEFORE memorizing hardlink's name

function                                             old     new   delta
writeFileToTarball                                  1362    1352     -10
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10)             Total: -10 bytes

git-svn-id: svn://busybox.net/trunk/busybox@19994 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoash: fix prompt expansion (Natanael Copa <natanael.copa@gmail.com>)
vda [Mon, 24 Sep 2007 18:30:02 +0000 (18:30 +0000)]
ash: fix prompt expansion (Natanael Copa <natanael.copa@gmail.com>)

git-svn-id: svn://busybox.net/trunk/busybox@19993 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years ago*: kill bb_get_last_path_component, replace with two functions
vda [Mon, 24 Sep 2007 18:27:04 +0000 (18:27 +0000)]
*: kill bb_get_last_path_component, replace with two functions
(one which strips trailing slash and one which does not)
wget: straighten out as a result of above change
   text    data     bss     dec     hex filename
   5056       1       0    5057    13c1 busybox.t4/networking/wget.o
   5022       0       0    5022    139e busybox.t5/networking/wget.o

git-svn-id: svn://busybox.net/trunk/busybox@19992 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowget: get rid of setitimer
vda [Mon, 24 Sep 2007 18:25:08 +0000 (18:25 +0000)]
wget: get rid of setitimer
   text    data     bss     dec     hex filename
   5110       1       0    5111    13f7 busybox.t3/networking/wget.o
   5056       1       0    5057    13c1 busybox.t4/networking/wget.o

git-svn-id: svn://busybox.net/trunk/busybox@19991 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowget: reorder functions, no code changes
vda [Mon, 24 Sep 2007 18:24:17 +0000 (18:24 +0000)]
wget: reorder functions, no code changes

git-svn-id: svn://busybox.net/trunk/busybox@19990 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowget: code shrink, move data out of bss
vda [Mon, 24 Sep 2007 15:04:00 +0000 (15:04 +0000)]
wget: code shrink, move data out of bss

git-svn-id: svn://busybox.net/trunk/busybox@19989 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agowget: allow dots in header field names.
vda [Mon, 24 Sep 2007 13:51:54 +0000 (13:51 +0000)]
wget: allow dots in header field names.
wget: code shrink

function                                             old     new   delta
gethdr                                               211     190     -21
wget_main                                           2609    2557     -52
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-73)             Total: -73 bytes

git-svn-id: svn://busybox.net/trunk/busybox@19988 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoinetd: make some fields smaller, move data out of data/bss sections
vda [Mon, 24 Sep 2007 10:41:30 +0000 (10:41 +0000)]
inetd: make some fields smaller, move data out of data/bss sections

function                                             old     new   delta
inetd_main                                          2125    2160     +35
setup                                                640     645      +5
initring                                              48      53      +5
reapchild                                            169     173      +4
retry                                                 92      93      +1
goaway                                               113     112      -1
inetd_setproctitle                                   175     173      -2
chargen_dg                                           229     227      -2
uid                                                    4       -      -4
.......................
Argv                                                   4       -      -4
rlim_ofile_cur                                         8       -      -8
config                                              1610    1602      -8
rlim_ofile                                            16       -     -16
getconfigent                                        1271    1241     -30
builtins                                             176     132     -44
ring                                                 128       -    -128
allsock                                              128       -    -128
------------------------------------------------------------------------------
(add/remove: 0/18 grow/shrink: 5/6 up/down: 50/-423)         Total: -373 bytes
   text    data     bss     dec     hex filename
 774144    1051   10708  785903   bfdef busybox_old
 774108    1039   10380  785527   bfc77 busybox_unstripped
$ size inetd.o inetd_orig.o
   text    data     bss     dec     hex filename
   9027       0       0    9027    2343 inetd.o
   9064      12     324    9400    24b8 inetd_orig.o

git-svn-id: svn://busybox.net/trunk/busybox@19986 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agorun_parts: make it sort executables by name (required by API)
vda [Sun, 23 Sep 2007 18:34:49 +0000 (18:34 +0000)]
run_parts: make it sort executables by name (required by API)

git-svn-id: svn://busybox.net/trunk/busybox@19977 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agomake fdisk compile on libc without llseek64
vda [Sun, 23 Sep 2007 14:05:54 +0000 (14:05 +0000)]
make fdisk compile on libc without llseek64

git-svn-id: svn://busybox.net/trunk/busybox@19968 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agohttpd: simplify CGI i/o loop. -200 bytes.
vda [Sun, 23 Sep 2007 13:56:57 +0000 (13:56 +0000)]
httpd: simplify CGI i/o loop. -200 bytes.

git-svn-id: svn://busybox.net/trunk/busybox@19967 69ca8d6d-28ef-0310-b511-8ec308f3f277

13 years agoinclude libbb.h, not busybox.h
vda [Sat, 22 Sep 2007 21:37:27 +0000 (21:37 +0000)]
include libbb.h, not busybox.h

git-svn-id: svn://busybox.net/trunk/busybox@19952 69ca8d6d-28ef-0310-b511-8ec308f3f277