Denis Vlasenko
f0d6cc8ca9
getopt_ulflags: fix indentation in comment (needs to be 8 _spaces_
...
in order to look correct to both 4 tab and 8 tab population).
Add comment about :: (which indicates optional argument).
2006-09-29 13:56:58 +00:00
Denis Vlasenko
b02ef82c99
getopt_ulflags: formatting fixes
2006-09-29 08:23:42 +00:00
Denis Vlasenko
6248a734e2
xargs: simplify option parsing
2006-09-29 08:20:30 +00:00
Denis Vlasenko
524176680d
Tried to find sha1_crypt - nope... ok, save few bytes in md5_sha1_sum.c
...
(time to sleep, 02:28 in the morning)...
2006-09-28 00:29:00 +00:00
Denis Vlasenko
de9ec92958
usage.h: fix compile-time bugs exposed by previous change
2006-09-27 23:31:59 +00:00
Denis Vlasenko
a77947f5bb
kill: fix bugs (kill -l output was horrible), fix style, constify data
2006-09-27 14:19:16 +00:00
Denis Vlasenko
be905d550c
process utilities related style cleanup
2006-09-27 14:17:31 +00:00
Denis Vlasenko
a552eeb498
wget: add (configurable) large file support. Run tested.
2006-09-26 09:22:12 +00:00
Denis Vlasenko
a94554d010
wget: fix bug where wget creates null file if there is no remote one.
...
add O_LARGEFILE support (not run tested :).
2006-09-23 17:49:09 +00:00
Denis Vlasenko
c290563319
remove unneeded #includes, fix indentation
2006-09-23 16:01:09 +00:00
Denis Vlasenko
a36a676923
correct_password: undo whitespace damage.
...
vlock + correct_password: fix incorrect line breaks in messages.
2006-09-23 13:11:49 +00:00
Denis Vlasenko
6429aabbf1
bb_askpass: shorten static password buffer. 256 is way too large.
...
simplify code a bit.
2006-09-23 12:22:11 +00:00
Denis Vlasenko
27ee7ba95e
losetup: getopt_ulflags'ification + small fix for perror_nomsg
2006-09-22 14:53:41 +00:00
Rob Landley
fbdf121b7d
Teach get_terminal_width_height to fall back to $LINES and $COLUMNS when
...
used via things like a serial console.
2006-09-20 22:06:01 +00:00
Denis Vlasenko
0b5fd45ef7
change char *string = "foo" -> char string[] = "foo"
...
function old new delta
xsetenv 45 44 -1
iproute_list_or_flush 1834 1833 -1
ipaddr_modify 1915 1914 -1
ipaddr_list_or_flush 1861 1860 -1
invarg 39 38 -1
do_set 1259 1258 -1
bb_verror_msg 268 267 -1
create_icmp_socket 142 140 -2
create_icmp6_socket 142 140 -2
bb_full_fd_action 324 322 -2
bb_path_mtab_file 10 - -10
.rodata 214796 214720 -76
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/11 up/down: 0/-99) Total: -99 bytes
2006-09-19 09:55:09 +00:00
Denis Vlasenko
9213a9e0f2
whitespace cleanup
2006-09-17 16:28:10 +00:00
Denis Vlasenko
6231e870ec
style fixes
2006-09-17 15:45:48 +00:00
Rob Landley
da9d1d079e
Strangely, using // in the comments I added was not a persistent accident.
2006-09-14 19:52:07 +00:00
Bernhard Reutner-Fischer
7fee0c4357
- fix copy'n paste errors that got introduced when switching to the shorter boilerplate.
...
No object code changes.
2006-09-13 16:39:19 +00:00
Rob Landley
20cc6d567f
Remove pointless "const". Bloatcheck says 0 bytes difference.
2006-09-12 21:42:17 +00:00
Bernhard Reutner-Fischer
b5f50ea344
- small trivia to be gentle to gcc-2.95.x which had no va_copy but only __va_copy.
2006-09-12 13:27:55 +00:00
Bernhard Reutner-Fischer
428a5cd0d3
- fix warning about discarding qualifiers in initialization
2006-09-12 13:25:16 +00:00
Bernhard Reutner-Fischer
57b56674a3
- merge xstat.c into xfuncs.c
2006-09-11 09:18:09 +00:00
Denis Vlasenko
0c45bb23d2
tar: fix "xopen with O_CREAT" warning, improve zero padding write
...
(was doing zillions of 1-byte write syscalls)
2006-09-09 12:49:03 +00:00
Denis Vlasenko
bd8f43dbab
few random readability enhansements. No code changes
2006-09-08 17:31:55 +00:00
Denis Vlasenko
2e502914b0
login: style fixes
2006-09-08 17:22:45 +00:00
Denis Vlasenko
a9801658ee
getty, sulogin: convert to using bb_msg for syslog output
2006-09-07 16:20:03 +00:00
Denis Vlasenko
b750dec40a
fix if (ENABLE_FEATURE_SYSLOG & (...)) - should be &&
2006-09-07 16:03:45 +00:00
Denis Vlasenko
049d6b8c08
Add CONFIG_FEATURE_SYSLOG which controls whether
...
bb_xx_msg will ever try to send output to syslog.
Add "select CONFIG_FEATURE_SYSLOG" to relevant applets.
This allows to omit syslog code if we do not have
any syslog-capable applets in the build.
2006-09-07 06:02:39 +00:00
Denis Vlasenko
3da6aa878a
adding files missed in prev updates (forgot about svn add)
2006-09-07 05:09:22 +00:00
Denis Vlasenko
6d655be5df
removed a lot of trailing \n in bb_msg() calls. It is added
...
automatically by function itself.
2006-09-06 19:02:46 +00:00
Denis Vlasenko
3538b9a882
Implement optional syslog logging using ordinary
...
bb_xx_msg calls, and convert networking/* to it.
The rest of bbox will be converted gradually.
2006-09-06 18:36:50 +00:00
Bernhard Reutner-Fischer
e614eaf40d
- mdev and grep use xregcomp. Closes bug #1021
2006-09-06 13:24:39 +00:00
Denis Vlasenko
797b4d210d
run_shell.c: style fix
2006-09-05 09:45:30 +00:00
Denis Vlasenko
d25a2645f5
xfunc: fix: && -> &. Also nuked two double semicolons...
2006-09-05 09:36:19 +00:00
Denis Vlasenko
21afc7dc29
uuencode: common implementation for wget and uuencode (closing bug 694)
2006-09-03 15:49:40 +00:00
Denis Vlasenko
65dbd8752b
zcip: getopt -> bb_getopt_ulflags
2006-09-03 12:27:25 +00:00
Denis Vlasenko
27af5a0dd3
replacing func() with xfunc() where appropriate
2006-09-03 12:21:59 +00:00
Bernhard Reutner-Fischer
73561cc75a
- pull from busybox_scratch: r15829:15850
...
Various fixes, cleanups and shrinkage:
saves 952 Bytes:
text data bss dec hex filename
1087742 15853 790632 1894227 1ce753 ../busybox/busybox.old
1086790 15853 790632 1893275 1ce39b busybox
via:
# scripts/bloat-o-meter ../busybox/busybox_unstripped.old busybox_unstripped
function old new delta
ipcrm_main 756 822 +66
getval - 61 +61
maybe_set_utc - 40 +40
udhcpc_main 2896 2912 +16
md5_hash_block 428 437 +9
opt 8 16 +8
qgravechar 106 110 +4
make_bitmap 292 295 +3
inflate_unzip 2056 2059 +3
add_partition 1412 1414 +2
__parsespent 156 158 +2
qrealloc 41 42 +1
format - 1 +1
catv_main 313 314 +1
watch_main 293 292 -1
varunset 81 80 -1
part 1 - -1
check_if_skip 837 836 -1
start_stop_daemon_main 840 837 -3
create_lost_and_found 175 172 -3
supress_non_delimited_lines 4 - -4
static.l 4 - -4
static.c 5 1 -4
bsd_sum_file 237 233 -4
eval2 338 332 -6
arithmetic_common 166 158 -8
cmpfunc 22 5 -17
cksum_main 294 275 -19
cmp_main 465 439 -26
dd_main 1535 1508 -27
rmmod_main 376 333 -43
cut_file 727 644 -83
ipcs_main 3809 3721 -88
cut_main 722 614 -108
date_main 1443 1263 -180
remove_ids 222 - -222
------------------------------------------------------------------------------
(add/remove: 3/4 grow/shrink: 11/18 up/down: 217/-853) Total: -636 bytes
2006-08-28 23:31:54 +00:00
Rob Landley
b8cea6dcb3
Jordan Crouse submitted a patch to only include xregcomp.c when we actually
...
use it, thus fixing building against uClibc with regex support disabled.
2006-08-28 20:04:46 +00:00
Rob Landley
abfe107f78
No real need for my_query_module() and this eliminates some type-punned
...
pointer warning on certain gcc versions (and saves 38 bytes).
2006-08-28 19:40:08 +00:00
Bernhard Reutner-Fischer
d591a360d3
- merge -r15463:15564 from busybox_scratch branch through these changesets:
...
------------------------------------------------------------------------
r15465 | aldot | 2006-06-21 20:48:06 +0200 (Wed, 21 Jun 2006) | 3 lines
- use CONFIG_BUSYBOX_EXEC_PATH as before it one was broken by a recent revert.
- use xchdir() since all is invain if it fails there anyways, supposedly
------------------------------------------------------------------------
r15466 | aldot | 2006-06-21 20:55:16 +0200 (Wed, 21 Jun 2006) | 2 lines
- adjust docs to take CONFIG_BUSYBOX_EXEC_PATH into account.
------------------------------------------------------------------------
r15467 | aldot | 2006-06-21 21:31:24 +0200 (Wed, 21 Jun 2006) | 18 lines
- partial fallout of my TREE_USED touchup against gcc-4.2: rip unused vars, save
s 144 bytes
text data bss dec hex filename
862434 10156 645924 1518514 172bb2 busybox.old
862322 10156 645892 1518370 172b22 busybox
function old new delta
z_len 4 - -4
textend 4 - -4
part_nb 4 - -4
insize 4 - -4
ifile_size 4 - -4
do_link 4 - -4
new_text 70 60 -10
ipaddr_list_link 33 23 -10
gzip_main 898 822 -76
------------------------------------------------------------------------------
(add/remove: 0/6 grow/shrink: 0/3 up/down: 0/-120) Total: -120 bytes
------------------------------------------------------------------------
r15468 | aldot | 2006-06-21 21:43:05 +0200 (Wed, 21 Jun 2006) | 19 lines
- remove useless global exports
function old new delta
rpm_main 940 1601 +661
rpm_getstring 107 112 +5
rpm_getint 148 153 +5
loop_through_files 103 106 +3
fileaction_dobackup 115 113 -2
fileaction_list 5 - -5
rpm_getcount 42 - -42
extract_cpio_gz 161 - -161
rpm_gettags 504 - -504
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 4/1 up/down: 674/-714) Total: -40 bytes
text data bss dec hex filename
862322 10156 645892 1518370 172b22 busybox.old
862290 10156 645892 1518338 172b02 busybox
------------------------------------------------------------------------
r15555 | aldot | 2006-06-30 14:10:11 +0200 (Fri, 30 Jun 2006) | 22 lines
- shrink syslog a little bit, move a big buffer (for 'line') off the bss, fold s
emaphore stuff into single caller manually.
stats:
function old new delta
logMessage 395 427 +32
message 1245 1257 +12
opts - 4 +4
small 1 - -1
local_logging 4 - -4
doRemoteLog 4 - -4
circular_logging 4 - -4
syslogd_main 1299 1285 -14
static.res 36 16 -20
.rodata 186650 186586 -64
static.line 1025 - -1025
------------------------------------------------------------------------------
(add/remove: 1/5 grow/shrink: 2/3 up/down: 48/-1136) Total: -1088 bytes
cow@s37:~/src/busybox_scratch$ size sysklogd/syslogd.o{.orig,}
text data bss dec hex filename
3723 348 5242 9313 2461 sysklogd/syslogd.o.orig
3697 348 4188 8233 2029 sysklogd/syslogd.o
==============================================================================
Overall bloatcheck for the changeset mentioned above:
function old new delta
rpm_main 953 1608 +655
logMessage 395 427 +32
message 1245 1257 +12
opts - 4 +4
rpm_getstring 107 110 +3
rpm_getint 148 151 +3
loop_through_files 103 104 +1
small 1 - -1
fileaction_dobackup 115 113 -2
z_len 4 - -4
textend 4 - -4
part_nb 4 - -4
local_logging 4 - -4
insize 4 - -4
ifile_size 4 - -4
do_link 4 - -4
doRemoteLog 4 - -4
circular_logging 4 - -4
fileaction_list 5 - -5
new_text 70 60 -10
ipaddr_list_link 33 23 -10
clear_bufs 31 21 -10
syslogd_main 1287 1273 -14
builtin_help 190 176 -14
static.res 36 16 -20
builtin_source 229 199 -30
rpm_getcount 42 - -42
gzip_main 842 786 -56
.rodata 227176 227112 -64
lash_main 609 527 -82
busy_loop 3883 3739 -144
extract_cpio_gz 155 - -155
rpm_gettags 501 - -501
static.line 1025 - -1025
------------------------------------------------------------------------------
(add/remove: 1/15 grow/shrink: 6/12 up/down: 710/-2221) Total: -1511 bytes
2006-08-20 17:35:13 +00:00
Rob Landley
519d7df930
Another whack at scripts/individual. Now builds 212 applets.
2006-08-09 20:56:23 +00:00
Rob Landley
e3781b7312
Add shared subtree support, suggested by Vladimir Dronnikov. Also break out a
...
few new (unfinished) config options, which I intend to make hidden (but
enabled) when CONFIG_NITPICK is disabled. Getting the .config infrastructure
to do that is non-obvious, it seems...
2006-08-08 01:39:49 +00:00
Rob Landley
23b61be0df
Add comments to all the functions in this file documenting what they're for.
2006-08-04 20:20:03 +00:00
Rob Landley
2c55fcac08
Thinko spotted by Vladimir Dronnikov.
2006-08-04 05:24:58 +00:00
Rob Landley
081e38483e
Remove xcalloc() and convert its callers to xzalloc(). About half of them
...
were using "1" as one of the arguments anyway, and as for the rest a multiply
and a push isn't noticeably bigger than pushing two arguments on the stack.
2006-08-03 20:07:35 +00:00
Rob Landley
d921b2ecc0
Remove bb_ prefixes from xfuncs.c (and a few other places), consolidate
...
things like xasprintf() into xfuncs.c, remove xprint_file_by_name() (it only
had one user), clean up lots of #includes... General cleanup pass. What I've
been doing for the last couple days.
And it conflicts! I've removed httpd.c from this checkin due to somebody else
touching that file. It builds for me. I have to catch a bus. (Now you know
why I'm looking forward to Mercurial.)
2006-08-03 15:41:12 +00:00
Rob Landley
534374755d
Cleaup read() and write() variants, plus a couple of new functions like
...
xlseek and fdlength() for the new mkswap.
2006-07-16 08:14:35 +00:00
Rob Landley
df822f2606
We need xsetuid() and xsetgid() because per-user process resource limits can
...
prevent a process from switching to a user that has too many processes, and
when that happens WE'RE STILL ROOT. See http://lwn.net/Articles/190331/
2006-07-15 23:00:46 +00:00