Denis Vlasenko
1b97efd66a
httpd shring and logging update, part 1 or 7
...
text data bss dec hex filename
9836 0 0 9836 266c busybox.t1/networking/httpd.o.orig
9724 0 0 9724 25fc busybox.t2/networking/httpd.o
9657 0 0 9657 25b9 busybox.t3/networking/httpd.o
9342 0 0 9342 247e busybox.t4/networking/httpd.o
9342 0 0 9342 247e busybox.t5/networking/httpd.o
9262 0 0 9262 242e busybox.t6/networking/httpd.o
9283 0 0 9283 2443 busybox.t7/networking/httpd.o
9334 0 0 9334 2476 busybox.t8/networking/httpd.o
2007-08-17 19:18:06 +00:00
Denis Vlasenko
a0319ba936
hdparm: shrink rodata by ~250 bytes
2007-08-16 10:37:49 +00:00
Denis Vlasenko
6a2f7f41cf
whitespace fixes, no code changes
2007-08-16 10:35:17 +00:00
Denis Vlasenko
ab9c44b1a4
v[hp]error_msg have 2-3 callsites only -> incorporate there.
2007-08-15 20:07:53 +00:00
Denis Vlasenko
bb23c06919
if pidfile turned out to be !regular file, do not unlink it.
...
It's most probably the /dev/null.
2007-08-15 20:05:37 +00:00
Denis Vlasenko
384b1d12f9
httpd: add -v[v]: prints client addresses, HTTP codes returned [and URLs]
...
get_line - 70 +70
packed_usage 22811 22863 +52
handle_incoming_and_exit 2246 2277 +31
httpd_main 1141 1155 +14
sendHeaders 489 482 -7
getLine 77 - -77
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 3/1 up/down: 167/-84) Total: 83 bytes
text data bss dec hex filename
774335 1058 11092 786485 c0035 busybox_old
774447 1058 11092 786597 c00a5 busybox_unstripped
2007-08-14 16:55:01 +00:00
Denis Vlasenko
dbe6e66d6a
trylink: automatically use custom link script if user provides one
...
vinfo_msg: one user (info_msg), incorporate in it
*: style fixes
2007-08-14 16:43:01 +00:00
Denis Vlasenko
3952f20c24
expand, unexpand: new applets from Tito <farmatito@tiscali.it>
2007-08-13 14:10:24 +00:00
Denis Vlasenko
e324184c05
s/#ifdef CONFIG_/#if ENABLE_/g
2007-08-13 10:36:25 +00:00
Denis Vlasenko
6ca409e0e4
trylink: produce even more info about final link stage
...
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-08-12 20:58:27 +00:00
Denis Vlasenko
e5d37ccb6e
httpd: fix CGI handling bug (we were closing wrong fd).
2007-08-11 20:20:02 +00:00
Denis Vlasenko
f893da875a
ls,ps,watch: measure terminal width on fd 0, not 1
2007-08-09 08:27:24 +00:00
Denis Vlasenko
501bfe2630
stat: fix option -Z segv (bug 1454)
2007-08-09 08:10:13 +00:00
Denis Vlasenko
e5dbba22af
bb_uudecode: now this is the more thorough fix... I hope...
2007-08-06 15:49:12 +00:00
Denis Vlasenko
4661117911
bb_uuencode: fix obscure case where we were using data past last byte of source
...
(fixes testsuite failure)
bb_uuencode 154 160 +6
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 6/0) Total: 6 bytes
text data bss dec hex filename
770284 1096 11228 782608 bf110 busybox_old
770288 1096 11228 782612 bf114 busybox_unstripped
2007-08-06 15:43:17 +00:00
Denis Vlasenko
0e2c9fb4e0
mount: print errno on NFS error (again)
2007-08-03 14:16:24 +00:00
Denis Vlasenko
80edead5ea
udhcp: slight shrink
...
udhcpd_main 1171 1208 +37
udhcpc_main 2363 2387 +24
dhcprelay_main 1145 1146 +1
dhcprelay_stopflag 4 1 -3
dhcprelay_signal_handler 11 8 -3
client_background 46 42 -4
udhcp_read_interface 230 211 -19
udhcp_make_pidfile 76 - -76
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 3/4 up/down: 62/-105) Total: -43 bytes
text data bss dec hex filename
770052 1096 11228 782376 bf028 busybox_old
769980 1096 11228 782304 befe0 busybox_unstripped
2007-08-02 22:31:05 +00:00
Denis Vlasenko
1caca34aa6
start_stop_daemon: NOMMU fixes, round 2 by Alex Landau <landau_alex@yahoo.com>
...
dhcpc: fixed "ifupdown + udhcpc_without_pidpile_creation" bug
2007-08-02 10:14:29 +00:00
Denis Vlasenko
a1b16f4d5c
start_stop_daemon: NOMMU fix; smaller fixes
2007-07-31 17:09:44 +00:00
Denis Vlasenko
1bab1de698
fix for suffix optimization (which was in previous commit)
2007-07-27 15:30:39 +00:00
Denis Vlasenko
3734b946bf
bb_getpwuid, bb_getgrgid: change order of arguments to more intuitive one;
...
comment thoroughly when they die and when they dont.
2007-07-27 11:20:10 +00:00
Denis Vlasenko
f4cee7a174
getopt32: fix getopt32 breakage (forgot to memset(0) it) -- thanks rockeychu
2007-07-25 17:18:06 +00:00
Denis Vlasenko
990d0f63ee
Replace index_in_[sub]str_array with index_in_[sub]strings,
...
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-24 15:54:42 +00:00
Denis Vlasenko
5bfcb4d5ae
getopt32 must remain NOFORK-safe (no mallocs!). Using alloca and pretending
...
stack is infinite. Unfortunately, +79 bytes.
2007-07-23 17:40:35 +00:00
Denis Vlasenko
bdc88fdc68
rework long option handling. saves ~1.2k
...
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-07-23 17:14:14 +00:00
Denis Vlasenko
b71c668c57
style fix (stray space before ';')
2007-07-21 15:08:09 +00:00
Denis Vlasenko
091965768d
libbb: nuke BB_GETOPT_ERROR, always die if there are mutually exclusive options
...
find_pair 164 180 +16
passwd_main 1222 1230 +8
display_speed 91 96 +5
msh_main 1335 1339 +4
qrealloc 38 36 -2
refresh 1190 1182 -8
cut_main 543 532 -11
sendCgi 1807 1794 -13
getopt32 1063 1045 -18
arith 2077 2030 -47
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 4/6 up/down: 33/-99) Total: -66 bytes
text data bss dec hex filename
781548 1168 11900 794616 c1ff8 busybox_old
781452 1168 11900 794520 c1f98 busybox_unstripped
2007-07-21 13:27:44 +00:00
Denis Vlasenko
557fb713e0
chpasswd: fixes and code shrink
...
update_passwd 732 734 +2
chpasswd_main 318 292 -26
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 2/-26) Total: -24 bytes
text data bss dec hex filename
781564 1168 11900 794632 c2008 busybox_old
781548 1168 11900 794616 c1ff8 busybox_unstripped
2007-07-21 13:25:28 +00:00
Denis Vlasenko
1ec5eaecba
chpasswd: now with svn add
2007-07-20 21:29:49 +00:00
Denis Vlasenko
21d1014b5b
chpasswd: new applet by Alexander Shishkin <virtuoso@slind.org>
2007-07-20 21:28:41 +00:00
Denis Vlasenko
2f6ae43b9c
stray trailing tabs removed
2007-07-19 22:50:47 +00:00
Denis Vlasenko
49a128a156
remove accumulated stray trailing whitespace
2007-07-17 21:42:59 +00:00
Denis Vlasenko
fb79a2e2cf
xioctl and friends by Tito <farmatito@tiscali.it>
...
function old new delta
do_iptunnel 203 977 +774
process_dev 5328 5494 +166
ioctl_or_perror - 54 +54
ioctl_or_perror_and_die - 51 +51
ioctl_alt_func - 49 +49
bb_ioctl_or_warn - 47 +47
do_add_ioctl 102 145 +43
bb_xioctl - 39 +39
print_value_on_off - 31 +31
get_lcm 105 123 +18
arp_main 2155 2167 +12
..................
zcip_main 1576 1566 -10
setlogcons_main 92 82 -10
dumpkmap_main 263 253 -10
do_get_ioctl 85 75 -10
setkeycodes_main 165 154 -11
write_table 244 232 -12
vconfig_main 318 306 -12
do_del_ioctl 93 81 -12
set_address 75 62 -13
maybe_set_utc 30 16 -14
loadfont_main 495 479 -16
slattach_main 712 695 -17
do_loadfont 191 174 -17
do_iplink 1155 1136 -19
getty_main 2583 2562 -21
fbset_main 2058 2035 -23
do_time 588 565 -23
xioctl 25 - -25
read_rtc 186 160 -26
parse_conf 1299 1270 -29
udhcp_read_interface 269 239 -30
bb_ioctl 45 - -45
bb_ioctl_alt 70 - -70
bb_ioctl_on_off 78 - -78
.rodata 129370 129018 -352
do_show 799 - -799
------------------------------------------------------------------------------
(add/remove: 6/5 grow/shrink: 13/49 up/down: 1316/-1864) Total: -548 bytes
text data bss dec hex filename
675352 2740 13968 692060 a8f5c busybox_old
674804 2740 13968 691512 a8d38 busybox_unstripped
2007-07-14 22:07:14 +00:00
Denis Vlasenko
d166f83d74
md5_sha1_sum: fix mishandling when run as /bin/md5sum (with path)
...
chown/chgrp: completely match coreutils 6.8 wrt symlink handling
function old new delta
recursive_action 411 422 +11
arith 2033 2042 +9
collect_blk 467 474 +7
dhcprelay_main 1122 1125 +3
fsck_main 1909 1911 +2
singlemount 4555 4547 -8
xmalloc_realpath 14 - -14
get_lcm 123 105 -18
ed_main 3111 3084 -27
chown_main 217 183 -34
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 5/4 up/down: 32/-101) Total: -69 bytes
text data bss dec hex filename
684132 2744 14000 700876 ab1cc busybox_old
684060 2744 14000 700804 ab184 busybox_unstripped
2007-07-05 00:12:55 +00:00
Denis Vlasenko
54e19da86d
correct_password: if password is 'x' or '*' and there is no shadow, use
...
fake encrypted password 'aa' (which is guaranteed to fail password check).
2007-07-03 10:28:46 +00:00
Denis Vlasenko
e190c16636
correct_password: do not print "no shadow passwd..." message
...
function old new delta
correct_password 204 191 -13
.rodata 129530 129466 -64
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-77) Total: -77 bytes
text data bss dec hex filename
675984 2744 13968 692696 a91d8 busybox_old
675908 2744 13968 692620 a918c busybox_unstripped
2007-07-03 06:15:42 +00:00
Denis Vlasenko
4b9b0ced30
find: fix build failure on certain configs
...
(found by Cristian Ionescu-Idbohrn <cristian.ionescu-idbohrn@axis.com>)
2007-07-01 17:35:17 +00:00
Denis Vlasenko
98ebab8b76
top,ps: improve /proc/PID/cmdinfo reading code
...
function old new delta
display_status - 1231 +1231
read_cmdline - 101 +101
parse_conf 1284 1303 +19
arith 2033 2042 +9
collect_blk 467 474 +7
fsck_main 1909 1911 +2
dhcprelay_main 1125 1122 -3
singlemount 4555 4547 -8
read_close 50 36 -14
get_lcm 123 105 -18
ed_main 3111 3084 -27
func_args 73 28 -45
procps_scan 732 658 -74
top_main 2187 899 -1288
------------------------------------------------------------------------------
(add/remove: 2/0 grow/shrink: 4/8 up/down: 1369/-1477) Total: -108 bytes
text data bss dec hex filename
676048 2744 13968 692760 a9218 busybox_old
675940 2744 13968 692652 a91ac busybox_unstripped
2007-06-30 14:47:41 +00:00
Denis Vlasenko
8b1409896d
add bb_basename.c
2007-06-30 10:58:08 +00:00
Denis Vlasenko
dc757aa16c
introduce and use bb_basename()
...
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-06-30 08:04:05 +00:00
Denis Vlasenko
f7d07b1723
killall, pidof: use argv0 for process matching too
...
top: show cmdline, not comm field
(fixes problems with re-execed applets showing as processes with name "exe",
and not being found by pidof/killall by applet name)
function old new delta
find_pid_by_name 98 156 +58
procps_scan 692 732 +40
top_main 2724 2762 +38
find_pair 164 180 +16
collect_int 114 123 +9
cmp_main 547 555 +8
collect_fork 112 119 +7
collect_ctx 112 119 +7
read_package_field 253 257 +4
passwd_main 1983 1985 +2
process_stdin 435 433 -2
xstrtoul_range_sfx 229 226 -3
get_next_block 1852 1849 -3
arith 2042 2033 -9
sv_main 1236 1226 -10
singlemount 4690 4672 -18
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 10/6 up/down: 189/-45) Total: 144 bytes
text data bss dec hex filename
734789 3028 14400 752217 b7a59 busybox_old
734933 3028 14400 752361 b7ae9 busybox_unstripped
2007-06-30 08:03:26 +00:00
Denis Vlasenko
42ee26d00c
procps: shrink /proc scanning code a bit
...
function old new delta
skip_fields 16 15 -1
.rodata 144266 144258 -8
procps_scan 739 692 -47
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/3 up/down: 0/-56) Total: -56 bytes
text data bss dec hex filename
734845 3028 14400 752273 b7a91 busybox_old
734789 3028 14400 752217 b7a59 busybox_unstripped
2007-06-30 08:01:04 +00:00
Denis Vlasenko
e8240f19bd
uuencode: shrink
...
function old new delta
uuencode_main 427 337 -90
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-90) Total: -90 bytes
text data bss dec hex filename
734981 3028 14400 752409 b7b19 busybox_old
734889 3028 14400 752317 b7abd busybox_unstripped
2007-06-26 15:59:37 +00:00
Denis Vlasenko
80b8b39899
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
2007-06-25 10:55:35 +00:00
Denis Vlasenko
198badafd8
pidof: size optimizations (-50 bytes)
2007-06-23 14:56:43 +00:00
Denis Vlasenko
931de892cc
random shrinkage of statics, -60 bytes saved
2007-06-21 12:43:45 +00:00
Denis Vlasenko
88976d00d8
remove extra ')'
2007-06-21 07:09:18 +00:00
Denis Vlasenko
7510384107
do not do utime() on links, it acts on link targets, and we don't want that.
...
rename link_name to link_target, less confusing this way.
2007-06-20 14:49:47 +00:00
Denis Vlasenko
31789a81d5
top,ps: 'stringify' tty only when needed. -60 bytes.
2007-06-19 14:43:17 +00:00
Denis Vlasenko
362c6ec694
top: speedup if tty info is not requested
2007-06-19 13:53:12 +00:00
Denis Vlasenko
3afac4ce06
top,ps: reduce CPU usage in decimal conversion (optional)
...
text data bss dec hex filename
734651 3040 14416 752107 b79eb busybox_old
734751 3040 14416 752207 b7a4f busybox_unstripped
2007-06-19 13:46:24 +00:00
Denis Vlasenko
a61cb92f2d
make /etc/network parsing configurable. -200 bytes when off.
2007-06-19 11:24:47 +00:00
Denis Vlasenko
6d9ea24611
networking/interface.c: huke remaining big statics; use malloc for INET[6]_rresolve
...
return value. Went thru callers and adjusted them - code got smaller too.
function old new delta
ip_port_str - 126 +126
INET6_rresolve 165 182 +17
static.cache 20 24 +4
route_main 2092 2091 -1
INET_sprint 61 59 -2
INET_nn 4 - -4
INET6_sprint 59 53 -6
udp_do_one 518 508 -10
tcp_do_one 433 423 -10
raw_do_one 494 484 -10
traceroute_main 4117 4105 -12
INET_rresolve 334 321 -13
bb_displayroutes 494 456 -38
snprint_ip_port 244 - -244
static.buff 264 16 -248
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 2/10 up/down: 147/-598) Total: -451 bytes
size busybox_old busybox_unstripped
text data bss dec hex filename
751073 3048 14688 768809 bbb29 busybox_old
750873 3048 14440 768361 bb969 busybox_unstripped
2007-06-19 11:12:46 +00:00
Denis Vlasenko
1b16bdaebf
networking/interface.c: reduce bss usage
...
function old new delta
.rodata 158918 158950 +32
display_interfaces 133 153 +20
UNSPEC_print 56 68 +12
pr_ether 59 65 +6
static.proc_read 4 1 -3
interface_opt_a 4 1 -3
in_ether 139 136 -3
ifconfig_main 1296 1293 -3
if_readlist_proc 686 680 -6
ife_print 1350 1338 -12
do_if_print 46 - -46
static.buff 369 264 -105
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 4/7 up/down: 70/-181) Total: -111 bytes
# size busybox_old busybox_unstripped
text data bss dec hex filename
751073 3080 14800 768953 bbbb9 busybox_old
751073 3048 14688 768809 bbb29 busybox_unstripped
2007-06-19 11:10:02 +00:00
Denis Vlasenko
91e149a373
libbb: random hunt for statics
...
function old new delta
bb_askpass 306 321 +15
pw_encrypt 38 39 +1
static.passwd 64 4 -60
static.cipher 128 4 -124
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/2 up/down: 16/-184) Total: -168 bytes
# size busybox_old busybox_unstripped
text data bss dec hex filename
683705 2704 14240 700649 ab0e9 busybox_old
683721 2704 14064 700489 ab049 busybox_unstripped
2007-06-18 10:35:06 +00:00
Mike Frysinger
ebd27aabaa
fix an obvious typo while trying to access the tv_usec member
2007-06-18 07:12:31 +00:00
Denis Vlasenko
bd7bb299c0
wget: use monotonic_sec instead of gettimeofday
...
zcip: use monotonic_us instead of gettimeofday
udhcpcd: simpler, shorter random_xid()
function old new delta
monotonic_sec - 41 +41
find_pair 164 180 +16
run_list_real 2018 2028 +10
cmp_main 547 555 +8
collect_ctx 112 119 +7
singlemount 4544 4549 +5
time_main 1124 1128 +4
static.start_sec - 4 +4
static.lastupdate_sec - 4 +4
sock - 4 +4
read_package_field 253 257 +4
pick 38 40 +2
get_next_line 145 147 +2
count_lines 59 61 +2
process_stdin 435 433 -2
xstrtoul_range_sfx 229 226 -3
static.initialized 4 1 -3
dhcprelay_main 1125 1122 -3
catcher 380 377 -3
arping_main 1969 1966 -3
s 8 4 -4
cfg 4 - -4
static.lastupdate 8 - -8
start 8 - -8
random_xid 95 33 -62
.rodata 129114 129050 -64
zcip_main 1731 1576 -155
progressmeter 1035 867 -168
------------------------------------------------------------------------------
(add/remove: 4/3 grow/shrink: 10/11 up/down: 113/-490) Total: -377 bytes
2007-06-17 23:40:26 +00:00
Denis Vlasenko
459be35234
hwclock: size optimizations
...
libbb/time.c: new file, introducing monotonic_us()
pscan, traceroute, arping: use it instead of gettimeofday
ping, zcip: TODO
function old new delta
monotonic_us - 89 +89
find_pair 164 180 +16
.rodata 129747 129763 +16
refresh 1144 1152 +8
............
timeout 8 4 -4
static.start 8 4 -4
last 8 4 -4
parse_conf 1303 1284 -19
time_main 1149 1124 -25
gettimeofday_us 39 - -39
arping_main 2042 1969 -73
hwclock_main 594 501 -93
catcher 485 380 -105
traceroute_main 4300 4117 -183
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 8/11 up/down: 157/-562) Total: -405 bytes
2007-06-17 19:09:05 +00:00
Denis Vlasenko
85532fc4d4
remove obsolete comment
2007-06-16 14:16:30 +00:00
Denis Vlasenko
53a0e97196
find: make -size match GNU find
2007-06-16 00:30:52 +00:00
Bernhard Reutner-Fischer
867266059b
- vda perfers not to use the banner
2007-06-15 08:30:33 +00:00
Denis Vlasenko
d8540f71ac
init: make sure fd 0,1,2 are not closed, + related optimizations.
...
init_main 929 920 -9
bb_daemonize_or_rexec 145 127 -18
2007-06-14 07:53:06 +00:00
Denis Vlasenko
ca525b4f24
*: BB_BANNER -> bb_banner (it is not a const or #define)!
...
correct_password: explain in detail why it is ok to use bb_banner
fsck_minix: make it print bb version, not it's own (outdated/irrelevant) one
Marginal size difference:
text data bss dec hex filename
679119 2700 15632 697451 aa46b busybox_old
679091 2700 15632 697423 aa44f busybox_unstripped
2007-06-13 12:27:17 +00:00
Denis Vlasenko
d67cef2425
hush: fix read builtin to not read ahead past eol and to not use
...
insane amounts of stack. Testsuite updated.
2007-06-13 06:47:47 +00:00
Denis Vlasenko
f5f75c5e82
remove nearly-duplicate PATHs in several places
...
function old new delta
bb_PATH_root_path - 35 +35
varunset 60 58 -2
arith 2042 2033 -9
bb_default_root_login_path 30 - -30
.rodata 128794 128762 -32
which_main 152 117 -35
defpathvar 40 - -40
------------------------------------------------------------------------------
(add/remove: 1/2 grow/shrink: 0/4 up/down: 35/-148) Total: -113 bytes
2007-06-12 22:35:19 +00:00
Denis Vlasenko
f312e32662
login: make /etc/nologin support configurable. -240 bytes if not selected.
2007-06-12 22:04:57 +00:00
Denis Vlasenko
3ad5d0cbbe
diff: shrink code (-85 bytes):
...
function old new delta
fiddle_sum 8 - -8
diffreg 2717 2690 -27
prepare 334 284 -50
------------------------------------------------------------------------------
(add/remove: 0/1 grow/shrink: 0/2 up/down: 0/-85) Total: -85 bytes
s/ATTRIBUTE_ALWAYS_INLINE/ALWAYS_INLINE/g
2007-06-12 20:54:54 +00:00
Denis Vlasenko
15611bb958
A few more string duplicates found & eliminated
...
# size busybox_old busybox_unstripped
text data bss dec hex filename
679693 2700 15632 698025 aa6a9 busybox_old
679523 2700 15632 697855 aa5ff busybox_unstripped
2007-06-12 08:52:02 +00:00
Denis Vlasenko
aa198dd39c
uudecode: nuke duplicate base64_table[]. saves 65 bytes
2007-06-12 07:24:11 +00:00
Bernhard Reutner-Fischer
d71e45856e
- use bb_msg_full_version instead of a separate string. Saves a minor 3 bytes.
2007-06-11 15:09:21 +00:00
Denis Vlasenko
5a65447e30
top: add config option and code for global CPU % display
2007-06-10 17:11:59 +00:00
Denis Vlasenko
e8a0788b24
moved biggest stack buffers to malloc space, or made their size configurable
...
(8k of shell line edit buffer is an overkill)
# make ARCH=i386 bloatcheck
function old new delta
read_line_input 3933 3967 +34
ifaddrlist 348 345 -3
do_loadfont 208 191 -17
edit_file 840 819 -21
.rodata 129112 129080 -32
uncompress 1305 1268 -37
loadfont_main 566 495 -71
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/6 up/down: 34/-181) Total: -147 bytes
2007-06-10 15:08:44 +00:00
Denis Vlasenko
65e14b4588
login: ask passwords even for wrong usernames.
...
# size busybox_old busybox_unstripped
text data bss dec hex filename
680099 2704 15648 698451 aa853 busybox_old
680110 2704 15648 698462 aa85e busybox_unstripped
2007-06-08 15:27:06 +00:00
Denis Vlasenko
bdbbb7ec49
make busybox --install work even if /proc/self/exe doesn't exist
...
# size busybox_old busybox_unstripped
text data bss dec hex filename
680095 2704 15648 698447 aa84f busybox_old
680099 2704 15648 698451 aa853 busybox_unstripped
2007-06-08 15:02:55 +00:00
Denis Vlasenko
0696b8aae8
ps: fix -Z (by Yuichi Nakamura <ynakam@hitachisoft.jp>)
2007-06-06 07:40:16 +00:00
Denis Vlasenko
5c51a7ca52
nc: make connecting to IPv4 from IPv6-enabled hosts easier
...
(was requiring -s <local addr>)
2007-06-05 20:08:11 +00:00
Denis Vlasenko
74324c8666
Audit bb_common_bufsiz usage, add script which looks for misuse.
...
tr: stop using globals needlessly.
code: -103 bytes
2007-06-04 10:16:52 +00:00
Denis Vlasenko
9a7d38fe24
delete tons of extra #includes
2007-05-31 22:42:12 +00:00
Denis Vlasenko
fad2b86c9e
use "glibc errno" trick not only for ash, but for entire busybox
...
(add/remove: 1/1 grow/shrink: 37/37 up/down: 139/-228) Total: -89 bytes
2007-05-31 22:16:38 +00:00
Denis Vlasenko
4b924f3a5c
whitespace fixes
2007-05-30 00:29:55 +00:00
Denis Vlasenko
4ef7d3a2de
verror_msg: don't printf(NULL)
2007-05-29 21:41:28 +00:00
Denis Vlasenko
b6adbf1be2
usage.c: remove reference to busybox.h
...
*: s/include "busybox.h"/include "libbb.h"
2007-05-26 19:00:18 +00:00
Denis Vlasenko
5a6aeddfa7
xpipe: introduce (saves ~170 bytes)
...
udhcp/signalpipe.c: use pipe instead of socketpair.
2007-05-26 16:44:20 +00:00
Denis Vlasenko
b055001b6a
hush: fix handling of unmatched ${name (without closing '}') -
...
was eating all remaining input, potentially megabytes.
nofork: save/restore die_jmp too
nofork: use -2222 instead of -111 as "special" return valur for zero
(-111 is used by some applets. -2222 won't fit in exitcode and thus safer)
2007-05-24 12:18:16 +00:00
Denis Vlasenko
96f67dc69d
more compile fixes from randomconfig run
2007-05-17 13:02:41 +00:00
Denis Vlasenko
d46e6d1a55
fix trivial compile errors found by randomconfig run
2007-05-17 12:58:30 +00:00
Denis Vlasenko
a035e9f1a9
cryptpw: forgot svn add... how typical of me :(
2007-05-08 23:23:35 +00:00
Denis Vlasenko
7e84e539de
cryptpw: new applet (a bit less than 3k added)
...
(by Thomas Lundquist <lists@zelow.no>)
2007-05-08 17:52:17 +00:00
Denis Vlasenko
3bc18253b0
fix suid config handling
2007-05-02 23:01:32 +00:00
Denis Vlasenko
dcf4de20a1
test: code size saving, no logic changes
...
ps: fix warning, make a bit smaller
kill -l: make smaller & know much more signals
function old new delta
get_signum 121 153 +32
kill_main 826 843 +17
get_signame 44 36 -8
signals 252 224 -28
.rodata 131955 131923 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/3 up/down: 49/-68) Total: -19 bytes
2007-05-01 20:07:29 +00:00
Denis Vlasenko
18e19f2b0d
hush: fix nofork + ctrl-Z clobbering of globals
2007-04-28 16:43:18 +00:00
Denis Vlasenko
706fdc98c3
find_root_device: use lstat - don't follow links
2007-04-21 23:28:03 +00:00
Denis Vlasenko
54e7ffb3a4
hush: begin fixing non-functional job control
2007-04-21 00:03:36 +00:00
Denis Vlasenko
8581863a1b
procps: remove all global variables
...
text data bss dec hex filename
1462 14 24 1500 5dc busybox.t2/procps/ps.o
1484 0 0 1484 5cc busybox.t3/procps/ps.o
3122 0 252 3374 d2e busybox.t1/procps/top.o
3117 0 0 3117 c2d busybox.t3/procps/top.o
2007-04-19 14:47:11 +00:00
Denis Vlasenko
516a0ca2dc
ps: add -o tty and -o rss support
...
1373 14 24 1411 583 busybox.t1/procps/ps.o
1462 14 24 1500 5dc busybox.t2/procps/ps.o
2007-04-19 14:46:14 +00:00
Denis Vlasenko
c34d35557b
loop device code: readability improvement
2007-04-19 00:09:34 +00:00
Denis Vlasenko
0922192740
lineedit: state->hist_file doesn't exist if !FEATURE_EDITING_SAVEHISTORY,
...
#ifdef it out
2007-04-15 13:21:01 +00:00
Denis Vlasenko
5f9468e996
lineedit: nuke two unused variables and code which sets them
...
applets: do not even try to read config if run by real root
msh: use named constants (O_RDONLY etc) in open() instead of magic numbers,
other minor code size reduction.
2007-04-14 13:22:09 +00:00
Denis Vlasenko
bf3561fd15
lineedit: do not try to open NULL history file
2007-04-14 10:10:40 +00:00
Denis Vlasenko
f5294e1f4c
hush: use NOFORK applets as appropriate. Net reduction of code size.
2007-04-14 10:09:57 +00:00
Denis Vlasenko
16abcd90ae
teach find_root_device to deal with /dev/ subdirs
...
(by "Kirill K. Smirnov" <lich@math.spbu.ru>)
2007-04-13 23:59:52 +00:00
Denis Vlasenko
1d6a4aec2c
make xsocket die with address family printed (if VERBOSE_RESOLUTION_ERRORS=y)
2007-04-13 21:26:20 +00:00
Denis Vlasenko
0de3c55b42
login: remove setpgrp call (makes it work from shell prompt again).
...
login: sanitize stdio descriptors (we are suid, need to be careful!)
shrink login and set_environment by ~100 bytes.
2007-04-12 12:31:02 +00:00
Denis Vlasenko
831a20f512
pass a copy of argv[i] to NOFORK applets (they may permute it etc).
...
set/save/restore more shared global variables whan call one applet from another
2007-04-12 12:27:32 +00:00
Bernhard Reutner-Fischer
b290889f02
- add xsendto and use where appropriate; shrink iplink; sanitize libiproute a bit.
...
-916 byte
2007-04-12 11:34:39 +00:00
Denis Vlasenko
51742f4bb0
style fixes. No code changes
2007-04-12 00:32:05 +00:00
Denis Vlasenko
50f7f446ec
bb_full_fd_action: remove potential xmalloc from NOFORK path
...
cat: stop using stdio.h opens
libbb: introduce & use open[3]_or_warn
function old new delta
open3_or_warn - 54 +54
bb_cat 115 144 +29
open_or_warn - 25 +25
unlzma 2404 2412 +8
chattr_main 334 339 +5
xstrtoul_range_sfx 251 255 +4
telnet_main 1514 1510 -4
static.opt 4 - -4
qgravechar 122 118 -4
fuser_add_pid 61 54 -7
fuser_add_inode 154 147 -7
writeFileToTarball 1542 1534 -8
refresh 1156 1148 -8
do_show 856 846 -10
read_leases 212 200 -12
setup_redirects 236 222 -14
iproute_list_or_flush 1582 1568 -14
read_config 427 411 -16
write_leases 284 264 -20
hash_file 338 318 -20
copy_file 1760 1740 -20
do_iproute 2610 2588 -22
bb_full_fd_action 320 269 -51
open_to_or_warn 103 49 -54
fuser_main 1660 1596 -64
.rodata 131160 131096 -64
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 4/19 up/down: 125/-423) Total: -298 bytes
2007-04-11 23:20:53 +00:00
Denis Vlasenko
d571c08c25
fix misplaced #if
2007-04-11 07:26:56 +00:00
Denis Vlasenko
473dae080a
add more convenient defines for [NO]MMU:
...
"#ifndef BB_NOMMU" is a double negative
2007-04-11 07:04:23 +00:00
Denis Vlasenko
f1a7141cfc
random NOMMU fixes. compressed --help really does work for NOMMU! /me happy
2007-04-10 23:32:37 +00:00
Denis Vlasenko
80d14beae9
Rename two config options:
...
FEATURE_SH_STANDALONE_SHELL => FEATURE_SH_STANDALONE
FEATURE_EXEC_PREFER_APPLETS => FEATURE_PREFER_APPLETS
Make SH_STANDALONE depend on PREFER_APPLETS.
getopt.c: more randomconfig-induced fixes
2007-04-10 23:03:30 +00:00
Denis Vlasenko
c6758a07c6
make compressed help code NOMMU- and NOFORK-friendly -
...
no forking anymore, bunzip2 unpack routine now does all it in memory.
2007-04-10 21:40:19 +00:00
Denis Vlasenko
335b63d8d1
make a few struct bb_applet members conditional
...
rename sllep_and_die -> xfunc_die
make fflush_stdout_and_exit NOFORK-safe
fix some buglets found by randomconfig
2007-04-10 21:38:30 +00:00
Denis Vlasenko
99912ca733
audit small applets and mark some of them as NOFORK.
...
Put big scary warnings in relevant places.
2007-04-10 15:43:37 +00:00
Denis Vlasenko
ff131b980d
style fixes. No code changes.
2007-04-10 15:42:06 +00:00
Bernhard Reutner-Fischer
7e8a53a335
- add libbb function str_tolower to convert a string to lowercase.
...
- shrink wget a bit
2007-04-10 09:37:29 +00:00
Denis Vlasenko
3f3aa2a57d
make xfunctions optionally longjump instead of exit.
...
use it for making NOFORK more practical.
touch: make it a NOFORK applet
2007-04-09 21:35:07 +00:00
Denis Vlasenko
cd7001f705
factor out NOFORK/NOEXEC code from find. Use it for xargs too.
2007-04-09 21:32:30 +00:00
Denis Vlasenko
53d445aa75
wait4pid: if passed with pid < 0, do not set errno - it is already set by exec!
2007-04-09 13:21:33 +00:00
Denis Vlasenko
7e754f12d3
Implement first instance of NOFORK applet - echo
...
find: use NOFORK/NOEXEC; small -exec buglet also eliminated
vfork_daemon_rexec: honor PREFER_APPLETS
echo: small size improvements
find -exec echo {} \; with PREFER_APPLETS=y runs 4 times faster
2007-04-09 13:04:50 +00:00
Denis Vlasenko
8d9f495d68
getopt32: fix llist_t options ordering. llist_rev is not unused.
...
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-08 15:08:42 +00:00
Denis Vlasenko
bbd695d801
find: fix handling of -prune
...
recursive_actions: uppercase flag constants
2007-04-08 10:52:28 +00:00
Denis Vlasenko
04c99ebb4f
random small shrinkage and elimination of statics
2007-04-07 00:44:31 +00:00
Denis Vlasenko
5a30d59c3d
svn add match_fstype.c :(
2007-04-05 22:19:43 +00:00
Denis Vlasenko
bf295dd5b6
[u]mount: extend -t option (Roy Marples <uberlord@gentoo.org>)
2007-04-05 21:57:47 +00:00
Denis Vlasenko
1bb552b1d9
libbb: add xunlink()
...
patch: do not try to delete same file twice
2007-04-05 21:25:15 +00:00
Denis Vlasenko
29fe7265b8
nc: port nc 1.10 to busybox
2007-04-05 20:26:28 +00:00
Bernhard Reutner-Fischer
bdd253e450
- fix segfault in reset_ino_dev_hashtable() when *hashtable was null.
...
Seen in the testsuite for du -l .../testsuite on exit with CLEAN_UP enabled.
2007-04-05 09:21:24 +00:00
Denis Vlasenko
729bd9e0b0
test: comment out unused code
...
udpsvd: fake it compile
tcpsvd: more optimal memorizing of IP's for -C
2007-04-02 12:37:28 +00:00
Denis Vlasenko
2856dab477
tcpsvd: new applet
...
It's a GPL-ed 'clone' of Dan Bernstein's tcpserver.
Author: Gerrit Pape <pape@smarden.org>
http://smarden.sunsite.dk/ipsvd/
size tcpsvd.o
text data bss dec hex filename
2571 4 16 2591 a1f tcpsvd.o
2007-04-01 01:18:20 +00:00
Bernhard Reutner-Fischer
eceecea568
- fix bug where we did not reject invalid classes like '[[:alpha'
...
- debloat while at it:
text data bss dec hex filename
1554 0 19 1573 625 tr.o.oorig
1357 0 16 1373 55d tr.o
2007-03-30 14:43:27 +00:00
Bernhard Reutner-Fischer
3e816c1252
- fold recurse, depthFirst and dereference params into one param flags.
...
Minor size improvement (-16b for size, -24b according to bloat-o-meter).
2007-03-29 10:30:50 +00:00
Denis Vlasenko
450196c119
ps: work around libc bug: printf("%.*s\n", MAX_INT, buffer)
2007-03-28 21:57:12 +00:00
Denis Vlasenko
6a5598c2bc
pidfile creation mode set to 0666 (umask affects it as usual)
2007-03-27 22:05:34 +00:00
Denis Vlasenko
ebf48bb80c
forgotten svn add...
2007-03-27 22:02:06 +00:00
Denis Vlasenko
10457b90db
make pidfile writing configurable.
...
[ui]toa_to_buf: change API. No users yet.
2007-03-27 22:01:31 +00:00
Denis Vlasenko
f4d40c87d3
remove_file: cosmetic code improvement, a few bytes saved
2007-03-26 23:14:38 +00:00
Denis Vlasenko
afa7023b46
zcip: make it work on NOMMU (+ improve NOMMU support machinery)
...
fsck: fix bad English in a comment
2007-03-26 17:25:33 +00:00
Denis Vlasenko
53091ecd20
Attempt to get more applets compile for NOMMU.
...
TODO_config_nommu documents what I managed to compile so far
(yay! msh works! cool). inetd, telnetd, httpd still do not compile. TODO
Also make fork(), daemon() produce warnings on compile stage
(in addition to erros on link stage).
2007-03-26 13:35:09 +00:00
Denis Vlasenko
bb7fcb4229
libbb: rework NOMMU helper API so that it makes more sense
...
and easier to use. Doesn't compile - need two more commits.
2007-03-26 13:20:04 +00:00
Denis Vlasenko
cad04ef4f3
add NOMMU fixme's; move move_fd from runit_lib to libbb; nuke fd_copy
2007-03-25 23:21:05 +00:00
Denis Vlasenko
219d14d514
random style fixes (extra spaces deleted)
2007-03-24 15:40:16 +00:00
Denis Vlasenko
9067f13be0
NOMMU re-exec trick shuld not depend on existence of "don't daemonize"
...
option for every affected applet (and dnsd, for example, don't have one).
Thus rework re-exec support to not require it. Code got smaller too.
2007-03-24 12:11:17 +00:00
Denis Vlasenko
1b6fa4c57c
applets.c, xfunc.c: style cleanup
2007-03-24 12:08:36 +00:00
Denis Vlasenko
c86e052b81
fix accumulated whitespace and indentation damage
2007-03-20 11:30:28 +00:00
Denis Vlasenko
6b343ddbc8
fix inadvertently leaked PWD_BUFFER_SIZE
2007-03-18 00:57:15 +00:00
Denis Vlasenko
bff32ce4d5
gzip: Improve ptr_to_globals trick, allowing gcc
...
to optimize better. -480 bytes.
2007-03-15 19:48:35 +00:00
Denis Vlasenko
54d14ca1a2
copy_file: comment out one condition which is always false.
...
Add comment explaining POSIX rules for cp - and why
these rules are dangerous. Provide conditionally compiled code
for both POSIX and safe behaviors, select safe for now.
Code shrunk by ~80 bytes.
2007-03-15 13:33:37 +00:00
Denis Vlasenko
24af7201e9
fix TODO: getopt32 should reset optind to 1 itself
2007-03-15 13:28:46 +00:00
Denis Vlasenko
972288e62f
modify ptr_to_globals trick so that we do not violate
...
type safety (well, sort of ;))
2007-03-15 00:57:01 +00:00
Denis Vlasenko
5659407595
swapon: reinstate hole check but reduce it to warning
...
inode_hash: remove unused variable
2007-03-14 22:55:39 +00:00
Denis Vlasenko
6ef06eeed4
stop using big static buffer for inode hash
2007-03-14 22:06:01 +00:00
Denis Vlasenko
75ab6af71e
stop using (yet another) static buffer
2007-03-14 21:56:51 +00:00
Denis Vlasenko
07766bb0e7
gzip: reduce global data footprint, part 3
2007-03-14 00:06:51 +00:00
Denis Vlasenko
da799e8227
gzip: reduce global data footprint, part 2
2007-03-14 00:06:29 +00:00
Denis Vlasenko
5df955fce2
Do not fail password check if shadow password does not exist -
...
fall back to ordinary one
Reduced usage of functions returning datain static buffers.
(mostly passwd/group/shadow related):
function old new delta
correct_password 143 193 +50
sulogin_main 490 533 +43
adduser_main 732 774 +42
passwd_main 1875 1915 +40
addgroup_main 330 365 +35
bb_internal_getspnam 38 - -38
bb_internal_fgetpwent 38 - -38
bb_internal_fgetgrent 38 - -38
static.resultbuf 168 88 -80
static.buffer 1872 1104 -768
------------------------------------------------------------------------------
(add/remove: 0/3 grow/shrink: 5/2 up/down: 210/-962) Total: -752 bytes
2007-03-13 13:01:14 +00:00
Denis Vlasenko
39c651e909
introduce and use setfscreatecon_or_die
...
(patch by Yuichi Nakamura <ynakam@hitachisoft.jp>)
runcon: *yet another* fix for vda's brainfart :(
2007-03-12 18:22:55 +00:00
Denis Vlasenko
1203c9bf2f
next portion of selinux updates: chcon, runcon. From
...
Yuichi Nakamura <himainu-ynakam@miomio.jp>
KaiGai Kohei <busybox@kaigai.gr.jp>
2007-03-11 22:16:02 +00:00
Denis Vlasenko
49622d7846
selinux support by Yuichi Nakamura <ynakam@hitachisoft.jp> (HitachiSoft)
2007-03-10 16:58:49 +00:00
Denis Vlasenko
8e858e2700
clean up accumulated whitespace damage
2007-03-07 09:35:43 +00:00
Denis Vlasenko
c115fdbc80
ifupdown: code to deconstruct the state_list gracefully
...
(patch by Gabriel L. Somlo <somlo@cmu.edu>)
2007-03-06 22:53:10 +00:00
Denis Vlasenko
19c238bc90
ping: don't measure times if ping payload is less than 8 bytes;
...
commonalize some ping code.
2007-03-03 00:36:35 +00:00
Denis Vlasenko
54cf511ce1
sort: fix multiple -k (was ignoring all except last)
2007-02-17 18:11:45 +00:00
Denis Vlasenko
ec27feb045
init: code readability enhancements; very small code changes
2007-02-17 15:52:02 +00:00
Denis Vlasenko
b5368bf437
httpd: a little bit more correct handling of CGI "HTTP/xxx" output
2007-02-13 23:42:54 +00:00
Denis Vlasenko
6ca0444420
syslogd: fix "readpath bug" by using readlink instead
...
libbb: rename xgetcwd and xreadlink
2007-02-11 16:19:28 +00:00
Denis Vlasenko
9ca26d38c5
ping: support -I addr in family neutral manner; reuse a bit of common code
2007-02-09 17:32:16 +00:00
Mike Frysinger
0aa6ba5d44
make sure ps/top output what they claim: vsz, not rss ... down the line we should make the output controllable either at runtime or buildtime as both statistics are quite useful
2007-02-08 08:21:58 +00:00
Denis Vlasenko
0850cdabde
tftp: fix IPv6 fallout
2007-02-07 23:20:32 +00:00
Denis Vlasenko
710694f0e5
fix #ifdef ENABLE_xxx -> #if
2007-02-07 20:27:03 +00:00
Denis Vlasenko
d46d3c292e
new applets: selinux utils by KaiGai Kohei <kaigai@kaigai.gr.jp>
2007-02-06 19:28:50 +00:00
Denis Vlasenko
1d76f439da
EXEC_PREFER_APPLETS support by Gabriel L. Somlo <somlo@cmu.edu>
2007-02-06 01:20:12 +00:00
Bernhard Reutner-Fischer
d909d23451
- indent
2007-02-04 20:32:38 +00:00
Denis Vlasenko
e991303406
udhcp: use improved gethostbyname replacement from IPv6 code
2007-02-04 02:41:57 +00:00
Denis Vlasenko
5870ad9672
mount: (try to) support cifs with IPv6
2007-02-04 02:39:55 +00:00
Denis Vlasenko
42823d597a
add x to IPv6 functions which can die
2007-02-04 02:39:08 +00:00
Denis Vlasenko
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
e968fcd562
lineedit: add missing #if/#endif
...
init: fix warnings
2007-02-03 02:42:47 +00:00
Denis Vlasenko
4921b54f37
Add BB_EXEC[LV]P() which encapsulate FEATURE_EXEC_PREFER_APPLETS
...
(patch from Gabriel L. Somlo <somlo@cmu.edu>)
2007-02-03 02:17:41 +00:00
Denis Vlasenko
ab2aea4447
preparatory patch for -Wwrite-strings #4
2007-01-29 22:51:58 +00:00
Denis Vlasenko
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
a41fdf331a
preparatory patch for -Wwrite-strings #1
2007-01-29 22:51:00 +00:00
Denis Vlasenko
e06bed30cf
use bb_sanitize_stdio() where appropriate
2007-01-27 22:21:12 +00:00
Denis Vlasenko
434ad5456b
fix warning in find.c
2007-01-27 13:45:17 +00:00
Denis Vlasenko
98c0bba09d
fix bin2hex bug. lowercase = uppercase | 0x20, not | 0x10!
2007-01-26 23:31:05 +00:00
Denis Vlasenko
86724af484
bb_parse_mode: do not do umask() needlessly.
2007-01-26 22:54:01 +00:00
Denis Vlasenko
b9a279ba94
Unify ping and ping6. ping has -4 and -6 which force
...
name resolution into IP or IPv6 only, otherwise
we take address family returned by host2sockaddr()
in lsa->sa.sa_family. IOW: "ping ::1" with do IPv6 ping,
"ping 127.0.0.1" will do IPv4 ping.
ping6 is aliased to "ping -6".
2007-01-24 23:53:22 +00:00
Denis Vlasenko
218f2f4882
accumulated post-1.4.0 fixes
2007-01-24 22:02:01 +00:00
Denis Vlasenko
769d1e05e6
fix warning from needlessly-global functions
2007-01-22 23:04:27 +00:00
Denis Vlasenko
d77f7c3136
remove empty source files
2007-01-22 22:47:07 +00:00
Denis Vlasenko
9adc6ced4f
ping6: stop using xgethostbyname2, remove it from libbb.
2007-01-22 22:45:27 +00:00
Denis Vlasenko
448f0241e0
nslookup: full circle. Here we started IPv6 work. Use "new API"
...
and thus save a few bytes.
2007-01-22 22:43:05 +00:00
Bernhard Reutner-Fischer
835f575b61
- the archivers expect mode to be a mode_t, so do not trip signed/unsigned conversion purposefully
2007-01-22 17:48:08 +00:00
Bernhard Reutner-Fischer
bb8c7c041c
- sed -i -e "/\$Id:/d;"
2007-01-22 17:04:53 +00:00
Denis Vlasenko
703e20235a
cleanups: unnecessary casts, unified const_1, eliminate cross-.c file
...
prototypes (heresy!), add spaces in places like "flags&NETSTAT_CONNECTED",
removed unused #defines, #ifdef -> #if, use uint32_t for ipv4 addrs.
2007-01-22 14:12:08 +00:00
Denis Vlasenko
35d4da0fb5
exterminate u_intXXX.
...
fix ping6 buglet (memset is too short), minor sync between ping and ping6
2007-01-22 14:04:27 +00:00
Denis Vlasenko
85629f08bc
comment out unused old networking API parts
...
sockaddr2dotted: return IPV6 addrs in [addr]:port form (was addr:port)
2007-01-22 09:36:41 +00:00
Denis Vlasenko
95fef7071e
move shell/cmdedit.c -> libbb/lineedit.c
2007-01-22 09:03:42 +00:00
Denis Vlasenko
38f6319421
cmdedit is not a 'command' editing anymore, it's just editing (generic),
...
so rename stuff accordingly.
2007-01-22 09:03:07 +00:00
Denis Vlasenko
2f0c0d0b88
Introduce FEATURE_EXEC_PREFER_APPLETS = "re-execute our own
...
executable if we asked to exec someting with argv[0] == known_applet"
Use it in init. Also respect PATH in init, remove explicit "/sbin" etc
from exec. Patch by Gabriel L. Somlo <somlo@cmu.edu>
2007-01-21 00:41:04 +00:00
Bernhard Reutner-Fischer
af45760cca
- get_terminal_width_height does not and should never write to fd. Cosmetic Precaution
2007-01-20 21:33:50 +00:00
Denis Vlasenko
4ebaf10742
strdup -> xstrdup
...
sed: de-obfuscate piece of code
2007-01-19 21:33:19 +00:00
Denis Vlasenko
2405ad659e
ls: use get_cached_username/groupname
2007-01-19 21:24:17 +00:00
Denis Vlasenko
9af7c9d6b6
openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup code
...
(will close all fd's > 2 on daemonization now)
getty: fix "getty -" support, and also do not try to chown/chmod "-"
telnetd: fix "lost ctty" bug
Yet another attempt on saner function names:
bb_sanitize_server_stdio(0/1) -> bb_sanitize_stdio() + bb_daemonize();
2007-01-19 21:19:35 +00:00
Denis Vlasenko
ef44d9d9f2
sed,get_line_from_file: improve comments
2007-01-17 23:16:16 +00:00
Denis Vlasenko
d97c9244b1
Rename bb_sanitize_stdio -> bb_sanitize_server_stdio
...
(name is still bad - it doesn't hint that function
may do daemonization trick for you if asked to).
Small fixes to fakeidentd.
2007-01-14 13:12:06 +00:00
Denis Vlasenko
7a431b3715
By popular request reinstate fakeidentd's standalone mode.
...
Since this is also needed for other applets like telnetd,
introduce generic driver for such things.
It even supports inetd-wait ('linger') mode, when inetd
hands out listen socket to child and waits to it to die,
instead of handing out accepted socket and continuing
listening itself (nowait mode).
Code growth ~200 bytes.
NB: our inetd doesn't support wait mode yet (or mabe it is buggy).
2007-01-14 01:29:06 +00:00
Denis Vlasenko
2418288cac
small fixes to ipv6 infrastructure
2007-01-13 21:05:38 +00:00
Denis Vlasenko
3a34d0c08a
random small size optimizations
2007-01-12 22:10:34 +00:00
Denis Vlasenko
5d68724d5b
next part of ipv6-ization. mostly netcat.
2007-01-12 20:59:31 +00:00
Denis Vlasenko
6536a9b583
next part of ipv6-ization is here: wget & httpd
2007-01-12 10:35:23 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +00:00
Denis Vlasenko
8e9ccba371
ipv6-ization efforts continue. Few bugs are found,
...
unknown number likely introduced...
2007-01-11 16:50:23 +00:00
Denis Vlasenko
bbe514683a
a bit more IPv6-ization work
...
syslogd: converted to use it (in -R host:port)
2007-01-10 20:19:56 +00:00
Denis Vlasenko
9de420c27c
Improve generic ipv4+ipv6 support in libbb.
...
Convert telnet to it. Now this works:
telnetd -b [::1]:1234 - bind to IPv6 non-standard port
telnet [::1]:1234 - connect to IPv6 non-standard port
telnet ::1 1234 - same
This does not require ANY ipv6-specific code in applets
(no struct sockaddr_in6. In fact, no sockaddr_in, too).
2007-01-10 09:28:01 +00:00
Denis Vlasenko
a9b60e93ee
new libbb func: xmalloc_realpath (+ use it where makes sense)
...
syslogd, logread: add debugging code (disabled)
syslogs: drastically smaller bss; fix "-C n" behaviour
2007-01-04 17:59:59 +00:00
Denis Vlasenko
9b1381fd2f
convert calloc to xzalloc
...
fix sleep-on-die option
2007-01-03 02:56:00 +00:00
Denis Vlasenko
4a64c33443
about.html: update maintainer name
...
libbb/Kbuild: less needs xregcomp.o
2006-12-30 22:03:02 +00:00
Denis Vlasenko
6a5dc5d75a
next bunch of fixes for bugs found by randconfig
2006-12-30 18:42:29 +00:00
Denis Vlasenko
9a44c4f91c
bb_xget[pw/gr]nam were horribly misnamed - fixed.
...
uidgid_get -> get_uidgid, add additional param
(numeric_ok). Make chown use it.
chown: fix "chown user: ...."
install: fix incorrect use of bb_xget[pw/gr]nam
2006-12-28 05:44:47 +00:00
Denis Vlasenko
666da5e2c6
merge post-1.3.0 fixes
2006-12-26 18:17:42 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
5dd7ef0f37
chattr: bugfixes and size reduction
2006-12-26 03:36:28 +00:00
Denis Vlasenko
0de9375ee6
leftover of e2fsck surgery
2006-12-26 02:51:29 +00:00
Denis Vlasenko
7cea262273
small stupid changes. no code changes
2006-12-24 07:30:09 +00:00
Denis Vlasenko
a5b3e76c38
missing piece of prev commit: ndelay_off
2006-12-24 07:15:50 +00:00
Denis Vlasenko
1dc1b37b33
use xbind, xconnect where appropriate.
...
small edits to arping
2006-12-23 02:48:44 +00:00
Denis Vlasenko
2a813e20e2
fix recognitions of -SIGname signals
...
(fix by Jacques LUDER <jacques.luder@thalesgroup.com>)
2006-12-23 01:06:21 +00:00
Denis Vlasenko
8f6c79240d
find: fix spurious -exec error messages
...
(bug reported by Bernhard Fischer <rep.nop@aon.at>)
2006-12-23 00:49:10 +00:00
Denis Vlasenko
714701c890
tar et al: die if bb_copyfd_size copies less than asked for.
...
(we have bb_copyfd_exact_size now for that kind of usage)
2006-12-22 00:21:07 +00:00
Denis Vlasenko
e865e81d34
less: stop dying on bad regexps, quietly pipe data w/o
...
user interaction if stdout is not a tty.
size optimizations
2006-12-21 13:24:58 +00:00
Denis Vlasenko
bf66fbc8e2
introduce LONE_CHAR (optimized strcmp with one-char string)
2006-12-21 13:23:14 +00:00
Denis Vlasenko
3f3190e34c
less: total cleanup and bugfix.
...
Doesn't die horribly on binary files anymore.
In fact, they _100%_ work now. Control chars
are in reverse video, including DEL and that idiocy of VT-10x,
Meta-ESC [inventor of which should be prohibited from reproducing].
Regex search is fixed also. When you specify search ('/' key),
control chars turn into dots (unhighlighted),
and found occurrences highlighted instead. This is reversible.
Memory management fixed (was leaky as hell) and optimized.
Linewrapping fixed and thoroughly tested.
Max buffer size made configurable.
~ 600 bytes saved.
2006-12-21 00:22:03 +00:00
Denis Vlasenko
9a7cef930f
less: somewhat buggy applet, but nice. Muchly reduced
...
xstrdup'ing and memory consumption. Made linewrap saner.
regex matching code was awful - still buggy, but not as
leaky as before. Made buffer size configurable. Killed
several static and on-stack buffers. Hopefully eliminated
staircase effect on Ctrl-C (unable to reproduce).
2006-12-20 02:46:48 +00:00
Denis Vlasenko
b95636c52f
remove casts from xmalloc()
2006-12-19 23:36:04 +00:00
Denis Vlasenko
15b213ef5a
su: make /etc/shells check configurable
...
ash: missing ';'
2006-12-19 00:20:20 +00:00
Denis Vlasenko
7cfecc4b36
xfuncs.c: dietlibc actually HAS fdprintf!
...
platform.h: define strchrnul for dietlibc
ash: stop using few non-standard functions
2006-12-18 22:32:45 +00:00
Denis Vlasenko
c8e6e35ba4
nc: add missing cast
...
xfuncs: add dprintf for dietlibc
2006-12-18 22:10:24 +00:00
Denis Vlasenko
83e5d6f772
A bunch of defined(__GLIBC__) added. static-linking warning expanded
2006-12-18 21:49:06 +00:00
Denis Vlasenko
b131b271a0
start_stop_daemon: fix bug where any program name was "matching"
...
processes for which readlink(/proc/N/exe) fails
2006-12-17 17:30:01 +00:00
Denis Vlasenko
9f739445cd
inline strcmp(s, "-") [actually macro-ize it for now - gcc is too stupid]
2006-12-16 23:49:13 +00:00
Denis Vlasenko
a597aaddfa
s/extern inline/static ATTRIBUTE_ALWAYS_INLINE/g
...
xstrtou: disallow leading '+'
2006-12-16 23:48:13 +00:00
Denis Vlasenko
6a1d661036
diff: fix -q exit code
...
last_char_is: sacrifice 9 bytes but avoid double-scan
2006-12-16 22:18:44 +00:00
Denis Vlasenko
5e2db5e8ee
build system: small fix for "release" target to work
2006-12-12 23:46:31 +00:00
Denis Vlasenko
2ea630f9a5
bb_makedev: fix for glibc 2.3.2
...
sed: fix C++ style declaration
2006-12-10 02:52:19 +00:00
Bernhard Reutner-Fischer
bbda98f14c
- cosmetic change to avoid warnings about eventual padding/packing.
2006-12-04 15:58:27 +00:00
Denis Vlasenko
8b22b07bc5
sed: improve handling of NULs
2006-12-02 17:58:10 +00:00
Denis Vlasenko
becd8c538c
passwd: made smaller by ~130 bytes. size can go negative
...
if current trend will continue ;)
2006-12-01 21:34:20 +00:00
Denis Vlasenko
002526481e
passwd: small size optimization. salt generation improved
...
(really generated different salts even if called back-to-back).
2006-11-30 20:41:28 +00:00
Denis Vlasenko
ab24e18c7a
passwd: rework:
...
* do not make backup copy by copying (just retain old file)
* correctly fall back to /etc/passwd if user is not in shadow
* fix bug with overlong passwd entries
* be permissive on some kinds of failures
* reduce stack usage
* code size: -500 bytes
2006-11-30 16:41:15 +00:00
Denis Vlasenko
c6ce8733dd
cut 0.5k off mkfs.minix
...
assorted strtoul fixes (that's what brought me into minix)...
2006-11-29 18:15:52 +00:00
Denis Vlasenko
df38188367
fix bug in new str -> num convertors
2006-11-28 10:54:16 +00:00
Denis Vlasenko
f1a6c6b362
erase_mtab: do not limit ourself to 40 mtab entries
2006-11-27 17:29:09 +00:00
Denis Vlasenko
d9e15f2068
style cleanup: return(a) -> return a, part 2
2006-11-27 16:49:55 +00:00
Denis Vlasenko
079f8afa0a
style cleanup: return(a) -> return a, part 1
2006-11-27 16:49:31 +00:00
Denis Vlasenko
3ece72dc3f
svn add bb_strtonum.c :(
2006-11-27 15:12:16 +00:00
Denis Vlasenko
d686a045c8
safe_strtoXX interface proved to be a bit unconvenient.
...
Remove it, introduce saner bb_strtoXX.
Saved ~350 bytes.
2006-11-27 14:43:21 +00:00
Denis Vlasenko
e5667c1cfe
Closing bug 730. libbb run_parts is using scandir (a GNUism),
...
and it is used only by run_parts applet, so move it there.
Also saved ~30 bytes (prolly gcc autoinlining...).
2006-11-26 20:13:39 +00:00
Denis Vlasenko
cf749bc10c
small fixes:
...
fix xstrdup to not grossly overallocate memory
use xopen instean of xopen3 in several places
etc.
2006-11-26 15:45:17 +00:00
Denis Vlasenko
2d27e4ccbb
tee: fix bug: argv[-1] is a no-no!
...
bb_full_fd_action: optimize
die_if_ferror: "<applet>: filename" isn't a good err msg, add "..I/O error"
2006-11-25 23:50:28 +00:00
Denis Vlasenko
43bddf31e9
small improvements in str -> num convertors
2006-11-25 14:49:04 +00:00
Denis Vlasenko
ed836cdc30
regularize str -> num convertors
2006-11-25 14:44:13 +00:00
Denis Vlasenko
809a6e3104
small optimization
2006-11-24 22:42:44 +00:00
Denis Vlasenko
3feb2fc535
tar: fix multiple -t and/or -v options handling.
...
do not process list of files to tar up in reverse order.
2006-11-24 21:55:55 +00:00
Denis Vlasenko
d031ffa623
tar: sanitize option handling
2006-11-24 21:54:44 +00:00
Denis Vlasenko
d6772501db
tar: fix and sanitize handling of long filenames/linknames
...
(GNU extensions 'K' and 'L').
We correctly handle them when untarring now, but unfortunately
we still don't use them when tarring! That stupid 100 char limit
is still there!
The biggest problem is that we don't support 'pax' tar format.
Linux kernel tarballs are in this format... shame
2006-11-24 17:21:44 +00:00
Denis Vlasenko
d398ecab9d
hunt down improper include <>, make mkswap output 4Gb+ friendly
2006-11-24 15:38:03 +00:00
Denis Vlasenko
8023d7df78
svn add makedev.c. Forgot as usual... :(
2006-11-24 15:06:28 +00:00
Denis Vlasenko
b8a8e601df
tar: small fixes:
...
* size-optimize mapping code
* kill double close
2006-11-24 14:59:45 +00:00
Denis Vlasenko
c50f370f98
tar: cache [ug]id->username/groupname mappings. Cuts down amount
...
of open/read/close of /etc/passwd and /etc/group
dramatically (we were rereading those for each untarred file!!!)
2006-11-24 14:57:31 +00:00
Denis Vlasenko
4fbb584a0e
tar: cry murder and bail out if file shrinks under us while we tar it up
2006-11-24 14:55:23 +00:00
Denis Vlasenko
0b35470d9b
glibc makedev() is a large inline. Save 700+ bytes by wrapping it
...
into a function.
2006-11-24 14:54:27 +00:00
Denis Vlasenko
376ce1e775
tar:
...
* unpack: handle tar header fields which are not NUL terminated
* pack: handle 4+GB files correctly
* pack: refuse to store 101+ softlinks (was truncating link
target name)
* pack: mask mode with 07777
2006-11-24 14:51:01 +00:00
Denis Vlasenko
48237b0c88
introduce setsockopt_reuseaddr(int fd), setsockopt_broadcast(int fd),
...
use them where appropriate. 200 bytes saved
2006-11-22 23:22:06 +00:00
Denis Vlasenko
81e264d4af
fix double merge
2006-11-22 17:42:06 +00:00
Denis Vlasenko
c8717cd857
telnetd: move generic stuff into libbb. It will make it easy
...
to make other server applets IPv6-aware too.
2006-11-22 16:10:39 +00:00
Denis Vlasenko
75f8d080a2
telnetd: we were having telnetd with is ONLY inetd or ONLY standalone.
...
What if I need to have both?? This patch introduces
CONFIG_FEATURE_TELNETD_STANDALONE: y - both, n - only inetd.
2006-11-22 15:54:52 +00:00
Denis Vlasenko
5e618ff439
xgethostbyname: more readable
2006-11-21 20:35:22 +00:00
Denis Vlasenko
7ca3921e5e
bb_INET_default[] is really just a const "default",
...
nothing INET-specific
2006-11-21 20:34:21 +00:00
Denis Vlasenko
89f0b3486d
rodata cleanup. "unable to" == "cannot". -300 bytes
2006-11-18 22:04:09 +00:00
Denis Vlasenko
83ea643d8d
svlogd: new applet. +9k. Still too big, but it was 12k yesterday.
2006-11-16 02:27:24 +00:00
Denis Vlasenko
067e3f031a
wget: fix error message.
...
Bad:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
: HTTP/1.0 404 Not Foundror 404 Not Found
Good:
wget http://127.0.0.1:81/fgdg/Makefile
Connecting to 127.0.0.1[127.0.0.1]:81
get: server returned error: HTTP/1.0 404 Not Found
nslookup: fix my mistake
applets: make Bernhard Fischer <rep.nop@aon.at> happy :)
2006-11-10 23:25:53 +00:00
Denis Vlasenko
5af906e7c8
rename: compare_string_array -> index_in_str_array
...
introduce index_in_substr_array and use it in
iproute2
2006-11-05 18:05:09 +00:00
Denis Vlasenko
aae0311356
smart_ulltoa5: make available in libbb
2006-11-05 00:44:39 +00:00
Denis Vlasenko
459e4d6cf7
replace /proc scanning code by more versatile one.
...
Use it where appropriate.
Stop scanning /etc/passwd *for every process*!!! (uid->username)
top: reduce memory usage - we won't save unneeded fields
from /proc info anymore. Downside: ~+250 bytes of code
2006-11-05 00:43:51 +00:00
Denis Vlasenko
fa07680091
top: improve CPU% calculation
...
style fixes
2006-11-05 00:38:51 +00:00
Denis Vlasenko
dd539f7687
Unneeded code removed, usused field "unsigned pscpu" removed
2006-11-01 20:20:37 +00:00
Denis Vlasenko
35fb512728
PID should be stored in pid_t, not int or long.
...
find_pid_by_name() was returning 0 or -1 in last array element,
but -1 was never checked. We can use just 0 intead.
2006-11-01 09:16:49 +00:00
Denis Vlasenko
966ec7c067
#if CONFIG_xxx -> #if ENABLE_xxx
2006-11-01 09:13:26 +00:00
Denis Vlasenko
b141b9b512
reads: fix bug 1078
2006-10-31 22:46:08 +00:00
Denis Vlasenko
6ae8079e2d
login: re-enable Ctrl-^C before execing shell.
2006-10-31 17:34:44 +00:00
Denis Vlasenko
3b8ff68ec8
dd: fix bugs: always assumed conv=sync, died on write errors
...
w/o perror and statictics. Several small improvements
2006-10-31 15:55:56 +00:00
Denis Vlasenko
5d499e1600
find: a lot more compliant to 'standard' find
...
(we were not respecting order of actions!).
Add -o and -a handling.
2006-10-29 19:07:01 +00:00
Denis Vlasenko
5c7596058d
ls: cleanup part 1
2006-10-28 12:37:16 +00:00
Denis Vlasenko
8c35d65c43
recursive_action: add depth param
...
chmod: match coreutils versus following links
2006-10-27 23:42:25 +00:00
Denis Vlasenko
3b8fc1c582
recursive_action: preparatory changes. will introduce "int level".
2006-10-27 17:59:14 +00:00
Denis Vlasenko
cf70433173
modprobe: reformat to match bbox style
2006-10-27 15:12:50 +00:00
Denis Vlasenko
dca0b707c0
reshuffle libbb.h contents so that order of decls makes sense
...
Found bad typo in largefile support :)
2006-10-27 09:05:02 +00:00
Denis Vlasenko
621204bbf6
get_terminal_width_height: do not pass insanely large values
2006-10-27 09:03:24 +00:00
Denis Vlasenko
d3d004dd35
last nail into error_msg() (de)capitalization
2006-10-27 09:02:31 +00:00
Denis Vlasenko
1340ca8c87
As usual, I forgot "svn del"...
2006-10-27 07:17:36 +00:00
Denis Vlasenko
2fe7b73d99
...and yet another small fix. Ouch...
2006-10-26 23:39:04 +00:00
Denis Vlasenko
ddec5af6b0
rename functions to more understandable names
2006-10-26 23:25:17 +00:00
Denis Vlasenko
f0ed376eda
remove bb_printf and the like
2006-10-26 23:21:47 +00:00
Denis Vlasenko
1457915afc
xconnect is non-conforming to "xfunc like libc" rule. Fixing
2006-10-26 01:09:46 +00:00
Denis Vlasenko
c8400a2162
wget: wget $'-\207' ... should not be allowed to work. ever. :)
...
So fix wget & getopt32. Also fix multiple --header options
order: add and use rev_llist.
2006-10-25 00:33:44 +00:00
Denis Vlasenko
f24e1f40e0
cp: add support for -s, -l. Fix free(nonmalloc) bug.
...
Add doc on POSIX's rules on -i and -f (insane!).
ln: make "ln dangling_symlink new_link" work.
2006-10-21 23:40:20 +00:00
Denis Vlasenko
456fa6c0b1
readlink: do not emit errors if file doesnt not exist / not a link
...
getopt32: add =N support
2006-10-20 18:36:55 +00:00
Denis Vlasenko
e1a0d486e4
message string changes, mostly for consistency, also -32 bytes in .rodata
2006-10-20 13:28:22 +00:00
Denis Vlasenko
d0e70af9d1
nc: fix 2 my own buglets, and few someone else's too.
2006-10-16 01:10:28 +00:00
Denis Vlasenko
3a6755f56f
grep: add support for -r
2006-10-14 14:24:30 +00:00
Denis Vlasenko
ea62077b85
add open_read_close() and similar stuff
2006-10-14 02:23:43 +00:00
Denis Vlasenko
88ca067690
xread/write can use full_read/write (smaller code)
2006-10-12 22:44:13 +00:00
Denis Vlasenko
2d5ca60bfb
bb_get_[chomped]line_from_file wasn't descriptive enough.
...
Renaming...
2006-10-12 22:43:20 +00:00
Denis Vlasenko
372686bde7
cut, mount: small improvements
2006-10-12 22:42:33 +00:00
Denis Vlasenko
a6dbb08a48
small style fixes
2006-10-12 19:29:44 +00:00
Denis Vlasenko
12f5676cce
execable: no need to check getenv for NULL, it works anyway.
2006-10-12 06:15:13 +00:00
Denis Vlasenko
5cb46485dd
execable.c: forgot to do "svn add" again...
2006-10-12 06:12:11 +00:00
Denis Vlasenko
f6f43df60b
ifupdown: stop emitting annoying/misleading error messages.
...
Patch by Gabriel Somlo <somlo at cmu.edu>
2006-10-11 22:16:56 +00:00
Denis Vlasenko
1db39b2f51
nmeter: new applet. ~4k
...
Fix build proble on x86_64
2006-10-11 20:59:02 +00:00
Denis Vlasenko
1114de7219
od: provide full-blown od from coreutils if CONFIG_DESKTOP
2006-10-10 23:26:05 +00:00
Denis Vlasenko
cba9ef5523
fixes from Vladimir Dronnikov <dronnikov@gmail.ru>
2006-10-10 21:00:47 +00:00
Denis Vlasenko
ca3c981c07
start_stop_daemon: add -N <nice> compat
...
[re]nice: add support for -nNNN w/o spaces, -NNN (nice only),
simplified code
2006-10-08 23:36:17 +00:00
Denis Vlasenko
7039a66b58
correct largefile support, add comments about it.
2006-10-08 17:54:47 +00:00
Denis Vlasenko
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49:22 +00:00
Denis Vlasenko
c12f53090b
dnsd fix; option_mask32 added. dnsd needs more love.
2006-10-06 09:49:47 +00:00
Denis Vlasenko
de59c0f58f
httpd: add -u user[:grp] support
2006-10-05 22:50:22 +00:00
Denis Vlasenko
7d219aab70
build system overhaul
2006-10-05 10:17:08 +00:00
Denis Vlasenko
8f8f268cfd
bb_applet_name -> applet_name
2006-10-03 21:00:43 +00:00
Denis Vlasenko
67b23e6043
getopt_ulflags -> getopt32.
...
It is impossible to formulate sane ABI based on
size of ulong because it can be 32-bit or 64-bit.
Basically it means that you cannot portably use
more that 32 option chars in one call anyway...
Make it explicit.
2006-10-03 21:00:06 +00:00
Denis Vlasenko
40920825d5
rename bb_default_error_retval -> xfunc_error_retval
2006-10-03 20:28:06 +00:00
Denis Vlasenko
b6332248ca
fdformat: remove redundant check
2006-10-03 19:57:50 +00:00
Denis Vlasenko
cf94446af7
random style fixes
2006-10-03 19:02:20 +00:00
Denis Vlasenko
fe54458e46
runit/chpst: "change process state" utility
...
It's "nice" on steroids - can set uid/gid, mem/cpu limits etc. +3.5k
2006-10-03 15:57:40 +00:00
Denis Vlasenko
b97c9842a5
sed: unbreak multiple -e, -f option handling (my fault)
2006-10-01 21:05:12 +00:00
Denis Vlasenko
55a994055f
lsmod: repair indentation
...
httpd: ifdef CONFIG -> if ENABLE (shorted, catched typos)
2006-09-30 20:41:44 +00:00
Denis Vlasenko
a959588b80
Yet another silly little byte saving. couldn't -> cannot
2006-09-29 21:30:43 +00:00
Denis Vlasenko
266bc17690
top: add support for -b, -n <iterations>
2006-09-29 17:16:39 +00:00
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
Mike Frysinger
83169c607b
Tito writes: If the gecos field of an user is empty, obscure reports a false "similar to gecos" error.
2006-07-15 03:59:00 +00:00
Rob Landley
1f9145c5c3
More minor tweaks.
2006-07-12 21:31:16 +00:00
Mike Frysinger
58dda84ecc
decuddle () from for/if/while
2006-07-12 20:04:00 +00:00
Rob Landley
c9c1a41c58
A couple things that got tangled up in my tree, easier to check in both than
...
untangle them:
Rewrite u_signal_names() into get_signum() and get_signame(), plus trim the
signal list to that required by posix (they can specify the numbers for
the rest if they really need them). (This is preparatory cleanup for adding
a timeout applet like Roberto Foglietta wants.)
Export the itoa (added due to Denis Vlasenko, although it's not quite his
preferred implementation) from xfuncs.c so it's actually used, and remove
several other redundant implementations of itoa and utoa() in the tree.
2006-07-12 19:17:55 +00:00
Rob Landley
ab7d9be17c
Patch from Tito to remove pwd_to_spwd (which we don't actually need), with
...
some #ifdef removal from me.
2006-07-11 16:19:17 +00:00
Rob Landley
22d3958d76
Denis Vlasenko spotted the lack of bounds checking in my first attempt at
...
itoa/utoa.
2006-07-11 00:44:36 +00:00
"Robert P. J. Day"
5d8843e451
Replace current verbose GPL stuff in libbb/*.c with one-line GPL boilerplate.
2006-07-10 11:41:19 +00:00
Rob Landley
5b88a38157
Add itoa and utoa to see what Denis Vlasenko thinks.
2006-07-10 07:41:34 +00:00
Rob Landley
9ebd1bd468
Attempt to address Shaun Jackman's problem adding "busybox: busybox.bflt" to
...
.config.mak.
2006-07-06 20:02:47 +00:00
"Robert P. J. Day"
c9f423a93d
Correct the comment to match the code.
2006-07-02 19:52:52 +00:00
"Robert P. J. Day"
63fc1a9e08
Standardize on the vi editing directives being on the first line.
2006-07-02 19:47:05 +00:00
"Robert P. J. Day"
087b9d640e
Allow a user-configurable minimum password length.
2006-07-02 18:35:39 +00:00
"Robert P. J. Day"
edd9ca5743
More removal of "#if 0" content.
2006-07-01 14:52:12 +00:00
"Robert P. J. Day"
68229837ff
Remove all usage of the "register" storage class specifier.
2006-07-01 13:08:46 +00:00
Rob Landley
8bbdb8732f
This kind of paranoia is a debug option at best.
2006-06-30 16:36:56 +00:00
Rob Landley
a6e6037219
Fix bug http://bugs.busybox.net/view.php?id=874 where hexdump -C got its
...
spacing wrong.
2006-06-28 14:36:50 +00:00
Rob Landley
22f383e695
Fix http://bugs.busybox.net/view.php?id=906 which could cause failures in top.
2006-06-27 18:14:12 +00:00
Rob Landley
a892bf8284
Whitespace. (Vim's auto-indent is kind of annoying at times, like "daytime"
...
and "nighttime"...)
2006-06-25 15:37:28 +00:00
Rob Landley
934da82913
Fix a possible race condition if two processes try to claim the same loop
...
device at the same time. We should only CLR_FD if the set status fails,
not if the SET_FD fails.
2006-06-25 15:29:12 +00:00
Rob Landley
c983274565
The logic to make cp -d or -P treat things like regular files should only
...
trigger for symlinks, not for device nodes. This should fix "cp -a /dev ."
to work as expected (when run by root, anyway).
While I was there, cleanup headers and make an #ifdef go away...
2006-06-24 21:27:36 +00:00
Rob Landley
8437ede6c2
The type changed too.
2006-06-20 16:43:05 +00:00
Peter Kjellerstedt
5ab8f7de4f
Use the new names for tty_baud_to_value() and tty_value_to_baud() again.
2006-06-20 16:35:37 +00:00
Rob Landley
57c1f73dd5
Revert the last two patches to go back to a state before this file was
...
controversial.
2006-06-20 16:17:24 +00:00
Rob Landley
290fcb4213
Undo all of the ugliness and some of the bloat from 15412.
2006-06-18 23:59:03 +00:00
Rob Landley
ea224be6aa
skip_whitespace() shouldn't claim its return value is const, it doesn't know
...
that and callers wind up typecasting it back.
2006-06-18 20:20:07 +00:00
Mike Frysinger
b000586d02
danf writes: stty doesn't support baud rates > 460800 bps, the attached patch adds support for all baud rates supported by Linux 2.6.16 on x86.
2006-06-17 22:41:28 +00:00
Rob Landley
d9a761d9c3
Revert svn 15333. If you vfork, you must either exec or exit. (The parent is
...
blocked until you do so.)
2006-06-16 16:35:53 +00:00
Rob Landley
c7ddefc062
Attempt at fixing bug 815 by upgrading bb_spawn() so that builtins are at
...
the start of the path. (This should be under the same config option as
the standalone shell, but right now that's buried in the shell menu.)
Also add the ability to specify CONFIG_BUSYBOX_EXEC_PATH with /proc/self/exe
as an overrideable default.
2006-06-14 01:24:33 +00:00
Rob Landley
18958e9309
Random cleanup of platform.h.
2006-06-13 18:28:33 +00:00
Bernhard Reutner-Fischer
2d1a6e7c1f
- fix bug #887 , in bb_get_chomped_line_from_file(), the last char was removed
...
unconditionally, even if it was not a newline.
This was apparently broken by r14254
- whitespace while at it.
2006-06-10 11:04:43 +00:00
Paul Fox
6ab037872f
made "test" an ash built-in.
...
moved the contents of libbb/bb_echo.c back into coreutils/echo.c,
which is a more reasonable place for them than libbb. this
forces anyone who wants echo and test to be builtin to ash to
also have them available as applets. their cost is very small,
and the number of people who wouldn't want them as applets is
also very small.
added warning about shell builtins vs. CONFIG_FEATURE_SH_STANDALONE_SHELL,
which conflicts with their use.
thanks to nathanael copa for debugging help.
some string size optimization in test.c may have been lost with
this commit, but this is a good new baseline.
2006-06-08 21:37:26 +00:00
Mike Frysinger
6fb5847faf
sometimes daemonizing and vfork()/exit() is ok
2006-06-07 21:48:30 +00:00
Mike Frysinger
ca70774293
bb_xdaemon() isnt available on no-mmu systems
2006-06-07 21:47:34 +00:00
Mike Frysinger
373af43bb0
comment all fields
2006-06-07 21:37:59 +00:00
Mike Frysinger
301ad67912
add reference to proc(5)
2006-06-07 20:24:34 +00:00
Bernhard Reutner-Fischer
19008b8373
- reuse strings and messages. Saves about 600B
2006-06-07 20:17:41 +00:00
Mike Frysinger
828d6bb3bc
whitespace
2006-06-07 20:04:13 +00:00
Mike Frysinger
62a2c15376
whitespace
2006-06-07 20:03:13 +00:00
Bernhard Reutner-Fischer
f9437aaf5b
- make getopt_ulflags aware of CONFIG_GETOPT_LONG
2006-05-31 14:12:51 +00:00
Bernhard Reutner-Fischer
f3ac9ebc8e
- convert xcalloc(1,x) to xzalloc
2006-05-31 13:31:16 +00:00
Bernhard Reutner-Fischer
c418d482ba
- s/defined(__uClinux__)/BB_NOMMU/
...
This needs a second pass to:
+ add bb_daemon(unsigned char no_chdir, unsigned char no_close, const char*flag)
+ eventually globally export argc and argv, so we don't need to pass it to
bb_daemon().
2006-05-31 10:19:51 +00:00
Rob Landley
bba7f08d27
Add SWAP_LE?? and SWAP_BE?? macros, and make things use them. Converts values
...
to/from little endian or big endian, which is a NOP if that's what the current
platform already is.
2006-05-29 05:51:12 +00:00
Rob Landley
8bb50782a5
Change llist_add_* to take the address of the list rather than returning the new
...
head, and change all the callers.
2006-05-26 23:44:51 +00:00
Rob Landley
5edc10275e
Slight sanity fix: data is void *, not char *. And it's called data
...
almost everywhere, so be consistent.
2006-05-26 23:00:10 +00:00
Bernhard Reutner-Fischer
781e42d66c
- introduce and use bb_path_wtmp_file for portability (saves 11 Bytes).
...
- fix last.c to also look at the double-underscore UT_ defines.
2006-05-26 14:41:40 +00:00
Bernhard Reutner-Fischer
76b82cfd6f
- make find_mount_point conditional on df and eject; Fixes `make hosttools´ on
...
hosts where mntent.h does not exist.
2006-05-26 13:38:43 +00:00
Mike Frysinger
4f93a63467
errno and h_errno values are not the same #876 by rfelker
2006-05-26 01:56:42 +00:00
Rob Landley
399d2b5c24
Rich Felker suggested removing dprintf() from watch, and one thing led to
...
another... This adds bb_xspawn() support, which does vfork/exec. (I don't
know why using a static instead of a local adds ~40 bytes, but using
the local doesn't work...)
2006-05-25 23:02:40 +00:00
Rob Landley
80b8ff07ca
A pending item in my tree I might as well check in: I plan to migrate calloc()
...
and bb_calloc() calls to bb_xzalloc() which allocates prezeroed memory but
only takes one argument (the size).
2006-05-19 20:36:49 +00:00
Bernhard Reutner-Fischer
b1629b1b2a
- remove emacs layout block as suggested by Robert P.J. Day
...
- use shorter boilerplate while at it
2006-05-19 19:29:19 +00:00
Bernhard Reutner-Fischer
0a8812bdc5
- replace _PATH_DEVNULL with bb_dev_null
2006-05-19 13:12:21 +00:00
Bernhard Reutner-Fischer
38583fd6f2
- use uint32_t instead of __u32
...
Thanks to Rich Felker for pointing this out.
2006-05-19 12:44:16 +00:00
Bernhard Reutner-Fischer
a2a647dfc1
- include strings.h
...
Thanks to Rich Felker for pointing this out.
2006-05-19 12:30:00 +00:00
Bernhard Reutner-Fischer
e2e56c7c41
- single KERNEL_VERSION(a,b,c) macro in platform.h
...
- rename get_kernel_revision() to get_linux_version_code
from Robert P. J. Day
2006-05-19 11:54:02 +00:00
Rob Landley
34b5319d86
Make md5 calculation always go through an the buffer so that A) we don't
...
handle packets out of sequence if some data goes through the buffer and
some doesn't, B) it works on systems that can't handle aligned access,
C) we just have one code path to worry about.
While we're at it, sizeof() and RESERVE_CONFIG_BUFFER() really don't combine
well, which is why md5sum has been reading and processing data 4 bytes at a
time. I suspect that the existence of CONFIG_MD5_SIZE_VS_SPEED to do loop
unrolling and such in the algorithm was an attempt to work around that bug.
2006-05-16 02:38:26 +00:00
Bernhard Reutner-Fischer
2f38f27b42
- patch from Robert P. J. Day to use filter instead of findstring.
2006-05-15 10:04:50 +00:00
Mike Frysinger
39440e520c
pull Rules.mak from top_srcdir as pointed out by Robert P. J. Day on the mailing list
2006-05-13 02:33:09 +00:00
Rob Landley
f7897ec47b
Autodetect parts of a multipart file, from Robert P. Day's suggestion.
2006-05-12 01:42:33 +00:00
Rob Landley
cc848ddbf8
Bug fix from Vladimir Oleynik, and suggestion I add my copyright notice
...
to the file.
2006-05-11 18:25:24 +00:00
Rob Landley
a6b5b60942
Fiddling with llist to make memory management easier. Specifically, the
...
option to delete the contents of the list when we delete the list is a
good thing.
2006-05-08 19:03:07 +00:00
Rob Landley
0ea0aefcb5
Remove a link that leaked in from the pending llist_t changes.
2006-05-08 15:08:25 +00:00
Rob Landley
a389651115
Remove bb_strlen() in favor of -fno-builtin-strlen. Saves as many bytes
...
as the old optimization did (actually does slightly better under gcc 4.0), and
simplifies the code.
2006-05-07 20:20:34 +00:00
Rob Landley
2c39eee805
Migrate endianness macros.
2006-05-05 16:54:40 +00:00
Rob Landley
552b56dfd1
Not quite compiler independent, but we've never tried to be gcc independent
...
anyway. This is at least less ugly than what was there before, and fixes
building all sources at once.
2006-05-04 21:22:27 +00:00
Rob Landley
f76cd964ec
Whitespace and documentation cleanup from Dennis Vlasenko.
2006-05-03 21:23:15 +00:00
Rob Landley
7818a422bc
Portability tweak from Shaun Jackman, don't include asm/page.h directly.
2006-04-25 18:42:23 +00:00
Rob Landley
bbd50b58ea
Remove some #if 0 code.
2006-04-18 20:42:39 +00:00
Bernhard Reutner-Fischer
54f75ee300
- BusyBox is under GPL.
...
in http://www.busybox.net/lists/busybox/2006-April/020364.html Denis Vlasenko
said when asked which license to use for these files:
"Sure. LGPL or GPL is fine with me."
Adjusting accordingly.
2006-04-18 08:24:13 +00:00
Mike Frysinger
1a54030445
use memmove() instead of bcopy()
2006-04-16 05:58:21 +00:00
Mike Frysinger
78bd504947
use memcmp() not bcmp()
2006-04-16 05:51:47 +00:00
Bernhard Reutner-Fischer
c2cb0f32b4
- patch from Denis Vlasenko to add and use bb_xopen3()
2006-04-13 12:45:04 +00:00
Bernhard Reutner-Fischer
d9cf7ac781
- patch from Denis Vlasenko to add and use bb_xchdir()
2006-04-12 18:39:58 +00:00
Bernhard Reutner-Fischer
67f641e75b
- patch from Denis Vlasenko to add bb_xbind() and bb_xlisten()
2006-04-12 18:24:37 +00:00
Bernhard Reutner-Fischer
2c99851181
- patch from Denis Vlasenko to add and use bb_xdaemon()
2006-04-12 18:09:26 +00:00
Bernhard Reutner-Fischer
dac7ff15b7
- patch from Denis Vlasenko to add and use bb_xsocket() and to use
...
bb_xopen some more while at it.
Also use shorter boilerplate while at it.
2006-04-12 17:55:51 +00:00
Bernhard Reutner-Fischer
cb44816ba3
- add and use bb_opendir(), bb_xopendir().
...
text data bss dec hex filename
889445 9392 1035784 1934621 1d851d busybox.gcc-4.2.orig
889297 9392 1035784 1934473 1d8489 busybox.gcc-4.2
889009 9820 1037860 1936689 1d8d31 busybox.gcc-4.1.orig
888817 9820 1037860 1936497 1d8c71 busybox.gcc-4.1
2006-04-12 07:35:12 +00:00
Rob Landley
c57ec37959
Patch from Rob Sullivan to consolidate crc32 table generation.
2006-04-10 17:07:15 +00:00
Bernhard Reutner-Fischer
fa939aae81
- include proper headers.
2006-04-05 16:21:37 +00:00
Bernhard Reutner-Fischer
421d9e5941
- move buffer allocation schemes to libbb.h
...
- include the correct headers: applets need busybox.h while lib* need libbb.h
2006-04-03 16:39:31 +00:00
Rob Landley
a13cca9cf4
New version from Tito.
2006-04-02 18:57:20 +00:00
Bernhard Reutner-Fischer
d409c3a2f7
- Rich Felker writes: fix invalid printf format strings
...
http://busybox.net/lists/busybox/2006-March/019568.html
text data bss dec hex filename
900619 10316 1038724 1949659 1dbfdb busybox.oorig
900603 10316 1038724 1949643 1dbfcb busybox
2006-03-29 22:34:47 +00:00
Rob Landley
ca087713f2
More extern removal from Robert P. Day.
2006-03-29 16:52:56 +00:00
Bernhard Reutner-Fischer
cb8d4319a3
find ./ -name .cvsignore | xargs svn rm
2006-03-29 15:51:19 +00:00
Mike Frysinger
f885513940
just whitespace fixes
2006-03-28 02:35:56 +00:00
Rob Landley
3570915769
More dead code removal.
2006-03-26 21:49:42 +00:00
Rob Landley
1bb31928d5
Bug spotted by Stephane Billiart: losetup depends on loop.c.
2006-03-23 16:49:22 +00:00
Rob Landley
fb3a631310
Very nice patch from Rich Felker to portably set the stream error indicator and
...
thus remove a lot of nasty old code that didn't.
2006-03-23 15:30:26 +00:00
Rob Landley
8dd4ca787a
Patch from Shaun Jackman to make loop.c build only when needed.
2006-03-21 16:22:19 +00:00
Bernhard Reutner-Fischer
263e75d051
- fix order of includes.
2006-03-18 11:59:55 +00:00
Rob Landley
aae8b3405e
Whitespace cleanup and minor tweak (return -ERRNO instead of ERRNO so
...
EPERM doesn't register as a successful read-only mount.
2006-03-18 02:38:10 +00:00
Rob Landley
ea9a471acd
Random in-passing tweak.
2006-03-16 14:40:27 +00:00
Rob Landley
31642d75e1
More "extern" removals from Robert P. Day
2006-03-14 21:45:38 +00:00
Rob Landley
386f85eadf
Attempt to make a warning go away without increasing size.
2006-03-14 21:13:48 +00:00
Bernhard Reutner-Fischer
df10094870
- revert back to r14406
2006-03-13 19:04:00 +00:00
Rob Landley
c5b1d4d6b1
Patch from Denis Vlasenko to add xstat() and use it.
2006-03-13 15:45:16 +00:00
Rob Landley
bc68cd14cc
Patch from Denis Vlasenko turning static const int (which gets emitted into
...
the busybox binary) into enums (which don't).
2006-03-10 19:22:06 +00:00
Rob Landley
1f305dc0fd
Portability patch from rfelker. The bb_asprintf.c thing needs an eventual
...
follow up in platform.h to set the #ifdef, but the workaround works for
everybody, so...
2006-03-09 22:21:20 +00:00
Bernhard Reutner-Fischer
07a79e75f5
- backout using features which are not available with the previous stable
...
version of make (3.71.1).
2006-03-09 09:03:37 +00:00
Rob Landley
dfba741457
Robert P. Day removed 8 gazillion occurrences of "extern" on function
...
definitions. (That should only be on prototypes.)
2006-03-06 20:47:33 +00:00
Bernhard Reutner-Fischer
e3ec99de82
- remove unused lists *-m
2006-03-02 18:23:13 +00:00
Bernhard Reutner-Fischer
022eb311d5
- use absolute path for top_builddir and top_srcdir.
...
Fixes make trying to include the very same file in an endless loop.
2006-03-02 17:33:25 +00:00
Bernhard Reutner-Fischer
5d26126b9e
- fixes parallel builds (make -j)
...
- use less resources for the buildsystem itself
2006-03-01 22:54:48 +00:00
Rob Landley
2b26fd5570
A few changes falling out from the effort to make sed handle embedded NUL bytes.
...
Checking in to reduce the diff between my tree and svn...
2006-02-24 02:30:39 +00:00
Mike Frysinger
992a58c216
document leading + option
2006-02-22 22:56:30 +00:00
Rob Landley
87b9573ff8
Forgot to check this in last night, part of the hash_fd breakup.
2006-02-21 15:04:07 +00:00
Rob Landley
5cf7c2df66
Patch from Devin Bayer to split up hash_fd.c into md5.c and sha1.c. (I tweaked
...
md5_sha1_sum.c to convert some #ifdef CONFIG to if(ENABLE).)
2006-02-21 06:44:43 +00:00
Mike Frysinger
57f4cb2867
a few more comment touchups
2006-02-21 00:50:37 +00:00
Mike Frysinger
e17c80e604
translate Russian-English to just plain English
2006-02-21 00:37:42 +00:00
"Vladimir N. Oleynik"
7673ccad60
sync with mainstream, but check more
2006-02-20 16:57:36 +00:00
Rob Landley
081d6d4380
getdomainname() isn't guaranteed to null terminate the string if it was
...
truncated for length. SVN 14135 made sure that the truncated version would
always be null terminated. SVN 14144 broke this for no readily apparent
reason, and I have no idea what it was even trying to accomplish. Reverted.
2006-02-20 16:31:44 +00:00
"Vladimir N. Oleynik"
0c6ff43a0c
remove #undef strlen, use #define strlen always but without xfunc/BB_STRLEN_IMPLEMENTATION
2006-02-20 12:15:10 +00:00
"Vladimir N. Oleynik"
d24d083061
correction get(host/domain)name usage, revert 742 bug
2006-02-20 10:44:02 +00:00
Rob Landley
4e9deec8bf
svn 14077 was completely broken and apparently never tested.
2006-02-20 02:44:30 +00:00
Mike Frysinger
dce17c6268
rfelker writes in Bug 742: make sure string is null terminated after calling gethostname
2006-02-19 23:03:31 +00:00
Mike Frysinger
294254ce6b
rfelker writes in Bug 740: s/u_char/unsigned char/
2006-02-19 22:59:12 +00:00
"Vladimir N. Oleynik"
06776b3650
type typo. Thanks, Devin Bayer
2006-02-17 09:33:22 +00:00
"Vladimir N. Oleynik"
dd1ccddf1b
moved BB_BANNER to applets/version.c file: make kernel like version,
...
removed depend loop: busybox.h depend with BB_BT, and all sources depend with busybox.h
2006-02-16 15:40:24 +00:00
"Vladimir N. Oleynik"
21e68703ce
removed #undef strlen, use builtins and prototuped strlen from xfunc file (only\!)
2006-02-16 14:38:41 +00:00
"Vladimir N. Oleynik"
465300ced9
cleanups after changes by Denis Vlasenko. Size optimization
2006-02-14 10:17:09 +00:00
Rob Landley
b2804551a0
Cleanups from Denis Vlasenko.
2006-02-13 22:04:27 +00:00
Rob Landley
90632d021c
Bug fix from Kim B. Heino, manifested via:
...
echo > foo && zip foo.zip foo && ./busybox unzip foo.zip
2006-02-13 19:40:43 +00:00
Rob Landley
bec26527a1
Save a few bytes in error message.
2006-02-05 03:31:44 +00:00
"Vladimir N. Oleynik"
4fc92206ed
destroy bug 679, use getopt_ulflags with new feature: usage option. Removed two strdup
2006-02-02 14:48:54 +00:00
Mike Frysinger
b38673fb9f
make the build system puuuuuuuuuuurty
2006-02-02 01:41:53 +00:00
Bernhard Reutner-Fischer
3038557649
- bzero -> memset
...
text data bss dec hex filename
1652855
14444 1215616 2882915 2bfd63 busybox.oorig.gcc-3.3
1652823 14444 1215616 2882883 2bfd43 busybox.gcc-3.3
1603655 14412 1215552 2833619 2b3cd3 busybox.oorig.gcc-3.4
1603655 14412 1215552 2833619 2b3cd3 busybox.gcc-3.4
1609755 14508 1215744 2840007 2b55c7 busybox.oorig.gcc-4.0
1609755 14508 1215744 2840007 2b55c7 busybox.gcc-4.0
1590495 13516 1215392 2819403 2b054b busybox.oorig.gcc-4.1-HEAD
1590495 13516 1215392 2819403 2b054b busybox.gcc-4.1-HEAD
1589079 13036 1213248 2815363 2af583 busybox.oorig.gcc-4.2-HEAD
1589079 13036 1213248 2815363 2af583 busybox.gcc-4.2-HEAD
2006-01-31 17:57:48 +00:00
"Vladimir N. Oleynik"
1f17d3287a
more obscure
2006-01-31 12:36:51 +00:00
"Vladimir N. Oleynik"
7600eec732
avoid signed<->unsigned warning
2006-01-31 12:12:15 +00:00
Bernhard Reutner-Fischer
cd98555dfa
- fix typo i introduced yesterday.
2006-01-31 08:17:13 +00:00
Eric Andersen
76b24270d4
with 2.4 kernel headers, lo_file_name is char, but with 2.6
...
headers we get a u8 for lo_file_name, so always cast to (char *)
when treating it as such.
2006-01-30 17:30:22 +00:00
Bernhard Reutner-Fischer
20f4000086
- add some ATTRIBUTE_UNUSED.
...
- use shorter boilerplate while at it.
2006-01-30 17:17:14 +00:00
Bernhard Reutner-Fischer
0e8727d93b
- make linking against libcrypt optional by looking if pw_encrypt() or
...
correct_password() is configured. Fixes allnoconfig pulling in -lcrypt.
2006-01-30 15:29:55 +00:00
Tim Riker
c1ef7bdd8d
just whitespace
2006-01-25 00:08:53 +00:00
Rob Landley
b70ccd9509
Close bug 644: loop incrementing twice, skipping ever other device.
2006-01-22 23:17:18 +00:00
Bernhard Reutner-Fischer
37dec0e9e9
- make CONFIG_MD5SUM_SIZE_VS_SPEED configurable via menuconfig.
...
- use shorter boilerplate.
2006-01-17 12:07:03 +00:00
Bernhard Reutner-Fischer
7ca61b6f33
- shared libbusybox.
...
- IMA compilation option (aka IPO, IPA,..)
Please holler if i broke something..
2006-01-15 14:04:57 +00:00
Bernhard Reutner-Fischer
853c44b798
- correct definitions.
2006-01-13 12:03:26 +00:00
Bernhard Reutner-Fischer
dd9dce104d
- shrink simple obscure stuff a tiny bit:
...
text data bss dec hex filename
789 0 0 789 315 obscure.o.oorig
771 0 0 771 303 obscure.o
- replace bzero by memset while at it.
2006-01-12 15:38:12 +00:00
"Vladimir N. Oleynik"
f01e1784e5
removed a warning about an unused pargv in bb_getopt_ulflags. Noticed by Tito
2006-01-09 13:28:31 +00:00
Rob Landley
3d1bbf0a5f
Minor cosmetic fix from Tito.
2006-01-09 01:07:24 +00:00
Rob Landley
84cb76733f
patch from tito: consolidate delay functions as bb_do_delay()
2006-01-06 20:59:09 +00:00
Rob Landley
9085467970
Trying to losetup a device as a regular user shouldn't result in an endless
...
loop, and the error messages should display correctly now.
2005-12-21 16:53:57 +00:00
Rob Landley
e422af6bcb
Flush input when prompting for a password (bug 373).
2005-12-12 07:02:15 +00:00
"Vladimir N. Oleynik"
bf968f71f1
reduce signedness warning
2005-12-02 10:10:28 +00:00
Rob Landley
1d589b2e2d
Fix losetup so that it A) actually works again, B) has much better error
...
messages, C) can show the current association (if any) when called
with only one argument. Update the documentation a lot too.
Remind me to add a test suite for this thing. I think I've figured out
how to handle root-only testsuites...
2005-11-29 23:47:10 +00:00
"Vladimir N. Oleynik"
cc34344d91
change the interface of libbb/compare_string_array (unsigned short to int), usaging for e2fsprogs/fsck
2005-11-26 10:45:26 +00:00
"Vladimir N. Oleynik"
61ff4b3973
more use const for interface of libbb/compare_string_array, example usage for e2fsprogs/fsck
2005-11-26 10:33:55 +00:00
"Vladimir N. Oleynik"
4eb2fd6826
more use libbb/bb_msg_read_error
2005-11-25 11:36:36 +00:00
Rob Landley
b4c823211d
Move interface.c to networking directory since it's only used by ifconfig.
2005-11-22 07:52:54 +00:00
Rob Landley
9033453c18
My last change to this file broke tar x. Sigh. (Trying to make sure we work
...
on file sizes between 2 and 4 gigs on 32 bit machines. For supporting >4 gigs,
just use a 64 bit machine already...)
2005-11-12 11:04:11 +00:00
Rob Landley
3fc4ad1478
Fix bug 424: doing full_read breaks things like cat which should return a
...
chunk of data when they get it and not block until they've buffered 4k.
The use case was cat /proc/psaux, but you can also reproduce this by
running non-busybox cat by itself and typing things at the command line.
Then run busybox cat. Notice how cat is _supposed_ to echo each line back
to us as we hit enter?
2005-11-04 01:54:15 +00:00
Rob Landley
21ccbb6c0e
When cp ran out of space it didn't return a nonzero error code. Fixes bug 493.
2005-11-04 01:20:46 +00:00
Rob Landley
2f30932eca
Fix cp /dev/null filename, and a few in-passing cleanups.
2005-11-01 21:55:14 +00:00
Rob Landley
2454ebd85d
Somebody suggested this, but I've forgotten who.
2005-10-27 22:50:04 +00:00
Rob Landley
3c6bfe3e33
Shaun Jackman noted that limits.h defines path_max and isn't included from
...
find_root_device.c. (We #include it in busybox.h but not libbb.h, it seems.
Someday, someone's going to have to clarify for me the difference between
those two...)
2005-10-25 02:22:13 +00:00
"Vladimir N. Oleynik"
0fa9deda17
more const
2005-10-20 09:48:28 +00:00
Bernhard Reutner-Fischer
7547a6e2f6
- don't update copyright years. He might release it, but apparently will have
...
to update the year himself.
2005-10-15 20:56:31 +00:00
Bernhard Reutner-Fischer
94c3331d47
- an empty middle term in ?: violates ISO C
...
- use shorter boilerplate and use C89 style comments
2005-10-15 14:13:09 +00:00
"Vladimir N. Oleynik"
6f347ef9dc
common BUFSIZ BSS buffer, small reduce code, data and bss
2005-10-15 10:23:55 +00:00
"Vladimir N. Oleynik"
f704b27b5b
- new bb_opt_complementally syntax, use [-:?] only - 'free' chars
...
- new bb_getopt_ulflags features: check max and min args, convert first argv to options special for ar and tar applets
- use bb_default_error_retval for env applet
2005-10-14 09:56:52 +00:00
"Vladimir N. Oleynik"
6c35c7c976
usage bb_dev_null
2005-10-12 15:34:25 +00:00
"Vladimir N. Oleynik"
86a1073e0b
bb_dev_null
2005-10-12 15:21:32 +00:00
"Vladimir N. Oleynik"
064f04e7e2
- use complementally '!' to '?' - 'ask' is best 'free' char for this.
...
- more long opt compatibility, can set flag for long opt struct now
- more logic: check opt-depend requires and global requires, special for 'id' and 'start-stop-daemon' applets.
2005-10-11 14:38:01 +00:00
Rob Landley
ff567f7943
The check for EROFS was wrong. For example, if you try to mount a filesystem
...
appended to an executable that's being run (yes, I'm doing this) you get
EPERM, but mounting readonly fixes it. Doing the fallback all the time
shouldn't hurt, and is one less test.
2005-10-11 07:26:15 +00:00
"Vladimir N. Oleynik"
083d3f49c2
bb_mkdep: Rewroted. removed problem "include name must uniq", speed up * 3.
...
e2fsprogs: remove confuse bb_mkdep. Use internal e2fsprogs includes only.
other: remove confuse bb_mkdep.
2005-10-10 11:35:17 +00:00
Bernhard Reutner-Fischer
ab52db8d5e
- size reduction of pidof
...
- fix typo in reverse_pidlist
2005-10-07 15:44:37 +00:00
Bernhard Reutner-Fischer
cf95e0b2d5
- add llist_free_one() and llist_free() to libbb
2005-10-06 12:12:51 +00:00
Bernhard Reutner-Fischer
56b217117a
- add llist_free_one() and llist_free() to libbb; Add a bit of documentation.
...
- change llist_add_to_end as proposed by vodz in http://busybox.net/lists/busybox/2005-September/016411.html
- remove unneeded includes, add short boilerplate and copyright to llist.c
- move COMM_LEN from find_pid_by_name to libbb.h and use it in procps_status_t
- add reverse_pidlist() to find_pid_by_name. Will be needed for pidof.
2005-10-06 12:10:48 +00:00
"Vladimir N. Oleynik"
4a5ce08688
another more correction for getopt_ulflags() documentation (examples)
2005-10-05 13:58:40 +00:00
"Vladimir N. Oleynik"
d1b6078e5d
more correction for getopt_ulflags() documentation by author of this fuck logic
2005-10-05 12:44:52 +00:00
Bernhard Reutner-Fischer
120513c29f
- add proper separators. sorry for the noise..
2005-10-05 12:28:55 +00:00
Bernhard Reutner-Fischer
43fb3fcb2f
- add a bit more documentation to vodz' recent additions.
2005-10-05 12:23:13 +00:00
"Vladimir N. Oleynik"
35939d9378
update bb_getopt_ulflags special for 'ps' applet, usaging '-' as first group char from bb_opt_complementally is new feature: set argv is options;
...
use new bb_getopt_ulflags for ps
# define terminal_width 80->79 for unwide
use stdout file descriptor for get_terminal_width_height. (its must)
2005-10-05 10:52:47 +00:00
"Vladimir N. Oleynik"
be0ed3d0b9
use updated bb_getopt_ulflags() for ps applet
2005-10-04 16:48:26 +00:00
"Vladimir N. Oleynik"
39a841cecf
change interface to bb_xasprintf() - more perfect for me.
...
ln.c: error_msg(str)->error_msg(%s, str) - remove standart "feature" for hackers
reduce 100 bytes don't care in sum
2005-09-29 16:18:57 +00:00
Bernhard Reutner-Fischer
bee9eb1a9d
- rename llist_add_to.c to llist.c
...
- move llist_add_to_end() from ifupdown.c to libbb/llist.c
2005-09-29 12:55:10 +00:00
"Vladimir N. Oleynik"
5f46010ab7
spwd bulid now, (typo)
2005-09-26 12:58:24 +00:00
Rob Landley
5246063a7b
Patch from Amir Shalem to make busybox compile on a uClibc that has no shadow
...
password support.
2005-09-25 23:36:12 +00:00
Mike Frysinger
62f18e1f20
use the shorter license header
2005-09-24 07:16:29 +00:00
Mike Frysinger
0d4ee68be5
use brief license line
2005-09-24 06:01:57 +00:00
Bernhard Reutner-Fischer
c5280e8885
- consolidated password helpers
2005-09-20 21:09:31 +00:00
Bernhard Reutner-Fischer
f56b8e4b00
- consolidated password helpers into bb_pwd.c
2005-09-20 21:08:10 +00:00
Bernhard Reutner-Fischer
d5bd137a24
- rename libbb's password helpers as suggested in libbb.h
...
my_getpwnam -> bb_xgetpwnam /* dies on error */
my_getgrnam -> bb_xgetgrnam /* dies on error */
my_getgrgid -> bb_getgrgid
my_getpwuid -> bb_getpwuid
my_getug -> bb_getug
2005-09-20 21:06:17 +00:00
"Vladimir N. Oleynik"
f246dc7f57
ENABLE_FEATURE_TOP_CPU_USAGE_PERCENTAGE->CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE
2005-09-16 12:55:29 +00:00
"Vladimir N. Oleynik"
23f62fc6f3
split libbb: moved xregcomp separatelly for speed up recompile
2005-09-14 16:59:11 +00:00
"Vladimir N. Oleynik"
1e07f852e0
FEATURE->ENABLE_FEATURE loses one for 'top' applet
2005-09-14 16:08:06 +00:00
Rob Landley
90ca6b2878
This code exists to compensate for ancient broken build environments which,
...
as far as I can tell, are no longer relevant. Modern busybox refuses to
build under libc5 (there's a specific test and #error for that), and
I'm not sure building against 2.1 kernel headers on Alpha was ever relevant.
I'm happy to put any of this back if anybody can point to a real need for it,
but if so we need to specifically document what environment is being
compensated for. (And we should quarrantine the build environment code
into one place, anyway. Maybe "quirks.h" for known compiler and
libc quirks?)
2005-09-07 06:39:02 +00:00
Mike Frysinger
99f61719cb
Amir Shalem writes:
...
this patch fix syscall names mix-up in libb/syscalls.c
2005-09-06 21:53:21 +00:00
"Vladimir N. Oleynik"
45a8ed89c6
- sync traceroute with Slackware-10.1
...
(support -FIl -g gw -i if -z pt now).
- libbb/getopt_ulflags.c support bb_opt_complementally="x-x" as trigger now
2005-09-06 16:08:33 +00:00
Rob Landley
9955c45907
get_terminal_width_height.c was in there twice.
2005-09-05 18:42:18 +00:00
"Vladimir N. Oleynik"
27421a1878
1) bb_opt_complementaly -> bb_opt_complementally
...
2) better support long options
3) new flag '!' for bb_opt_complementally: produce bb_show_usage() if BB_GETOPT_ERROR internally
2005-09-05 14:46:07 +00:00
Rob Landley
cc1669bcde
Actually returning ret might be good.
2005-09-05 05:36:15 +00:00
Rob Landley
828548ab56
According to bug #63 , crond is unhappy with crontab lines that don't end in a
...
newline, or lines that have trailing spaces.
2005-09-01 10:23:57 +00:00
Rob Landley
e0537f6194
Bernhard Fischer suggested that get_terminal_width_height() should return
...
the result of the ioctl so callers can tell if we have a tty. (0 means
we have a tty, nonzero means the ioctl couldn't find size info and we
fake 80x24. Really we should fake 80x25, but oh well...)
2005-09-01 02:57:45 +00:00
Mike Frysinger
ddddb94f05
make sure __NF_sysfs exists before trying to use it
2005-08-27 18:19:01 +00:00
Rob Landley
6417564eeb
Two FEATURE_CLEAN_UP patches from Shaun Jackman, closing filehandles.
2005-08-22 15:57:50 +00:00
Mike Frysinger
6ebbc7414e
the () around isspace actually matters
2005-08-16 05:39:07 +00:00
Mike Frysinger
71224980e1
Bernhard Fischer says: fix comment typo
2005-08-16 05:27:51 +00:00
Rob Landley
6a6798b8e4
Major rewrite of mount, umount, losetup. Untangled lots of code, shrunk
...
things down a bit, fixed a number of funky corner cases, added support for
several new features (things like mount --move, mount --bind, lazy unounts,
automatic detection of loop mounts, and so on). Probably broke several
other things, but it's fixable. (Bang on it, tell me what doesn't work for
you...)
Note: you no longer need to say "-o loop". It does that for you when
necessary.
Still need to add "user mount" support, which involves making mount suid. Not
too hard to do under the new infrastructure, just haven't done it yet...
The previous code had the following notes, that belong in the version
control comments:
- * 3/21/1999 Charles P. Wright <cpwright@cpwright.com>
- * searches through fstab when -a is passed
- * will try mounting stuff with all fses when passed -t auto
- *
- * 1999-04-17 Dave Cinege...Rewrote -t auto. Fixed ro mtab.
- *
- * 1999-10-07 Erik Andersen <andersen@codepoet.org>.
- * Rewrite of a lot of code. Removed mtab usage (I plan on
- * putting it back as a compile-time option some time),
- * major adjustments to option parsing, and some serious
- * dieting all around.
- *
- * 1999-11-06 mtab support is back - andersee
- *
- * 2000-01-12 Ben Collins <bcollins@debian.org>, Borrowed utils-linux's
- * mount to add loop support.
- *
- * 2000-04-30 Dave Cinege <dcinege@psychosis.com>
- * Rewrote fstab while loop and lower mount section. Can now do
- * single mounts from fstab. Can override fstab options for single
- * mount. Common mount_one call for single mounts and 'all'. Fixed
- * mtab updating and stale entries. Removed 'remount' default.
- *
2005-08-10 20:35:54 +00:00
Paul Fox
0b62158475
implemented a builtin echo command in ash. moved the guts of the
...
echo applet into libbb, and now call bb_echo() from both echo.c
and ash.c
2005-08-09 19:38:05 +00:00
Mike Frysinger
b953134bba
apgo in Bug 322 writes: kill off CONFIG_FEATURE_MTAB_FILENAME
2005-07-30 08:48:10 +00:00
Paul Fox
e5ba382b99
move the ifdef to after libbb.h include, so it can do some good.
2005-07-27 14:20:52 +00:00
Mike Frysinger
4d00896d05
use toplevel ARFLAGS and update default ARFLAGS to be quiet
2005-07-27 01:09:24 +00:00
Mike Frysinger
6fafa5aa9f
2005-04-05 Shaun Jackman <sjackman@gmail.com>
...
* libbb/printf.c: Check for __NEWLIB_H__ before __GLIBC__.
2005-07-26 23:05:03 +00:00
Mike Frysinger
6e05312ba9
no longer used as reported by apgo in Bug 348
2005-07-26 22:51:57 +00:00
Paul Fox
1429017968
ifdef all of loop.c with CONFIG_FEATURE_MOUNT_LOOP. won't
...
compile due to CONFIG_FEATURE_MOUNT_LOOP_MAX otherwise. reported
by Stephane Billiart.
2005-07-22 19:58:32 +00:00
Paul Fox
c337d29550
applying fix for:
...
0000117: Remove linefeed after overwrite prompt using cp -i
User input not on the same line as the prompt when about to
overwrite a file.
2005-07-19 21:31:05 +00:00
Paul Fox
3f6f3174e9
applying fix from:
...
0000068: mount limited to max 8 loop devices (patch provided)
(made minor wording change for config help message)
2005-07-19 20:55:37 +00:00
Paul Fox
0a92bbf349
applying fix from:
...
0000067: cp -p produces misleading error message
2005-07-19 20:47:33 +00:00
Mike Frysinger
348e84c202
change the hardcoded error constant (0x80000000UL) to a nice flexible define (BB_GETOPT_ERROR)
2005-05-11 00:39:03 +00:00
Mike Frysinger
fb6d22c96c
now that mjn3 explained it to me, add documentation for the 3rd field in long opts
2005-05-11 00:02:39 +00:00
Mike Frysinger
e5d0bde697
add documentation for long options and touch up the current docs now that i actually understand how to use the function myself :)
2005-05-10 23:48:35 +00:00
Mike Frysinger
9dc93ac561
syntax/whitespace touchup
2005-05-09 21:51:15 +00:00
Rob Landley
93983040c5
Shaun Jackman said:
...
This patch adds a CONFIG_FEATURE_CLEAN_UP stanza, and also adds an
ifdef around the SIOCGIFMAP call.
2005-05-03 21:30:26 +00:00
Rob Landley
60158cb93e
A patch from Takeharu KATO to update/fix SE-Linux support.
2005-05-03 06:25:50 +00:00
Rob Landley
e3752e56a4
Revert Tito's patch to zcip. My bad, David Brownell had objected and I missed
...
it...
2005-05-03 03:28:55 +00:00
Rob Landley
8445a9ff99
On Tuesday 19 April 2005 21:10, Tito wrote and today added:
...
> Hi,
> this is a first attempt of size optimization for zcip taking into account all
> the hints given so far on the list.
> I've applied just the more obvious busyboxifications so maybe it could be
> optimized more.
BTW: I've ripped out a lot of debug code and changed c++ // comments to /* */
as both were rather confusing for a newbie like me. ;-)
Sorry to the author for that.
I know that this makes mantaining the code easier, but I'm simple minded....
2005-05-01 00:22:03 +00:00
Eric Andersen
fef32b570b
Correct errors preventing busybox tar from working properly,
...
fixing bug http://bugs.uclibc.org/view.php?id=231
2005-04-27 10:51:38 +00:00
Mike Frysinger
2bf88a891f
In Bug 5, Tito writes:
...
This is a first attempt to improve the comments of getopt_ulflags.c.
Maybe under some aspects the text could be refined, but so
far it is already usable and should help people who "avoided getopt_ulflags as the pest" to understand how it works.
This patch was created with the help of
Vodz, the author of the code, who explained me patiently
how getopt_ulflags works
and with the help of
Paul Fox, who corrected my broken english.
So thanks and merits should go to them also.
2005-04-18 22:42:58 +00:00
Eric Andersen
14f5c8d764
Patch from Bernhard Fischer to make a bunch of symbols static
...
which were otherwise cluttering the global namespace.
2005-04-16 19:39:00 +00:00
Eric Andersen
451c0d2828
Rework to fix http://bugs.uclibc.org/view.php?id=107
2005-04-16 07:46:53 +00:00
Eric Andersen
3cd1986195
Add bb_msg_read_error
2005-04-16 07:42:35 +00:00
Mike Frysinger
2ed05ab146
fake out support for POSIX -H and -L options since busybox cp dereferences everything by default
2005-04-14 02:52:50 +00:00
Mike Frysinger
a36ac0db67
Shaun Jackman writes: Fix typo. Use __NR_umount2 instead of __NR_pivot_root.
2005-03-04 01:34:23 +00:00
Mike Frysinger
9b9e5479e8
add some more comments
2005-03-04 01:27:18 +00:00
Mike Frysinger
3b05b80cd7
newlib fixe from Shaun Jackman
2005-03-04 01:10:56 +00:00
Rob Landley
c0dedd05e8
Sort rewrite to be SUSv3 compliant. New config option, updated help, and
...
a couple of infrastructure bits.
2005-01-24 07:00:02 +00:00
Eric Andersen
1e4dc96d61
Dear andersen:
...
Is the change on libbb/loop.c which you commited in 2005/1/3 effective
really?
The __GLIBC__ macro and __UCLIBC__ macro are defined in
feature.h in glibc source, so the change may not be effective.
If you want to check this with __GLIBC__, feature.h header is needed.
Some architectures(e.g. PPC series) need to include linux/posix_types.h
in stead of asm/posix_types.h, so the patch which is attached with
this mail include <linux/posix_types.h>.
2005-01-04 20:37:55 +00:00
Eric Andersen
1271dbb860
perhaps a better fix
2005-01-03 05:50:01 +00:00
Rob Landley
861f0145d3
Workaround for uClibc-specific header problem described here:
...
http://www.busybox.net/lists/busybox/2004-December/013276.html
Rob
2004-12-09 23:12:00 +00:00
Eric Andersen
0e020d1025
Make certain clients of bb_make_directory default to honoring
...
the user's umask
2004-10-13 06:25:52 +00:00
Eric Andersen
a62665b72f
Patch from Claus Klein to increase, and make more apparent
...
the hard coded limit on the number of mounts
2004-10-08 08:57:35 +00:00
Eric Andersen
94d628c76a
Tito writes:
...
Hi to all,
This patch contains just some fixes for some misleading
comments in my_getpwuid.c and my_getug.c.
The code is untouched so this patch will not
cause troubles.
Please apply.
Thanks in advance and Ciao,
Tito
2004-10-08 08:07:40 +00:00
Eric Andersen
7daa076d3e
egor duda writes:
...
Hi!
I've created a patch to busybox' build system to allow building it in
separate tree in a manner similar to kbuild from kernel version 2.6.
That is, one runs command like
'make O=/build/some/where/for/specific/target/and/options'
and everything is built in this exact directory, provided that it exists.
I understand that applyingc such invasive changes during 'release
candidates' stage of development is at best unwise. So, i'm currently
asking for comments about this patch, starting from whether such thing
is needed at all to whether it coded properly.
'make check' should work now, and one make creates Makefile in build
directory, so one can run 'make' in build directory after that.
One possible caveat is that if we build in some directory other than
source one, the source directory should be 'distclean'ed first.
egor
2004-10-08 07:46:08 +00:00
Eric Andersen
2842659cc0
Patch from Michael Tokarev:
...
Scenario:
touch x -- creates plain file name `x'
mkdir x -- exits successefully
libbb/make_directory.c, bb_make_directory(), contains
the following code:
if (mkdir(path, 0777) < 0) {
/* If we failed for any other reason than the directory
* already exists, output a diagnostic and return -1.*/
if (errno != EEXIST) {
fail_msg = "create";
umask(mask);
break;
}
/* Since the directory exists, don't attempt to change
* permissions if it was the full target. Note that
* this is not an error conditon. */
if (!c) {
umask(mask);
return 0;
}
}
The assumption that EEXIST error is due to that the *directory*
already exists is wrong: any file type with that name will cause
this error to be returned. Proper way IMHO will be is to stat()
the path and check whenever this is really a directory. Below
(attached) is a patch to fix this issue.
2004-10-08 07:21:58 +00:00
Glenn L McGrath
29de86314a
Remove this error message at Vodz request, it was misleading.
2004-09-24 02:36:44 +00:00
Glenn L McGrath
f15dfc5570
Tito writes,
...
"This patch fixes all the bugs in id previously spotted by vodz and me.
The binary size increased a bit, but now it should work as expected."
2004-09-15 03:04:08 +00:00
Eric Andersen
7b08cdd98c
No longer needed
2004-09-02 23:11:53 +00:00
Eric Andersen
7eb79fff10
Tito writes:
...
Hi Erik,
Hi to all,
This is part five of the my_get*id story.
I've tweaked a bit this two functions to make them more flexible,
but this changes will not affect existing code.
Now they work so:
1) my_getpwuid( char *user, uid_t uid, int bufsize)
if bufsize is > 0 char *user cannot be set to NULL
on success username is written on static allocated buffer
on failure uid as string is written to buffer and NULL is returned
if bufsize is = 0 char *user can be set to NULL
on success username is returned
on failure NULL is returned
if bufsize is < 0 char *user can be set to NULL
on success username is returned
on failure an error message is printed and the program exits
2) 1) my_getgrgid( char *group, uid_t uid, int bufsize)
if bufsize is > 0 char *group cannot be set to NULL
on success groupname is written on static allocated buffer
on failure gid as string is written to buffer and NULL is returned
if bufsize is = 0 char *group can be set to NULL
on success groupname is returned
on failure NULL is returned
if bufsize is < 0 char *group can be set to nULL
on success groupname is returned
on failure an error message is printed and the program exits
This changes were needed mainly for my new id applet.
It is somewhat bigger then the previous but matches the behaviour of GNU id
and is capable to handle usernames of whatever length.
BTW: at a first look it seems to me that it will integrate well (with just a few changes)
with the pending patch in patches/id_groups_alias.patch.
The increase in size is balanced by the removal of my_getpwnamegid.c
from libbb as this was used only in previous id applet and by size optimizations
made possible in whoami.c and in passwd.c.
I know that we are in feature freeze but I think that i've tested it enough
(at least I hope so.......).
2004-09-02 22:21:41 +00:00
Eric Andersen
52499cb9ae
Tito writes:
...
Hi,
I've spent the half night staring at the devilish my_getpwuid and my_getgrgid functions
trying to find out a way to avoid actual and future potential buffer overflow problems
without breaking existing code.
Finally I've found a not intrusive way to do this that surely doesn't break existing code
and fixes a couple of problems too.
The attached patch:
1) changes the behaviour of my_getpwuid and my_getgrgid to avoid potetntial buffer overflows
2) fixes all occurences of this function calls in tar.c , id.c , ls.c, whoami.c, logger.c, libbb.h.
3) The behaviour of tar, ls and logger is unchanged.
4) The behavior of ps with somewhat longer usernames messing up output is fixed.
5) The only bigger change was the increasing of size of the buffers in id.c to avoid
false negatives (unknown user: xxxxxx) with usernames longer than 8 chars.
The value i used ( 32 chars ) was taken from the tar header ( see gname and uname).
Maybe this buffers can be reduced a bit ( to 16 or whatever ), this is up to you.
6) The increase of size of the binary is not so dramatic:
size busybox
text data bss dec hex filename
239568 2300 36816 278684 4409c busybox
size busybox_fixed
text data bss dec hex filename
239616 2300 36816 278732 440cc busybox
7) The behaviour of whoami changed:
actually it prints out an username cut down to the size of the buffer.
This could be fixed by increasing the size of the buffer as in id.c or
avoid the use of my_getpwuid and use getpwuid directly instead.
Maybe this colud be also remain unchanged......
Please apply if you think it is ok to do so.
The diff applies on today's cvs tarball (2004-08-25).
Thanks in advance,
Ciao,
Tito
2004-08-26 22:18:59 +00:00
Eric Andersen
6fea7328ee
Felipe Kellermann writes:
...
Unfortunatelly I've not followed the last two or three weeks commits (new
semester started and so now I rarely have time to fix my personal bridge)
but tonight I synched my tree and immediately noticed a rather nasty bug!
[Using libbb/interface.c:1.24]
# grep eth0 /proc/net/dev | xargs
eth0:311708397 237346 1670 0 1789 1670 0 0 22580308 120297 0 0 0 102 0 0
# ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:20:AF:7C:EA:B7
inet addr:10.0.0.1 Bcast:10.0.0.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:5 Base address:0x320
All values `ifconfig' is showing are `zeroed' -- I quickly looked at the
last commits I missed and noticed that there were a commit relating to
ifconfig, libbb/interface.c:1.23->1.24 (PatchSet 4338).
I've reversed the patch and now everything is working again. I compared
the get_name's return values from the 1.23 and 1.24 and quickly noticed
that the new revision is leaving `p' right on the sep while the rev 1.23
was leaving it right on the starting of the values...
1-line, 1/3-minute patch attached :-)
2004-08-26 21:45:21 +00:00
Eric Andersen
0722513497
Use __kernel_old_dev_t for 2.6.x kernels
2004-08-16 08:36:28 +00:00
Eric Andersen
cf6ef05711
Aurelien Jacobs writes:
...
with a quick conversion you will see that 132608 == 0x20600
so noticed that the elif will never be matched !
Apparently there was already a try to modify this in CVS which
was reverted (it was plain wrong).
I don't know when __kernel_old_dev_t is needed, but with a 2.6.7
or a 2.6.8 this is __kernel_dev_t wich is needed.
I corrected this with the following patch but maybe older 2.6
still need __kernel_old_dev_t ?
I think this should be corrected before 1.0.
Thanks
Aurel
2004-08-16 08:29:44 +00:00
Eric Andersen
9940e081c9
Patch from solar to fix problems with get_name()
2004-08-12 16:52:00 +00:00
Glenn L McGrath
18bbd9bf3b
Patch from Tito to fix memory leak upon error.
2004-08-11 03:50:30 +00:00
Eric Andersen
93d7fba892
Tito, farmatito at tiscali dot it writes:
...
Hi to all,
This patch is useful for:
1) remove an unused var from extern char *find_real_root_device_name(const char* name)
changing it to extern char *find_real_root_device_name(void).
2) fixes include/libbb.h, coreutils/df.c, util-linux/mount.c and util-linux/umount.c accordingly.
3) fixes a bug, really a false positive, in find_real_root_device_name() that happens if
in the /dev directory exists a link named root (/dev/root) that should be skipped but
is not. This affects applets like df that display wrong results
2004-08-03 00:14:02 +00:00
Manuel Novoa III
413db4d583
Clean up hex escape support.
2004-07-29 23:15:16 +00:00
Eric Andersen
ccfc44806d
Felipe Kellermann noticed a missing `break'.
2004-07-27 16:45:46 +00:00
Eric Andersen
b2a300590d
bother. unrevert my fix.
2004-07-26 12:11:32 +00:00
Eric Andersen
53f5c0d5bf
Allow hex escape sequences
2004-07-26 12:06:19 +00:00
Eric Andersen
380919905c
Allow hex escape sequences
2004-07-26 11:28:47 +00:00
Glenn L McGrath
2e99d43846
Fix for a bug identied by Harald Kuthe, when using many interfaces (29
...
in this case) the order was incorrect and there were duplicate entries.
2004-07-23 01:49:46 +00:00
Glenn L McGrath
eeb06bf230
Patch from Felipe Kellermann, "There is a call to printf using `*pr-cchar'
...
referencing a string and using a single char, when *p <= 0x1f."
2004-07-23 01:35:41 +00:00
Glenn L McGrath
774e6cc29c
Revert my previous commit
2004-06-25 09:01:09 +00:00
Glenn L McGrath
d9670461c4
Fix compile error under 2.6, check for newer versions first or all the
...
checks wont be considered.
2004-06-25 07:47:03 +00:00
Eric Andersen
36adca81f5
Patch from Bastian Blank:
...
On Sat, Jun 19, 2004 at 10:57:37PM +0200, Bastian Blank wrote:
> The following patch changes klogd to use openlog/syslog themself
> instead of calling syslog_msg which always calls the triple
> openlog/syslog/closelog.
Updated patch: get rid of syslog_msg entirely. Request from Erik Andersen.
Bastian
2004-06-22 10:07:17 +00:00
Glenn L McGrath
ff5309ac99
Add part of a patch from Vernon Sauder that i missed a while back
2004-05-02 08:38:53 +00:00
Eric Andersen
6f9a7783ce
Do not use getpass(3)
2004-05-01 01:27:30 +00:00
Glenn L McGrath
1219879422
Dont try and preserve hard links to directories.
...
The linux kernel doesnt allow hard links to directories, SUS says its
implementation specific.
cramfs gives empty directories and 0 length files the same node it
makies it difficult to distinguish from hard links.
2004-04-19 12:28:02 +00:00
Eric Andersen
2c2256cb8b
remove a warning
2004-04-14 17:57:11 +00:00
Eric Andersen
aff114c33d
Larry Doolittle writes:
...
This is a bulk spelling fix patch against busybox-1.00-pre10.
If anyone gets a corrupted copy (and cares), let me know and
I will make alternate arrangements.
Erik - please apply.
Authors - please check that I didn't corrupt any meaning.
Package importers - see if any of these changes should be
passed to the upstream authors.
I glossed over lots of sloppy capitalizations, missing apostrophes,
mixed American/British spellings, and German-style compound words.
What is "pretect redefined for test" in cmdedit.c?
Good luck on the 1.00 release!
- Larry
2004-04-14 17:51:38 +00:00
Eric Andersen
66a56aa028
Vladimir N. Oleynik writes:
...
Hi.
Last changes (rev 1.12) to recursive_actions() by Christian Grigis
have problem.
Test for demonstrate:
$ mkdir aaa bbb ccc
$ su
# chown root bbb
# chmod 700 bbb
# exit
$ busybox chmod 777 -R .
./bbb: Permision denied
But "./ccc" mode not changed. Previous variant works fine,
errors skiped and continued recursion.
--w
vodz
2004-04-07 17:59:04 +00:00
Eric Andersen
3f47c453da
Christian Grigis, christian.grigis at smartdata dot ch writes:
...
Hello everyone,
Busybox's insmod fails to locate a module when that module is the only one
existing in the /lib/modules directory (with a unique name).
Example:
# find /lib/modules/ -type f
/lib/modules/kernel/drivers/char/bios.o
# insmod bios
insmod: bios.o: no module by that name found
# touch /lib/modules/dummy
# find /lib/modules/ -type f
/lib/modules/kernel/drivers/char/bios.o
/lib/modules/dummy
# insmod bios
Using /lib/modules/kernel/drivers/char/bios.o
As long as there is another file in the /lib/modules directory, insmod
finds it OK.
I tracked the problem down to 'check_module_name_match()' in insmod.c:
It returns TRUE when a match is found, and FALSE otherwise. In the case
where there is only one module in the /lib/modules directory (or more that
one module, but all with the same name), 'recursive_action()' will return
TRUE and we end up on line 4196 in 'insmod.c' which returns an error.
[The reason it works with more than one module with different
names is that in this case there will always be one not matching,
'recursive_action()' will return FALSE and we end up in line 4189.]
Now, from the implementation of 'recursive_action()' and from other
usages of it (tar.c, etc.), it seems to me that FALSE should be returned
to indicate that we want to stop the recursion, so TRUE and FALSE should
be inverted in 'check_module_name_match()'.
At the same time, 'recursive_action()' continues to recurse even after
the recursive call has returned FALSE; again in my understanding and
other usages of it, we can safely stop recursing at this point.
Here is my patch against 1.00-pre8:
2004-04-06 11:56:26 +00:00
Eric Andersen
8ee2b27f0c
Add missing include files
2004-03-27 11:26:32 +00:00
Eric Andersen
70060d25d2
s/fileno\(stdin\)/STDIN_FILENO/g
...
s/fileno\(stdout\)/STDOUT_FILENO/g
2004-03-27 10:02:48 +00:00
Eric Andersen
97310d0253
Brian Pomerantz writes:
...
I've noticed a bug in the "autowidth" feature more, and is probably in
others. The call to the function get_terminal_width_height() passes
in a file descriptor but that file descriptor is never used, instead
the ioctl() is called with 0. In more_main() the call to
get_terminal_width_height() passes 0 as the file descriptor instead of
fileno(cin). This isn't a problem when you more a file (e.g. "more
/etc/passwd") but when you pipe a file to it (e.g. "cat /etc/passwd |
more") the size of the terminal cannot be determined because file
descriptor 0 is not a terminal. The fix is simple, I've attached a
patch for more.c and get_terminal_width_height.c.
BAPper
2004-03-23 23:15:36 +00:00
Eric Andersen
c7bda1ce65
Remove trailing whitespace. Update copyright to include 2004.
2004-03-15 08:29:22 +00:00
Manuel Novoa III
7d0c51919c
In spite of the feature freeze, check in a complete rework of route which
...
fixes some bugs, adds some error checking, and removes _lots_ of bloat.
Text size on i386...
old new
ipv6 5425 3523
no ipv6 3143 2193
2004-03-10 07:42:38 +00:00
Manuel Novoa III
948d4907a0
My bug. :-(
2004-03-08 05:44:30 +00:00
Eric Andersen
2479445562
Fix/eliminate use of atol
2004-03-06 22:11:45 +00:00
Manuel Novoa III
adab517f76
Don't build these support functions for uClibc, as it always supplies
...
versions.
2004-03-06 00:32:54 +00:00
Glenn L McGrath
d2b860fecb
Patch from Vernon Sauder.
...
The off_t type is not a consistent size; it depends on the kernel options
(something about large file support). Therefore, the format string for
printing an address is not always the same.
2004-03-05 05:47:19 +00:00
Glenn L McGrath
181f0773e2
bb_full_fd_action was incorrectly returning an error message causing
...
major breaking.
2004-02-23 08:11:07 +00:00
Eric Andersen
817565a0ff
For the time being, revert the changes for detecting copying
...
a directory into itself. It is harder to do this correctly
than it appears. Not trying at all seems a better compromise
for the time being, untill we can implement this correctly.
2004-02-22 11:46:49 +00:00
Glenn L McGrath
15c3512614
Sometimes i get carried away with the use of function pointers, im sure
...
it seemed like a good idea at the time.
2004-02-21 09:20:56 +00:00
Eric Andersen
e7d244cc96
Chris Larson (kergoth) writes:
...
As Manuel points out, this is a flawed fix, and doesnt fix the
following:
mkdir -p cpa cpb cpc
cp -a cpa cpa/cpb/cpc
Attached what appears to be a more sane fix. Apply on top of previous.
Please confirm sanity.
2004-02-19 01:52:29 +00:00
Eric Andersen
e0cbe48637
Chris Larson (kergoth) writes:
...
I was adding -s/--symbolic-link support to busybox cp when I noticed a
bug with -r/-a. Test case:
mkdir -p test/out
cd test
busybox cp -a * out/
Will never return until we run out of open files or similar.
Coreutils cp on the other hand will error with "cannot copy a directory,
`out', into itself, `out'". Patch attached.
2004-02-19 00:44:08 +00:00
Eric Andersen
ec359e9ebb
Accomodate the fact that newer libc versions may in fact not
...
contain query_module and friends and more
2004-02-13 08:09:43 +00:00
Eric Andersen
ef8cd3be17
Make the loop support stuff be much less evil, and make it cope
...
with 2.6.x asm/posix_types.h, which has done singularly evil thing
by yanking __kernel_dev_t and renaming it. The loop interface was
really poorly designed in the first place. The new 64 bit loop
interface looks to be somewhat less horrible, too bad it is only
present in 2.6.x kernels.
-Erik
2004-02-06 07:16:36 +00:00
Eric Andersen
54426d5297
Vladimir N. Oleynik writes:
...
Ok. I found my mistake :(
The trivial patch attached.
--w
vodz
2004-02-05 13:49:29 +00:00
Eric Andersen
4575bbf7b8
The variable 'complementaly' used to be allocated with calloc, which zeroed it
...
out during the allocation process. When vodz changed it to be allocated on the
stack, he forgot to explicitly zero it, leaving its value filled with whatever
used to be sitting on the stack. It would garbage values, depending on the
garbage that happened to be sitting on the stack when the function was called.
The result was that applets using bb_getopt_ulflags() were showing
unpredictable behavior (such as segfaults), which naturally broke many things.
2004-02-04 10:48:37 +00:00
Eric Andersen
0f56de665c
s/u_int/unsigned int/g
...
s/u_short/unsigned short/g
2004-01-30 22:52:27 +00:00
Eric Andersen
ad84a516bb
Use proper C99 types throughout. So not use silly typedefs.
2004-01-30 22:31:58 +00:00
Manuel Novoa III
ebce2daa60
Support new uClibc stdio core.
2004-01-30 21:44:20 +00:00
Eric Andersen
f88bb72f1f
Apply a couple of optimizations
2004-01-29 22:33:28 +00:00
Eric Andersen
242ab83499
Teach busybox ps to get the correct uid when displaying stuff
2004-01-27 20:17:39 +00:00
Glenn L McGrath
85c5152cb8
Vodz, last_patch_123, patch have new version getopt_ulflags.
...
- size reduced 34 bytes
- don`t use dynamic memory allocation
- small indent correction.
2004-01-22 07:10:13 +00:00
Glenn L McGrath
a1e4a0ef67
Patch from Atsushi Nemoto, recent MIPS kernel headers
...
does not provide PAGE_SHIFT for userland (because now mips-linux kernel
supports PAGESIZE other than 4K).
2004-01-21 11:36:44 +00:00
Glenn L McGrath
036dbaa082
Modify bb_lookup_port to allow the protocol to be specified, allowing
...
/etc/services support for inetd, netcat and tftp.
2004-01-17 05:03:31 +00:00
Eric Andersen
1cda715bbc
Fix a bug where mount could check the wrong device. st_rdev is the correct
...
device ID iff the named file is a character or block special device. Otherwise
it is meaningless junk, in which case st_dev should be used. This was done
incorrectly, which could cause mount to display bogus mount info.
-Erik
2004-01-13 11:39:22 +00:00
Glenn L McGrath
447bc2d17f
Patch from Matt Kraai to fix debian bug #227081
...
cp does not truncate existing destinations. That is, after
running
echo foo > foo
echo fubar > fubar
cp foo fubar
the contents of fubar are
foo
r
instead of
foo
2004-01-11 05:20:59 +00:00
Eric Andersen
3a5ed56803
fix broken formatting
2003-12-23 20:37:54 +00:00
Eric Andersen
9cccc18141
don't mess up errno
2003-12-23 20:37:23 +00:00
Eric Andersen
0933a92f5a
bother. It seems I can't read.
2003-12-20 10:23:28 +00:00
Eric Andersen
f295b5a408
doh!
2003-12-20 09:17:50 +00:00
Eric Andersen
a8d82fe52e
Try to accomodate systems that do not define PAGE_SHIFT
2003-12-20 07:26:10 +00:00
Glenn L McGrath
f62ea20aff
Use low level file descriptors to match bb_copyfd_eof
2003-12-20 04:38:01 +00:00
Glenn L McGrath
ffccf6eb5d
Change interface to bb_lookup_host, dont try and set port inside this
...
function as there is no gracefull way of handling failures.
Rename bb_getport to bb_lookup_port, allow a default port to be
specified so it always returns a correct value.
Modify ftpgetput/rdate/wget to use the new interface.
wget/rdate now use etc/services with a falback default value.
2003-12-20 01:47:18 +00:00
Glenn L McGrath
28c111e1c5
Allow escaped 8 bit characters in bb_opt_complementaly
2003-12-19 12:03:18 +00:00
Glenn L McGrath
850b05fbde
Fix a bug preventing use of escaped characters that use the signed bit
2003-12-19 10:13:10 +00:00
Russ Dill
a1fece2c70
Get vfork_daemon_rexec working under uclinux
2003-12-15 21:57:44 +00:00
Glenn L McGrath
c3498f678a
When a size of 0 is passed to copyfd_size, dont do anything, it was
...
reading untill eof which breaks tar
2003-11-24 23:50:07 +00:00
Glenn L McGrath
f0515dad66
Fix warning
2003-11-22 02:13:41 +00:00
Glenn L McGrath
7ffe133864
As we no longer use function pointers for read in common archiving code
...
archive_xread can be replaced with bb_full_read, and archive_copy_file
with bb_copyfd*
bb_copyfd is split into two functions bb_copyfd_size and bb_copyfd_eof,
they share a common backend.
2003-11-21 22:24:57 +00:00
Glenn L McGrath
78cd84da8a
Dont over-read fd, use function pointer for hash function.
2003-11-20 21:30:58 +00:00
Glenn L McGrath
0413af0e27
Superficial changes
2003-11-20 06:27:33 +00:00
Glenn L McGrath
d2a897aab0
Merge common parts of sha1sum and md5sum, which is everything except the
...
algorithms.
Move algorithms to hash_fd and make them available via a common
function.
2003-11-10 04:33:55 +00:00
Eric Andersen
04d055f4e1
Fix rdate and ftpget/ftpput so they compile with the new xconnect.
...
I have checked rdate. Someone should also check ftpget/ftpput to
be sure they still work.
2003-11-03 21:20:18 +00:00
Eric Andersen
e6dc439b3a
Rework wget, the xconnect interface, and its various clients
...
in order to fix the problems with round robin DNS reported
by Andrew Flegg:
http://busybox.net/lists/busybox/2003-October/009579.html
This removes the ipv6 specific xconnect dns lookups. I do
not see why that would need to be special cased for ipv6 as
was done, but that will just have to be tested.
So IPV6 people -- please test this change!
-Erik
2003-10-31 09:31:46 +00:00
Eric Andersen
9ef6c93090
Patch from Arthur Othieno to fix a compiler warning
2003-10-22 10:26:38 +00:00
Eric Andersen
976a55e168
make this a little bit less messy
2003-10-22 10:23:04 +00:00
Glenn L McGrath
fe4704e948
Fix an ommision preventing building, patch by Tito.
2003-10-09 13:40:17 +00:00
Eric Andersen
dae099b2f9
We did not have a safe_write, which is the analog to safe_read. Convert
...
full_write to use safe_write internally, which is needed to guarantee proper
behavior, i.e. when writing to a pipe.
2003-10-09 08:35:42 +00:00
Glenn L McGrath
9d1a33c690
Vodz last_patch_105 without his xargs patch which doenst apply cleanly
2003-10-06 13:23:06 +00:00
Glenn L McGrath
eebcc1d98a
Add the "install" applet, move get_ug_id to libbb as its used by chown,
...
chgrp and install.
2003-09-24 03:22:57 +00:00
Glenn L McGrath
2570b43e82
Configuration option to define wether to follows GNU sed's behaviour
...
or the posix standard.
Put the cleanup code back the way it was.
2003-09-16 05:25:43 +00:00
Glenn L McGrath
96fd1b98f1
Compile get_terminal_width_height
2003-09-16 00:50:36 +00:00
Eric Andersen
8efe967018
Be entirely consistant when using ioctl(0, TIOCGWINSZ, &winsize)
...
to ensure proper fallback behavior on, i.e. serial consoles.
-Erik
2003-09-15 08:33:45 +00:00
Glenn L McGrath
99bd5adf99
more crond+crontab integrating with loginutil libbb functions and deleted
...
patch from Thomas Gleixner to init.
Viodz last_patch_108
2003-09-03 12:18:42 +00:00
Glenn L McGrath
dc4e75ef7c
move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one
...
constant.
Vodz last_patch_107
2003-09-02 02:36:18 +00:00
Glenn L McGrath
005f83adf5
Fix compile error and reducing size for libbb/get_console.c to previous size.
...
Vodz last_patch106
2003-09-01 08:53:32 +00:00
Glenn L McGrath
502907f5b3
The default behaviour for run-parts is corrected to continue if an error
...
is encountered in a script.
Patch by Philip Blundell
2003-08-30 12:27:36 +00:00
Glenn L McGrath
72f5f02184
Remove some unwanted code, patch from Holger Schurig, confirmed by vodz
2003-08-29 16:19:03 +00:00
Glenn L McGrath
b54a748621
Fix for compiling with ipv6
2003-08-29 11:34:08 +00:00
Eric Andersen
97e2426582
"staywithu" writes:
...
In BusyBox v1.00-pre2,
commands like ls, df with -h option report a wrong file size for files larger than 4GBtye!!
For example,
when I execute 'ls -l', it reports
-rw-r--r-- 1 root root 5368709120 Aug 17 2003 large_stream.tp
when I execute 'ls -lh', I expect that
-rw-r--r-- 1 root root 5.0G Aug 17 2003 large_stream.tp
but it reports
-rw-r--r-- 1 root root 1.0G Aug 17 2003 large_stream.tp
I fixed this bug that...
Line 31 in libbb/human_readable.c and line 275 include/libbb.h
const char *make_human_readable_str(unsigned long size
=> const char *make_human_readable_str(unsigned long long size
It's OK!
2003-08-22 23:08:37 +00:00
Manuel Novoa III
062913f662
Fix a bug reported by junkio@cox.net involving the mode_chars index.
2003-08-14 02:28:49 +00:00
Eric Andersen
9089844382
Latest dash update from vodz
2003-08-06 11:20:52 +00:00
Eric Andersen
481772a4c2
Patch from vodz to cleanup libbb/obscure.c:password_check()
...
to not copy too much data.
2003-08-06 08:33:08 +00:00
Eric Andersen
5378fbcb33
Joe.C writes:
...
I've reported this bug in April and it still
exists in 1.00-pre2. So I made patches for
both 0.60.x and 1.00-pre2. The patch is very
simple, just use strncmp instead of strcmp.
Please apply if it is OK.
Here's the procedure to test this problem:
Create a executable with very long name, say
'test_1234567890123456' and execute it. Try
using 'killall' or 'pidof' to find/kill this
program. Without this patch, you can't find
the program.
2003-08-06 08:22:10 +00:00
Manuel Novoa III
b1d5b741ac
Save 0.5K.
2003-08-02 00:04:18 +00:00
Eric Andersen
3124a9ecee
Vladimir N. Oleynik writes:
...
This moment have algoritmicaly problem, not overflow:
strcat(wrapped, wrapped) - may be looped.
Hand patch:
- else if (strstr(strcat(wrapped, wrapped), newmono))
+ else {
+ safe_strncpy(wrapped + lenwrap, wrapped, lenwrap + 1);
+ if (strstr(wrapped, newmono))
+}
--w
vodz
2003-07-30 07:57:06 +00:00
Eric Andersen
2a186890ee
Bruno Randolf writes:
...
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
2003-07-29 07:05:40 +00:00
Eric Andersen
35e643b39f
last_patch95 from vodz:
...
Hi.
Last patch have new libbb function
vfork_rexec() for can use daemon() to uClinux system.
This patched daemons: syslog, klogd, inetd, crond.
This not tested! I havn`t this systems.
Also. Previous patch for feature request MD5 crypt password for
httpd don`t sended to this mailist on 07/15/03
(mailist have Pytom module problem?).
The previous patch included, and have testing.
--w
vodz
2003-07-28 07:40:39 +00:00
Eric Andersen
f96675bc50
James Petterson writes:
...
I've found a possible bug in libbb/interface.c, in function
if_readlist_proc(). This function calls get_name(), and passes
as an argument 'name', a buffer of 16 bytes (IFNAMSIZ). The
function get_name(), however, may use more than 16 bytes,
when it is searching for aliases. Even if you don't have an
alias interface, you can run into trouble if the interface
has received more than 99999999 bytes, in which case the
space between the interface name and the rx stats
disappears, as in the /proc/net/dev example below:
wan0.200:264573315 462080 ...
In this case get_name() correctly identifies the interface name
as "wan0.200", but to do that it uses 18 bytes of the 'name'
buffer, which could lead to an unpredictable error.
A simple solution would be to increase the size of the buffer:
2003-07-28 06:37:04 +00:00
Eric Andersen
85e5e72bc1
Remove remaining libc5 support code
2003-07-22 08:56:55 +00:00
Eric Andersen
cb81e6484d
Update a bunch of docs. Run a script to update my email addr.
2003-07-14 21:21:08 +00:00
Eric Andersen
9f894f4062
Fixup compile problem with dmalloc
2003-07-05 22:15:43 +00:00
Eric Andersen
9e48045e45
Patch from Russell Coker:
...
I've attached my latest SE Linux patch for busybox against the latest CVS
version of busybox.
2003-07-03 10:07:04 +00:00
Eric Andersen
a5c488449e
Using safe_read seems, well, safer...
2003-07-03 09:48:07 +00:00
Eric Andersen
a3bb3e6e0b
Geir Thomassen wrote, regarding networking/httpd.c line 1358
...
Hello, I think the test for an unconfigured httpd is wrong in
the CVS (busybox-unstable-20030620.tar.bz2)
flg_deny_all is default 0
vodz then wrote:
Oops. You are right.
Also, this mistake haved from two place.
Last patch rewroted to my new get_ularg() function for overcompensate size
from this error found ;-)
2003-06-26 09:05:32 +00:00
Eric Andersen
dd92c77bb0
Don't shadow a paramater
2003-06-20 09:25:34 +00:00
Eric Andersen
8876fb2f59
last_patch89 from vodz:
...
Manuel,
I rewrite bb_getopt_ulflags() function for more universal usage.
My version support now:
- options with arguments (optional arg as GNU extension also)
- complementaly and/or incomplementaly and/or incongruously and/or list
options
- long_opt (all applets may have long option, add supporting is trivial)
This realisation full compatibile from your version.
Code size grow 480 bytes, but only coreutils/* over compensate this size
after using new function. Last patch reduced over 800 bytes and not full
applied to all. "mkdir" and "mv" applets have long_opt now for demonstrate
trivial addition support long_opt with usage new bb_getopt_ulflags().
Complementaly and/or incomplementaly and/or incongruously and/or list options
logic is not trivial, but new "cut" and "grep" applets using this logic
for examples with full demostrating. New "grep" applet reduced over 300
bytes.
Mark,
Also. I removed bug from "grep" applet.
$ echo a b | busybox grep -e a b
a b
a b
But right is printing one only.
--w
vodz
2003-06-20 09:01:58 +00:00
Glenn L McGrath
24833430bc
Vodz, last_patch_88
2003-06-10 17:22:49 +00:00
Eric Andersen
d130973f34
Put this back the way it was. I misunderstood what vodz was doing.
2003-05-27 20:45:59 +00:00
Eric Andersen
82ab3d7c3e
Make all syscall declarations use the syscall() function
2003-05-26 18:48:56 +00:00
Eric Andersen
b0cfca7544
This was doing some silly stuff that is not necessary when using
...
vfork(), so I have simplified it.
2003-05-26 18:12:00 +00:00
Eric Andersen
fab3e12cec
Skip printing "/proc/%d/cmdline" stuff when it is not relevant
2003-05-26 18:07:30 +00:00
Eric Andersen
64191c3896
Remove cruft
2003-05-26 18:06:20 +00:00
Glenn L McGrath
393183dccc
Vodz, last_patch_86
2003-05-26 14:07:50 +00:00
Glenn L McGrath
74fcbb0f7d
Fix \l so it doesnt print the character as well as the tty, from old
...
patch by Nick Fedchik
2003-05-13 13:28:25 +00:00
Eric Andersen
7b3edeb14d
Patch from Dmitry V. Levin to fix a fd leak
2003-05-02 16:25:01 +00:00
Glenn L McGrath
923dd79af7
sync with waldi
2003-04-21 10:26:39 +00:00
Eric Andersen
4a11e0fb45
Patch from David Updegraff to use calloc so that forward pointers start out
...
NULL, and so it can handle format strings that have stuff _after_ the last %?
specification
2003-04-19 23:18:35 +00:00
Eric Andersen
343658582b
Minor .o file naming change
2003-04-16 23:02:35 +00:00
Manuel Novoa III
ea4c43445c
Restrict octal perms to <= 07777. Cosmetic error message change.
2003-03-19 18:09:03 +00:00
Manuel Novoa III
1cb1b64c35
Obligatory forgotten item.
2003-03-19 09:42:33 +00:00
Manuel Novoa III
cad5364599
Major coreutils update.
2003-03-19 09:13:01 +00:00
Eric Andersen
6067c08145
With nightmares of libbb ending up with 100 .c files starting
...
with "bb_" it seems best to rename this now and avoid starting
an evil KDE style naming trend.
2003-03-07 17:43:32 +00:00
Eric Andersen
a9c6bc41e9
Define bb_xgetlarg as a standard interface for extracting
...
numbers from getopt which includes careful error checking.
-Erik
2003-03-07 17:29:12 +00:00
Eric Andersen
a0ac4523b1
Write all the help text for the util-linux utilities. Allow
...
people to locate the mtab file somewhere other that /etc to
accomodate read only root filesystems.
-Erik
2003-02-27 03:14:04 +00:00
Glenn L McGrath
883d4842d2
Fix compiler warnings, patch by Steven Scholz
2003-02-09 22:40:34 +00:00
Glenn L McGrath
6af21c2afa
Login prompt function, part of waldi's telnetd from inetd patch
2003-01-21 20:59:34 +00:00
Glenn L McGrath
9e5d6c002c
run telnet from inetd, present login prompt if login is configured,
...
patch from Bastian Blank
2003-01-21 20:55:56 +00:00
Glenn L McGrath
2e51a14d57
New test mode that allows run_parts to fail silently if the directory
...
is not found. Patch from Bastian Blank
2003-01-20 23:50:59 +00:00
Glenn L McGrath
aad465efb7
Make test mode output same as official version
2003-01-20 23:34:12 +00:00
Eric Andersen
ab4e19afc6
Eliminate most instances where we use linux kernel headers
...
-Erik
2003-01-14 08:54:08 +00:00
Glenn L McGrath
b4a1baa312
Correct some init issues, update email address, last_patch78 by Vladimir
...
N. Oleynik
2003-01-13 22:09:50 +00:00
Tim Riker
cf93274663
rmmod -a removed modules recursively
2002-12-14 01:58:59 +00:00
Glenn L McGrath
25fe94fd32
Merge copyfd and copy_file_chunk
2002-12-13 08:20:44 +00:00
Glenn L McGrath
66125c8065
Move add_to_list from libunarchive to libbb so it can be of more general use (eg ifupdown). Changed the name to llist_add_to as i plan on adding more llist_ functions as needed (e.g. llist_free).
2002-12-08 00:54:33 +00:00
Glenn L McGrath
346cdb1dde
Re-sort filenames to alphebetical order.
2002-12-07 23:56:14 +00:00
Glenn L McGrath
4a6b4e393c
Commit to reverse my previous commit, isnt cvs supposed to have some undo command ?
2002-12-07 23:30:11 +00:00
Glenn L McGrath
4e05b9b043
include "busybox" after the libc includes tofix compile errors
2002-12-07 23:14:40 +00:00
Eric Andersen
deca106b6d
Kill CONFIG_FEATURE_USE_DEVPS_PATCH and the devps patch. I'm not
...
maintaining it anymore, and it is now terribly out of date.
-Erik
2002-12-05 07:24:08 +00:00
Glenn L McGrath
bf91f2eb1b
Save 10 bytes or so, last_patch_70 from Vladimir N. Oleynik
2002-12-03 20:34:36 +00:00
Glenn L McGrath
09adaca37d
last_patch_69, 8 bit clean and other fixes from Vladimir N. Oleynik
2002-12-02 21:18:10 +00:00
Glenn L McGrath
b963875a3e
Move compare_string_array to libbb
2002-12-02 00:01:36 +00:00
Glenn L McGrath
68d949956a
Use error_msg instead of fprintf(stderr
2002-11-28 10:35:40 +00:00
Glenn L McGrath
b2e28a0e35
Use error_msg instead of fprintf(stderr
2002-11-28 10:27:50 +00:00
Glenn L McGrath
b122217d90
Use error_msg( instead of fprintf(stderr
2002-11-28 10:25:19 +00:00
Glenn L McGrath
642f28903a
Use error_msg instead of fprintf(stderr, other minor cleanups
2002-11-28 10:20:45 +00:00
Glenn L McGrath
30db423e11
Style, minor cleanups
2002-11-28 09:52:23 +00:00
Glenn L McGrath
8ae4cab4a8
use #ifdef CONFIG_* instead of #if CONFIG_*
2002-11-26 09:02:06 +00:00
Glenn L McGrath
d7fb1b372c
Use #ifdef instead of #if
2002-11-26 02:40:56 +00:00
Glenn L McGrath
393ad1a834
Handle name entries that have a \0 in them, last_patch_65 from Vladimir N. Oleynik
2002-11-25 22:31:37 +00:00
Glenn L McGrath
5b110874df
Dont need a seperate function
2002-11-24 23:22:29 +00:00
Glenn L McGrath
822e7fd587
When making parent directories set permissions based on the base parent tree rather than the new directory to be created.
2002-11-24 22:48:20 +00:00
Glenn L McGrath
7b1eca265a
include libbb after stdlib.h as it breaks dmalloc
2002-11-24 01:32:56 +00:00
Glenn L McGrath
157fea5960
Fix a vfork bug, by Nick Fedchik and Vladimir N. Oleynik
2002-11-21 22:17:11 +00:00
Glenn L McGrath
39289b54a7
Use vfork, by vodz
2002-11-15 22:18:01 +00:00
Glenn L McGrath
545106f8db
Move awk from textutils to editors. Cleanup run-parts, saves 200 bytes, moves the guts of run_parts to libbb to be used by ifupdown.
2002-11-11 06:21:00 +00:00
Glenn L McGrath
237ae42fc9
Abstract read and seek in unarchiving code, convert bunzip to file descriptors, support tar -j
2002-11-03 14:05:15 +00:00
Eric Andersen
44608e9693
Patch last_pach62 from vodz. This patch moves all the /proc parsing
...
code into libbb so it can be shared by ps, top, etc, saving over 1.5k.
2002-10-22 12:21:15 +00:00
Glenn L McGrath
9ffd5776eb
Move unzip.c uncompress.c from libbb to archiveal/libunarchive
2002-10-22 01:07:32 +00:00
Glenn L McGrath
0d53ebdc52
gz_open is used anymore, use inflate directly, see how its done in get_header_tar_gz
2002-10-21 06:29:55 +00:00
Glenn L McGrath
4298e87fa5
Dont try and make the "/" directory
2002-10-19 23:56:41 +00:00
Eric Andersen
71ae64bdc6
last_patch61 from vodz:
...
New complex patch for decrease size devel version. Requires previous patch.
Also removed small problems from dutmp and tar applets.
Also includes vodz' last_patch61_2:
Last patch correcting comment for #endif and more integrated
with libbb (very reduce size if used "cat" applet also).
Requires last_patch61 for modutils/config.in.
2002-10-10 04:20:21 +00:00
Eric Andersen
02e6ba91e8
Vodz' last_patch57:
...
Hi, Erik.
my_getpw(uid/gid) and applets used it have problem:
if username for uid not found, applets can`t detect it
(but code pessent). Also "%8ld " format is bad:
spaces not required (applets have self format
or spec format (tar applet) and overflow for "id" applet...)
This problem also pressent in stable version.
Patch for unstable in attach.
--w
vodz
2002-09-30 20:39:56 +00:00
Glenn L McGrath
891ee641cb
Fail straight away rather than recursively printing error messages :)
2002-09-28 08:30:47 +00:00
Glenn L McGrath
2e41d0cb77
Fix compress support and prevent a segfault
2002-09-27 06:46:02 +00:00
Glenn L McGrath
7ca04f328e
New common unarchive code.
2002-09-25 02:47:48 +00:00
Glenn L McGrath
b3f7261ffe
Fix error messages conditions, and make them the same as GNU mkdir.
2002-09-22 02:12:30 +00:00
Eric Andersen
a9a220b92a
last_patch56 from vodz to simplify copy_file logic
2002-09-17 08:42:21 +00:00
Eric Andersen
7365c58783
Use "MiB" not "Mb"
...
-Erik
2002-09-17 06:36:56 +00:00
Eric Andersen
02b8dfc524
Let people force overwrite links
...
-Erik
2002-09-16 10:23:38 +00:00
Eric Andersen
403a73a351
Properly honor FILEUTILS_INTERACTIVE and FILEUTILS_FORCE for
...
file all file types (not just regular files and dirs). Unlink
destination files when needed.
-Erik
2002-09-16 09:23:22 +00:00
Eric Andersen
8fede28c74
Patch from Matthias Lang <matthias@corelatus.se> to fix gunzip
...
error handling and prevent gunzip from hanging.
2002-09-16 07:25:41 +00:00
Eric Andersen
c38678d14b
Apply vodz' last_patch52
2002-09-16 06:22:25 +00:00
Manuel Novoa III
4d0884a1ea
Apply vodz's last_patch53.gz (bb_asprintf.c) and last_patch54.gz
...
(arith.c).
2002-09-12 14:52:26 +00:00
Glenn L McGrath
193697db4e
Dont return an error if the directory already existed
2002-08-24 20:11:38 +00:00
Glenn L McGrath
210aa14916
Fix warning
2002-08-24 20:00:52 +00:00
Glenn L McGrath
fbef225c4b
Rewrite, its smaller
2002-08-23 17:19:26 +00:00
Glenn L McGrath
de9e803149
Apply vodz last_patch51_2 and run through indent
2002-08-23 12:04:23 +00:00
Glenn L McGrath
1ed9dd9d06
Remove duplicate definitions, run through indent
2002-08-22 19:35:36 +00:00
Glenn L McGrath
4534af2763
replace some global const ints with defines
2002-08-22 19:31:35 +00:00
Glenn L McGrath
9fef17dec3
Run through indent, fix comments
2002-08-22 18:41:20 +00:00
Glenn L McGrath
3d184586a7
Fix dietlibc test condition
2002-08-15 03:29:56 +00:00
Eric Andersen
938e982c4d
Try to be a bit more dietlibc friendly
2002-08-13 09:57:44 +00:00
Robert Griebl
efd4983eb1
- Forgot to cvs add bb_asprintf.c (from vodz' patch #50 )
...
- Applied Joel Coltoff's xconnect patch:
On both my host system and with mipsel-linux for my embedded systems
the function getservbyname() gives the port number already in host order.
In fact, this is how it was used by rdate in version 0.60.3. The snapshot
I have of the development tree from July 12, 2002 takes the port number
and stuffs it into htons() before it uses it. This causes bugs in rdate,
telnet and wget. This patch fixes that.
2002-07-19 20:27:11 +00:00
Robert Griebl
d378c3149c
Applied vodz' patches #49 and #50 (with a small correction in runshell.c)
...
#49 : I found one memory overflow and memory leak in "ln" applet.
Last patch reduced also 54 bytes. ;)
#50 : I found bug in loginutils/Makefile.in.
New patch have also new function to libbb and
aplied this to applets and other cosmetic changes.
2002-07-19 00:05:54 +00:00
Eric Andersen
cafc103230
Brad Campbell <brad@seme.com.au> notes that
...
xconnect.c needs #include <netinet/in.h>
to compile if CONFIG_FEATURE_IPV6 is not defined
2002-07-11 10:40:43 +00:00
Eric Andersen
887ca79f04
Scrub pwd.h and grp.h handling so we don't have to play any
...
silly games.
-Erik
2002-07-03 23:19:26 +00:00
Eric Andersen
0b31586c71
A patch from Bart Visscher <magick@linux-fan.com> to add an
...
xconnect helper routine which does:
-address and port resolving
-tries to connect to all resolved addresses until connected
-uses getaddrinfo, so works for IPv6 too
This patch also ports rdate, telnet, and wget to use the new
xconnect function. Thanks Bart!
2002-07-03 11:51:44 +00:00
Eric Andersen
51b8bd68bb
This patch from Bart Visscher <magick@linux-fan.com> adds
...
IPV6 support to busybox. This patch does the following:
* Add IPv6 support to libbb
* Enable IPv6 interface address display
* Add IPv6 config option
* Adds ping6, an adaptation of the ping applet for IPv6
* Adds support routines for ping6:
- xgethostbyname2
- create_icmp6_socket
* Adds ifconfig support for IPv6
* Add support IPv6 to netstat
* Add IPv6 support to route
Thanks Bart!
2002-07-03 11:46:38 +00:00
Eric Andersen
7234c3a0b6
Cleanup shadow.h stuff so it behaves as intended
...
-Erik
2002-07-03 04:47:43 +00:00
Aaron Lehmann
69d4178708
Remove advertising clauses in accordance with
...
ftp://ftp.cs.berkeley.edu/ucb/4bsd/README.Impt.License.Change
2002-06-23 22:25:24 +00:00
Aaron Lehmann
ed11993900
Needs shadow.h; otherwise wont compile without CONFIG_USE_BB_SHADOW
2002-06-23 22:00:41 +00:00
Eric Andersen
27f64e1f4e
Port over the last of the tinylogin applets
...
-Erik
2002-06-23 04:24:25 +00:00
Matt Kraai
9ef2ea27d4
* libbb/copy_file.c (copy_file): Check st_dev instead of st_rdev.
2002-06-11 13:25:26 +00:00
Eric Andersen
77d22c4abd
Patch from Gyepi SAM <gyepi@praxis-sw.com>:
...
When DEBUG is defined
1. need to include resolv.h (for _resinit())
2. remove _() call around string. It appears to be a remnant of i18n or some such notion
2002-06-06 12:11:55 +00:00
Robert Griebl
ea1a63a201
Fix for broken handling off BusyBox's own pwd/grp implementations
...
[Parts of this patch may overlap with my other two patches]
2002-06-04 20:10:23 +00:00
Robert Griebl
94a6a956f0
Support old-style compress (.Z) files via libbb / unzip( ) calls
...
(configurable) - When enabled an applet "uncompress" is also made
available (oddname to gunzip)
[the cvs add for this file got lost somehow...]
2002-05-19 19:00:14 +00:00
Robert Griebl
f6495eb767
Support old-style compress (.Z) files via libbb / unzip( ) calls
...
(configurable) - When enabled an applet "uncompress" is also made
available (oddname to gunzip)
2002-05-15 22:13:47 +00:00
Eric Andersen
c8459a5a8f
Silly me
2002-04-13 14:44:42 +00:00
Eric Andersen
db7d5fca5f
Stupid gcc always includes its own builtin strlen()...
2002-04-13 13:02:03 +00:00
Eric Andersen
85208e2ab9
Completely rework the config system so that it no longer annoys me to work on
...
the busybox development tree. This eliminates the use of recursive make, and
once again allows us to run 'make' in a subdirectory with the expected result.
And things are now much faster too. Greatly improved IMHO...
-Erik
2002-04-12 12:05:57 +00:00
Eric Andersen
c7a3fb96d0
Fix devfs loop device support
2002-03-20 15:25:25 +00:00
Eric Andersen
89de1e7930
Reinitialize initial shift register value for on each pass.
...
-Erik
2002-03-20 13:30:40 +00:00
Eric Andersen
806c74fe19
Cleanup a libc5 compatibility hack
2002-03-12 00:35:40 +00:00
Matt Kraai
a99b194336
* libbb/xfuncs.c (xmalloc, xcalloc): Do not exit if a zero-length buffer is
...
requested.
(xrealloc): Simplify.
2002-02-26 15:28:22 +00:00
Matt Kraai
0733e840bd
chomp should only remove the newline if it occurs at the end of the input.
...
This was caught by the test suite (in sed/sed-aic-commands).
* libbb/chomp.c: Revert to revision 1.5.
2002-01-02 18:51:23 +00:00
Glenn L McGrath
87ac7028e0
unzip applet by Laurence Anderson
...
----------------------------------------------------------------------
2002-01-02 13:52:26 +00:00
Eric Andersen
79a466f128
optimize this a little bit.
2001-12-29 07:26:33 +00:00
Matt Kraai
1f0c43668a
Remove == TRUE' tests and convert
!= TRUE' and `== FALSE' tests to use !.
2001-12-20 23:13:26 +00:00
Matt Kraai
ace02dc9cd
Make cp and mv optionally preserve hard links.
2001-12-17 15:26:36 +00:00
Matt Kraai
14b7c5d12b
Open the source before creating the destination.
2001-12-11 16:43:48 +00:00
Eric Andersen
b24d65659f
If find_pid_by_name() had an error, it was returning -1, but storing
...
that into a pid_t, which is unsigned on a number archs. Furthermore,
find_pid_by_name() would _never_ return an error if the intended proces
was "init", but instead would return 1, meaning we would fail to work
on 2.4.x kernels running an initrd...
-Erik
2001-12-06 14:52:32 +00:00
Eric Andersen
db930948a9
More copyright and email addr cleanups
2001-12-06 08:20:14 +00:00
Eric Andersen
463304edfd
Silly cosmetic problem in the comment
2001-12-06 08:04:45 +00:00
Aaron Lehmann
b9df470c4d
Commit my improvement on Rodney Brown's patch to g(un)zip, decreasing
...
binary size.
2001-12-06 03:22:43 +00:00
Glenn L McGrath
249f39a265
Simplify unzip(), remove unused checks and unneccessary variables
2001-12-05 16:01:02 +00:00
Glenn L McGrath
ef03dbcd4d
Simplify CRC table generation
2001-12-05 13:08:03 +00:00
Manuel Novoa III
3280f9a3fc
New version to cut size. Includes optional basename() compatibility, but
...
enabling that would break the basename applet at least for one corner case.
2001-12-05 04:35:32 +00:00
Glenn L McGrath
38288bbf4c
gunzip was incorrectly reporting a failed crc and length (discovered by
...
Chang, Shu-Hao). The bitbuffer needs to be unwound after decompression,
as it was eating into the crc/size field.
2001-11-29 06:36:56 +00:00
Matt Kraai
355a61b56f
Treat NUL as the end-of-line.
2001-11-20 15:49:50 +00:00
Matt Kraai
5c2bbb55d7
Remove unnecessary errno handling.
2001-11-12 18:44:26 +00:00
Eric Andersen
c223ced0ea
I forgot to add these. Part of the patch from vodz
2001-11-10 12:18:42 +00:00
Eric Andersen
cd8c436d81
Latest patch from vodz:
...
-- reverse resolve network name and cache in route and ifconfig
applets, fix print nslookup server name if compile without
uClibc, fix route crashe 'route add', fix warnings compile
networking and pwd_grp applets
2001-11-10 11:22:46 +00:00
Glenn L McGrath
60281118d0
Introduce od and hexdump applets
2001-11-02 11:39:46 +00:00
Eric Andersen
8e392922b0
Be extra pedantic about printing the correct type for an address
2001-10-27 03:28:53 +00:00
Glenn L McGrath
9f2f8540c5
rEcover from my previous commit
2001-10-25 14:59:48 +00:00
Glenn L McGrath
633f153808
Move libbb/unarchive functions to ./archival/libunarchive
2001-10-25 14:53:50 +00:00
Glenn L McGrath
0d2fb76c11
Modify applets to use libunarchive
2001-10-25 14:26:05 +00:00
Eric Andersen
bdfd0d78bc
Major rework of the directory structure and the entire build system.
...
-Erik
2001-10-24 05:00:29 +00:00
Eric Andersen
9260fc5552
Accomodate older glibc, which also lacks the module syscalls
2001-10-24 00:44:11 +00:00
Matt Kraai
bcca3317b5
Return NULL if EOF is encountered before terminating_string.
2001-10-18 17:04:22 +00:00
Eric Andersen
a0f0ae5a7a
Revert that change. As Matt Kraai rightly points out,
...
this is not a bug. What I was I thinking when I committed
this. Doh!
2001-10-18 06:04:23 +00:00
Eric Andersen
74400ccfd0
Scrub up some function prototypes.
...
-Erik
2001-10-18 04:11:39 +00:00
Eric Andersen
1bf25f0307
Patch from Stefan Soucek <ssoucek@coactive.com> to
...
ignore extra empty lines in fgets_str
2001-10-18 03:20:41 +00:00
Glenn L McGrath
4bef7b4186
unarchive function changed to support both exclude and include lists, applets that use unarchive changed to match.
2001-10-13 19:43:46 +00:00
Glenn L McGrath
527880e5cf
match exclude/include names with trailing '/'
2001-10-13 06:53:34 +00:00
Glenn L McGrath
b5937d3eea
Use fnmatch() to compare excluded/included files
2001-10-13 06:21:32 +00:00
Glenn L McGrath
9b2589dafd
Cleanup memory usage properly
2001-10-08 13:10:12 +00:00
Glenn L McGrath
dfa7b0eff6
Free some variables after use
2001-10-08 08:22:48 +00:00
Matt Kraai
4c557bf576
Invert FILEUTILS_PRESERVE_SYMLINKS into FILEUTILS_DEREFERENCE.
2001-10-05 01:35:10 +00:00
Matt Kraai
54a992d81e
Fix BB_FEATURE_MTAB_SUPPORT test (report and patch by Magnus Damm).
2001-10-04 15:23:34 +00:00
Glenn L McGrath
c5bd149261
List full path instead of relative path if prefix is specified (this was supposed to be in last patch)
2001-09-24 18:34:06 +00:00
Manuel Novoa III
6a9d1f652b
Commit my changes to arith.c which fixed a couple of bugs and decreased
...
code size. Please read the TODO comments regarding accessing shell
variables from the arith() funciton.
2001-09-11 01:11:31 +00:00
Matt Kraai
5078919981
Use the correct buffer when calling dirname, improve an error message, and
...
plug some memory leaks. Patch by Laurence Anderson.
2001-08-28 22:57:38 +00:00
Matt Kraai
80f6d55836
Eliminate improper consts and allow standard version to override.
2001-08-24 20:35:45 +00:00
Matt Kraai
ac20ce1924
Canonicalize dirname(3) behavior.
2001-08-24 19:51:54 +00:00
Matt Kraai
2a953aed38
Fix a memory leak if parent directory creation failed.
2001-08-24 19:07:31 +00:00
Eric Andersen
c0f9d0dce7
Add #include <sys/param.h> to ensure PATH_MAX is defined
2001-08-22 05:35:39 +00:00
Eric Andersen
75220b55ff
dfp might be used uninitialized. NULL it.
2001-08-21 23:36:32 +00:00
Matt Kraai
0a68590314
Rewritten by Manuel Novoa III.
2001-08-14 17:10:08 +00:00
Matt Kraai
a7cecbc917
Commit Vladimir's simplify_path.
2001-08-10 15:05:27 +00:00
Glenn L McGrath
b373a8d0ca
Fix exclude list handling
2001-08-04 05:28:29 +00:00
Eric Andersen
be0c36009a
More libc5 fixups
...
-Erik
2001-08-02 10:55:32 +00:00
Eric Andersen
23b1e5c7df
Some libc5 cleanups
2001-08-02 09:58:41 +00:00
Eric Andersen
879d6c85af
make_directory used mode as if it were an signed entity, but in fact
...
it was a mode_t which is unsigned. Fix it to be signed...
-Erik
2001-08-02 09:58:19 +00:00
Eric Andersen
842757dc96
Oops. I forgot to commit this part of vodz' patch.
2001-08-02 05:18:55 +00:00
Eric Andersen
3450636169
Latest patch from vodz. Adds a check for divide by zero in the posix
...
math suport, cleaner math syntax error checking, moves redundant signal
string tables (from kill and ash) into libbb and provides a few
cleanups elsewhere.
2001-08-02 05:02:46 +00:00
Eric Andersen
74bcd16425
This incorporates Posix math support into ash. The Posix math support
...
was written by Aaron Lehmann <aaronl@vitelus.com> for busybox. This
patch makes a few trivial changes to Aaron's code so that it can be
used (in theory) by the other shells as well...
-Erik
2001-07-30 21:41:37 +00:00
Matt Kraai
439e3df653
Add support for devfs device names.
2001-07-23 14:52:08 +00:00
Eric Andersen
8d79ce8320
Some patches to make dietlibc work...
2001-07-22 23:00:15 +00:00
Eric Andersen
20aab260e2
Some adjustments, mostly from David McCullough <davidm@lineo.com> to
...
make busybox be more uClinux friendly. I also adjusted Config.h for
uClinux so it will automagically disable apps the arn't going to
work without fork() and such.
-Erik
2001-07-19 22:28:02 +00:00
Glenn L McGrath
c3fbec73fb
Change read_package_field interface, and rewrite using low level functions
...
Fixes for a few bugs that have crept into dpkg in the last few days
2001-07-18 15:47:21 +00:00
Glenn L McGrath
8d3b0497a4
Fix extract_archive so it doesnt mangle filenames, dont try and extract "./" and strip leading "./" on other files
2001-07-18 13:22:44 +00:00
Glenn L McGrath
6fc92a506a
Fail silently on failure to read tar header, its unfortunate that many tar implementations must be adding unwanted crap to the end of their archives.
...
It makes error reporting here more trouble than its worth
2001-07-18 03:23:10 +00:00
Eric Andersen
044228d5ec
This is vodz' latest patch. Sorry it took so long...
...
1) ping cleanup (compile fix from this patch already applied).
2) traceroute call not spare ntohl() now (and reduce size);
3) Fix for functions not declared static in insmod, ash, vi and mount.
4) a more simple API cmdedit :))
5) adds "stopped jobs" warning to ash on Ctrl-D and fixes "ignoreeof" option
6) reduce exporting library function index->strchr (traceroute), bzero->memset (syslogd)
2001-07-17 01:12:36 +00:00
Glenn L McGrath
51ded05b3b
enum entry for unarchive to be used by tar
2001-07-14 12:38:55 +00:00
Glenn L McGrath
a868ec89e8
Allow the unarchive() extract_list variable to be NULL, meaning extract all
2001-07-14 08:49:53 +00:00
Glenn L McGrath
3d46224b78
Return NULL if file doesnt open in deb_extract
2001-07-13 18:16:57 +00:00
Glenn L McGrath
cfeb08a193
Make sure there is a trailing '\0' when extracting to buffer.
2001-07-13 17:59:48 +00:00
Glenn L McGrath
5e66a26eaa
Dont setvbuff in here, must be called just after stream is initialised, glibc tolerates using it later, uclibc doesnt
2001-07-13 06:51:56 +00:00
Glenn L McGrath
b028e08d35
Move setvbuf calls from gz_open() to calling functions, setvbuf is only supposed to be called prior to opening the stream, glibc tolerates later use, uclibc doesnt.
2001-07-13 06:43:03 +00:00
Eric Andersen
7467c8d3b6
Patch from vodz:
...
Changed email address
cmdedit API change
optimizations for traceroute and md5sum
added a new shared create_icmp_socket() function
2001-07-12 20:26:32 +00:00
Glenn L McGrath
3e94f729a5
Quiet mode, sometimes error messages arent wanted
2001-07-12 10:24:57 +00:00
Glenn L McGrath
c127008840
Allow unarchive to redirect stdout (tobe used by dpkg applet)
2001-07-11 17:32:14 +00:00
Glenn L McGrath
481d19b38e
Fix bug where it wasnt returning the last line of a multiline field
2001-07-11 15:43:03 +00:00
Glenn L McGrath
daf0b78e1a
Reverse part of my previous changes
2001-07-11 15:32:52 +00:00
Glenn L McGrath
93febe672a
free coniditionally, just to make it play nice with dmalloc which is incompatable with standard free()
2001-07-11 07:25:01 +00:00
Glenn L McGrath
248c57ca43
minor dmalloc inspired cleanups
2001-07-11 07:22:17 +00:00
Eric Andersen
5a071bcbf2
Avoid a segfault (detected by Fabio Ferrari
...
<fabio.ferrari@digitro.com.br> in the wget applet) when
concat_path_file() or last_char_is() were fed a NULL.
-Erik
2001-07-07 04:27:35 +00:00
Matt Kraai
5009f90ea2
Removed obsolete function, strdup_substr.
2001-07-05 19:00:47 +00:00
Eric Andersen
8e75f6daa6
Fix a stupid thinko, and fix killall to cope with the updated
...
find_pid_by_name() interface
-Erik
2001-07-05 16:27:34 +00:00
Eric Andersen
d50a61956c
Implement suggestion from Adam Slattery, (don't default to killing closing bug #1190 .
2001-07-05 15:56:36 +00:00
Eric Andersen
0159597bd6
Generalize comment -- no longer ls specific
2001-06-30 18:08:36 +00:00
Manuel Novoa III
d877d44d12
All-integer version (but it does use an unsigned long long) which fixes
...
the problems of the previous version (used floating point, overflowed, didn't
round properly). The comments at the top of the file are worth reading;
especially note 2 concerning "ls -sh".
2001-06-30 07:40:44 +00:00
Manuel Novoa III
a2949aa217
Add some missing includes to kill warnings when building with the default
...
Config.h and using gcc's -fno-builtin. There are probably other files
with the similar problems.
Also, if building against uClibc, don't include asm/unistd.h in syscalls.c
and module_syscalls.c.
2001-06-29 18:59:32 +00:00
Eric Andersen
029b4a0422
Allow xrealloc to act as a free() when size=0, per SuS2.
...
-Erik
2001-06-28 21:22:19 +00:00
Eric Andersen
0d8cc1670c
Fix a type promotion bug discivered and analyzed by Alan Modra
...
<amodra@bigpond.net.au>, which caused false checksum errors
2001-06-27 06:15:50 +00:00
Eric Andersen
91a6318d55
Make it so we don't segfault when /proc isn't mounted -- guess pid 1...
...
-Erik
2001-06-26 22:44:09 +00:00
Eric Andersen
5ef5614c31
Don't use void * to pass pointers of known type
2001-06-26 16:36:26 +00:00
Glenn L McGrath
78b0e379d7
Vladimir's last_patch_15
2001-06-26 02:06:08 +00:00
Glenn L McGrath
2e6d3cfa82
Nore unarchive (and doc) fixes from Laurence Anderson
2001-06-24 12:36:54 +00:00
Glenn L McGrath
8f5b63edea
cpio applet, and changes to associated code
2001-06-22 09:22:06 +00:00
Matt Kraai
a0105713e8
Remove obsolete function declaration.
2001-06-22 04:20:24 +00:00
Eric Andersen
764303f980
stdlib.h defined free(), which this needs
2001-06-22 03:07:19 +00:00
Eric Andersen
30f1eafaaa
Fix the build process so it does not do the evil #ifdef BB_FOO stuff.
...
Build exactly one .o file per function, and let the linker throw away
the junk it doesn't want.
-Erik
2001-06-22 03:00:21 +00:00
Eric Andersen
6b03504441
Add in a missing header file
2001-06-22 02:58:45 +00:00
Glenn L McGrath
76ce7549ce
Dont change date or chmod on symlinks, lchown on symlinks if lchown available
2001-06-22 02:55:16 +00:00
Glenn L McGrath
9f832deecf
remove defines around unarchive, its always used
2001-06-22 02:27:55 +00:00
Tim Riker
837097648e
comment cleanup
2001-06-22 00:27:11 +00:00
Tim Riker
fbbd360b3c
create_path -> make_directory
2001-06-22 00:14:20 +00:00
Matt Kraai
ceeff73819
Rewrote mkdir (and touched lots of things in the process).
2001-06-21 19:41:37 +00:00
Glenn L McGrath
eb1c94078f
Reorganise unarchiving functions, more code re-use, only does single pass(no more linked lists), basis for supporting a cpio (and cheaper untar) applet, but cpio applet isnt included in this.
...
It effects ar, dpkg-deb applets only
2001-06-20 07:48:00 +00:00
Eric Andersen
32574a41b4
With a bit of care I was able to save about 100 bytes.
...
-Erik
2001-06-15 20:10:39 +00:00
Glenn L McGrath
6bad1fa1fd
This isnt used anymore, replaced by seek_sub_file() in ./libbb/deb_extract.c
2001-06-15 03:13:00 +00:00
Eric Andersen
f429baca86
I reworked make_human_readable_str so it now has a sane interface,
...
and then fixed up df, du, and ls to use the new interface. I also
fixed up some formatting issues in ls while I was in there.
-Erik
2001-06-13 08:02:45 +00:00
Glenn L McGrath
17822cd60a
Reorganise unarchive functions, new files, removed some
2001-06-13 07:34:03 +00:00
Glenn L McGrath
9aff903603
Reorganise archive extraction code
2001-06-13 07:26:39 +00:00
Matt Kraai
bf0a010cf7
Copy files until EOF, not the reported file size, to deal with bad sizes in
...
the proc filesystem.
2001-06-11 13:58:02 +00:00
Matt Kraai
5246225596
Add padding to struct sysinfo needed by m68k (note and patch by Richard
...
Hirst).
2001-06-08 13:57:27 +00:00
Eric Andersen
8b113f93b9
Vladimir's last_patch13, containing several bugfixes.
2001-06-01 21:47:15 +00:00
Eric Andersen
77d9268892
Patch from larry to fix some grammar errors.
2001-05-23 20:32:09 +00:00
Matt Kraai
774d135b66
Make more robust (patch by Larry Doolittle).
2001-05-23 14:45:09 +00:00
Matt Kraai
d6ef07406d
Rewrote copyfd to use library functions, terminate, and copy correct data.
2001-05-18 14:14:55 +00:00
Matt Kraai
231f998aba
Switch from hstrerror to herror for libc5 systems.
2001-05-17 14:19:05 +00:00
Matt Kraai
8f7a4ad442
Add missing include, noted by Larry Doolittle.
2001-05-16 17:05:03 +00:00
Matt Kraai
c55b8d41c1
Add xgethostbyname and herror_msg* functions.
2001-05-16 15:40:51 +00:00
Eric Andersen
55f9872616
This patch from Adam Heath <doogie@debian.org>, makes print_file
...
(used by cat, grep, sed, etc) quite a bit faster.
2001-05-15 17:48:09 +00:00
Eric Andersen
c911a4389b
Patch from Vladimir:
...
1) fixed a bug that could crash df, mount, and umount applets if the root
device name was longer then the word "root" (/dev/loop1 vs /dev/root) -
2) severl functions needed static declaration in the umount applet
3) update declaration for function in last_char_is() in libbb
2001-05-15 17:42:16 +00:00
Eric Andersen
14d354312a
Per suggestion from Vladimir, eliminate check_wildcard_match(), which
...
was only being used by insmod these days.
Also, I spent a minute adjusting insmod so that it first searches
/lib/modules/`uname -r` and then (if that fails) searches /lib/modules,
which makes bb insmod behave much more like the real insmod, and should
avoid nasty surprises (such as the recent "Modutils vs. Busybox..."
thread).
-Erik
2001-05-14 17:07:32 +00:00
Eric Andersen
5f265b755a
Fix a segfault in lash, hush, and cmdedit. Each of these used
...
xgetcwd, but did not check the return for a NULL, and then continued
to call strlen on the NULL when the cwd had been removed from under it.
-Erik
2001-05-11 16:58:46 +00:00
Matt Kraai
f3e79ba6e3
Fix symlink removal problem noted by Erik Andersen.
2001-05-11 02:35:36 +00:00
Eric Andersen
8cd16d8fd3
This syncs things with Vladimir's latest patches. Also gets
...
rid of useless 'const int' declarations.
-Erik
2001-05-07 23:11:23 +00:00
Eric Andersen
186bf1defc
This is Vladimir's update to last_char_is(). Since 'char *' is
...
the least common denominator, I modified it to use that (not const),
which will minimize the need for casting elsewhere.
2001-05-07 23:10:16 +00:00
Eric Andersen
f3f9f3efa7
A patch from Vladimir to simplify chomp()
2001-05-07 23:02:39 +00:00
Eric Andersen
4ad13e5d95
A patch from Vladimir to simplify concat_path_file() and
...
make it less likely to break.
2001-05-07 23:01:32 +00:00
Eric Andersen
28355a36da
Per some comments from Lars Kellogg-Stedman <lars@larsshack.org>,
...
make xreadlink() return NULL on failure, and make sure everyone
uses the interface correctly.
-Erik
2001-05-07 17:48:28 +00:00
Glenn L McGrath
6b8c550d88
include libbb.h after other includes
2001-05-05 03:19:12 +00:00
Eric Andersen
044a72d0d5
Larry suggested using concat_path_file() would be an even safer bet
...
for 'which'. I ageed, so I whipped this up -- which revealed a bug in
concat_path_file. It turns out that that a '/' can be appended from
either the path _or_ the filename, but only the former was checked.
-Erik
2001-05-04 22:04:24 +00:00
Eric Andersen
0e9aef36fa
Oops. I was a bit too hasty and also changed applet_name.
2001-04-30 18:18:02 +00:00
Mark Whitley
8a633268ef
Made new xreadlink function for libbb and changed applets to use it instead of
...
readlink(2).
2001-04-30 18:17:00 +00:00
Eric Andersen
6f34394454
These messages can be .rodata, so make them even more const.
...
-Erik
2001-04-30 18:08:03 +00:00
Matt Kraai
218aa370b4
Fix user permissions of copied directories.
2001-04-30 17:32:43 +00:00
Matt Kraai
43ca13714b
Simplify permission handling for FIFOs.
2001-04-30 16:43:21 +00:00
Matt Kraai
24abecc349
Fix exit status when there is an error copying a file.
2001-04-30 16:37:04 +00:00
Matt Kraai
72ab975a6b
Terminate source correctly when copying symlink. Report and patch by
...
Brian Webb <webbb@desertscenes.net>.
2001-04-27 15:40:27 +00:00
Eric Andersen
c1bdffe99b
Another nice cleanup from Larry. This adds a new last_char_is() function and
...
uses it to avoid possible buffer underruns whn strlen is zero, and avoid the
possible space-hogging inline of strlen() in several cases.
-Erik
2001-04-26 15:56:47 +00:00
Mark Whitley
c29c44c00e
libbb.h now includes ../busybox.h. This way, files in libbb that have
...
BB_[FEATURE] #defines won't be ignored. Credit to Magnus Damm for spotting
this.
2001-04-25 18:06:21 +00:00
Mark Whitley
4f3558af17
Fixed a BB_MTAB #define buglet reported by Magnus Damm.
2001-04-25 17:03:40 +00:00
Eric Andersen
04095e58fb
Move messages.c to libbb. Make each string in messages.c be its own .o file.
...
This way, we can new get rid of all that tedious #define rubbish we used to
need to enable specific messages. This way is enormously simpler, and as a
bonus also ends up saving us 96 bytes.
-Erik
2001-04-25 05:39:18 +00:00
Matt Kraai
8810bdbba3
Rewrote rm.
2001-04-24 20:04:18 +00:00
Matt Kraai
01441036e9
Use generic flag names.
2001-04-24 01:30:02 +00:00
Matt Kraai
9ff9325e60
Move applet_name declaration from busybox.h to libbb.h.
2001-04-24 01:12:33 +00:00
Matt Kraai
91b2855ba8
Rewrite cp and mv to be SUSv2 compliant.
2001-04-23 18:53:07 +00:00
Mark Whitley
4e9267d76c
Reversed last patch; unnecessary.
2001-04-23 17:56:27 +00:00
Mark Whitley
4b66dabc76
Added a sanity check to fix weird bug exposed when sourcing in commands from a
...
file with lash. Based on report from Heinz Walter.
2001-04-23 17:04:41 +00:00
Glenn L McGrath
f5c358bc98
Simplify file_prefix handling, and use of *dir variable.
2001-04-23 13:52:02 +00:00
Glenn L McGrath
ee0d93ed04
Fix horrible, horrible memmory leak. I wondered why processes were dying !
2001-04-21 10:26:15 +00:00
Glenn L McGrath
89dc02d944
Clearly define out exclude list code, as recommended by Larry Doolittle
2001-04-21 02:12:13 +00:00
Glenn L McGrath
6ebd633829
Set permissions of created file
2001-04-20 05:16:38 +00:00
Eric Andersen
46cd74b9e3
This has two patches. First it moves interface.c to libbb (it is
...
support code after all). It also contains a patch from Larry Doolittle
that removes two instances of "strlen([^)]*) *- *1", un-shadows two
variables, relaxes requirement for a sprintf(3) that returns number of
bytes written, and eliminates a duplicate subroutine.
2001-04-19 16:55:27 +00:00
Eric Andersen
0a3bda2c53
Move real_loop.h to libbb, where it belongs.
...
-Erik
2001-04-18 22:23:22 +00:00
Eric Andersen
b5ec61e4f5
Add types for the inline funcs, thanks to Ralph Siemsen <ralphs@netwinder.org>
2001-04-18 20:17:05 +00:00
Matt Kraai
b181056e06
Eliminated seeks so that we work correctly on pipes, and removed reliance on
...
undefined evaluation ordering. Thanks to Anthony Towns for explanation and
solution.
2001-04-18 14:49:55 +00:00
Glenn L McGrath
33431ebb9a
dpkg improvements, use full package struct, avoid extracting to tmp dir, rename variable.
...
deb_extract, untar and dpkg_deb modified to make the above possible
2001-04-16 04:52:19 +00:00
Glenn L McGrath
685f5fd6f4
untar changed to allow deb_extract to extract to memory, allows better operation of dpkg-deb -f
2001-04-15 12:51:59 +00:00
Glenn L McGrath
5faef74bae
Reads a field from a debian control (status or available) file, handles multi-line fields.
2001-04-15 12:38:12 +00:00
Glenn L McGrath
65708e4cd1
Read a FILE* till an empty line or eof and return it as a char buffer.
...
In future maybe add char *end_str to interface to allow calling function
to specify end point.
2001-04-15 12:36:19 +00:00
Glenn L McGrath
445fb952b8
dpkg-deb -f and partial -I commands, adds 600 bytes
2001-04-13 04:02:57 +00:00
Matt Kraai
1e04ea388f
Fix dos2unix/tr problem noted by Larry Doolittle.
2001-04-12 21:38:06 +00:00
Glenn L McGrath
5a65413c04
Updates, fixes for handling contents, verbose extract.
...
More updates to come
2001-04-12 16:40:21 +00:00
Glenn L McGrath
3e2ab88ee2
New dpkg-deb function -t, stands for --fsys-tarfile
2001-04-12 13:49:09 +00:00
Glenn L McGrath
c9cac5be23
Change size to unsinged long long, so if -1 is passed it will read as much as possible.
2001-04-12 13:47:12 +00:00
Glenn L McGrath
6785b51280
dpkg-deb -c works now
2001-04-12 11:48:02 +00:00
Glenn L McGrath
359c106871
Fix dpkg-deb, enum's are cool
2001-04-12 10:19:08 +00:00
Glenn L McGrath
46079a1d77
remove unused clearerr statements
2001-04-12 10:17:22 +00:00
Glenn L McGrath
327175137f
This belongs in dos2unix.c
2001-04-12 02:29:34 +00:00
Glenn L McGrath
a283157c38
convert() is used by dos2unix and unix2dos
2001-04-12 00:49:26 +00:00
Glenn L McGrath
c8d9e0604a
Moved from dos2unix
2001-04-12 00:42:53 +00:00
Glenn L McGrath
b3f23d4c6a
Seek to start of an entry inside an ar file
2001-04-11 16:31:20 +00:00
Glenn L McGrath
4949faf4b2
copy_file_chunk uses streams now.
2001-04-11 16:23:35 +00:00
Glenn L McGrath
5b20d02ea9
This is primarily to allow deb_extract to be independent of the tar applet.
...
TODO: This function and its conterpart in tar.c should be merged
2001-04-11 16:14:24 +00:00
Glenn L McGrath
9e966ffed4
Remove unneeded printf statment
2001-04-11 15:11:48 +00:00
Glenn L McGrath
f70f6cef39
Disable sigterm
2001-04-11 15:09:30 +00:00
Glenn L McGrath
7fd92949d0
Move unzip, gz_open, gz_close to libbb
2001-04-11 03:11:33 +00:00
Glenn L McGrath
d22e560ad6
Move deb_extract() to libbb, dpkg now independent of dpkg-deb
2001-04-11 02:12:08 +00:00
Glenn L McGrath
9d53c8ab74
Move get_ar_headers to libbb, make dpkg_deb.c independent of ar.c
2001-04-11 01:37:03 +00:00
Eric Andersen
0958093be6
Doc update for the 0.51 release.
...
-Erik
2001-04-10 20:10:55 +00:00
Eric Andersen
fd402941a7
Patch from Valdimir to reduce stack usage, since recursive_action
...
is (as the name implies) is recursive, reducing stack memory usage
is important to avoid exhausting available stack memory.
2001-04-10 17:53:49 +00:00