Bernhard Reutner-Fischer
46904bfbcc
- Fix hdparm's ioctl parameter passing (John Brandwood)
2008-01-19 11:27:11 +00:00
Denis Vlasenko
6b404431aa
ps: fix build breakage from vda's recent commit
...
*: whitespace fixes
2008-01-07 16:13:14 +00:00
Denis Vlasenko
6bef3d1d22
fbset: fix buglet where we were using wrong pointer
...
readahead: stop using stdio.h
*: style fixes
2007-11-06 03:05:54 +00:00
Denis Vlasenko
bfc3d82256
ifconfig: code shrink
...
adjtimex: code shrink
libbb: move nth_string function into libbb
hdparm: nth_string was here
text data bss dec hex filename
730013 10334 12032 752379 b7afb busybox_old
730093 10134 12032 752259 b7a83 busybox_unstripped
2007-11-04 04:10:17 +00:00
Denis Vlasenko
9130340adf
hdparm: code shrink
...
text data bss dec hex filename
776494 974 9420 786888 c01c8 busybox_old
776099 974 9420 786493 c003d busybox_unstripped
2007-10-30 19:36:54 +00:00
Denis Vlasenko
9b49a5ed85
add -fvisibility=hidden to CC flags, mark XXX_main functions
...
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-11 10:05:36 +00:00
Denis Vlasenko
feb7ae7f01
printf("%s\n") -> puts()
2007-10-01 12:05:12 +00:00
Denis Vlasenko
0afdfdf649
hdparm: paranoia-induced fix against theoretical div-by-0 case
2007-09-28 13:41:41 +00:00
Denis Vlasenko
920c52a5c8
hdparm: more robust (re overflows) code. +38 bytes.
2007-09-28 13:38:08 +00:00
Denis Vlasenko
a7bc9ac8f8
hdparm: reduce possibility of numeric overflow in -T.
...
do_time 386 410 +24
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/0 up/down: 24/0) Total: 24 bytes
2007-09-28 11:21:47 +00:00
Denis Vlasenko
c3122bca53
hdparm: simplify timing measurement (it wa the last last user
...
of setitimer in the tree).
static.thousand 16 - -16
read_big_block 81 46 -35
getitimer 41 - -41
setitimer 47 - -47
__GI_setitimer 47 - -47
do_time 480 386 -94
------------------------------------------------------------------------------
(add/remove: 0/4 grow/shrink: 0/2 up/down: 0/-280) Total: -280 bytes
M miscutils/hdparm.c
2007-09-28 10:28:03 +00:00
Denis Vlasenko
0d3c6afc93
hdparm: get rid of static variables
...
process_dev 5309 5311 +2
unregister_hwif 1 - -1
...........
Xreadahead 4 - -4
seek_to_zero 25 17 -8
hdparm_main 1242 1227 -15
do_time 547 480 -67
------------------------------------------------------------------------------
(add/remove: 0/83 grow/shrink: 1/3 up/down: 2/-248) Total: -246 bytes
2007-09-28 10:25:32 +00:00
Denis Vlasenko
892536f019
hdparm: use fixed fd #3 for device being interrogated
...
(surprisingly, on i386 almost no code size change)
2007-09-27 10:23:34 +00:00
Denis Vlasenko
4daad9004d
introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).
2007-09-27 10:20:47 +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
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
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
4b924f3a5c
whitespace fixes
2007-05-30 00:29:55 +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
6963eb53a1
hdparm: make -T -t code smaller (-194 bytes), and output prettier
2007-05-22 21:46:11 +00:00
Denis Vlasenko
ac678ec2f1
style fixes, no code changes
2007-04-16 22:32:04 +00:00
Denis Vlasenko
ae47cd1da7
hdparm: fix multisector mode setting
...
(from Toni Mirabete <amirabete@catix.cat>)
2007-03-31 10:30:02 +00:00
Denis Vlasenko
0eec4abb13
hdparm: flag variables can easily be smaller than long
...
function old new delta
process_dev 5247 5325 +78
bb_ioctl_on_off 72 78 +6
unregister_hwif 4 1 -3
...
perform_reset 4 1 -3
parse_xfermode 111 108 -3
noisy_piomode 4 1 -3
...
do_flush 4 1 -3
do_ctimings 4 1 -3
static.parm 4 - -4
static.multcount 4 - -4
parse_opts 54 48 -6
hdparm_main 1435 1383 -52
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 2/61 up/down: 84/-243) Total: -159 bytes
2007-03-28 01:00:45 +00:00
Denis Vlasenko
7c282a2078
hdparm: remove stray static (-200 bytes bss)
2007-03-28 00:14:54 +00:00
Denis Vlasenko
f1ba749509
hdparm: whitespace style fixes
2007-03-28 00:14:01 +00:00
Denis Vlasenko
3bf0020a5f
hdparm: style fixes, no code changes
2007-02-18 13:36:04 +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
b6aae0f381
preparatory patch for -Wwrite-strings #2
2007-01-29 22:51:25 +00:00
Denis Vlasenko
3a34d0c08a
random small size optimizations
2007-01-12 22:10:34 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +00:00
Denis Vlasenko
c6f188def8
silly size savings and capitalization fixes
2006-10-26 00:37:00 +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
1385899416
attempt to regularize atoi mess.
2006-10-08 12:49:22 +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
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
9213a9e0f2
whitespace cleanup
2006-09-17 16:28:10 +00:00
Rob Landley
403777ffae
Patch from tito to improve options parsing.
2006-08-03 20:22:37 +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
22d26fc6ae
Patch from Yann Morin to put BLKGETSIZE64 in platform.h had rather a lot of
...
fallout due to the #include <sys/mount.h>. Removed that #include from various
applets and fixed up those that were unhappy when that #include was made
because they'd block copied stuff out of it. (Sigh.)
2006-06-15 15:49:36 +00:00
Rob Landley
9c6f9552ec
Some day, maybe gcc will be able to optimize out static functions that are
...
never used so we don't have to #ifdef them. Wouldn't that be nice?
2006-06-08 14:11:36 +00:00
Rob Landley
6d8ce170b0
Fix from Tito to read from stdin only when it's not a tty.
2006-06-07 21:22:42 +00:00
Mike Frysinger
ea93f8a397
Tito writes: this patch fixes two potential bugs with the -i -I flags that could be reset during option parsing
2006-06-07 14:25:22 +00:00
Rob Landley
0753f4a15e
Callers to identify() converted the endianness of the buffer. So did
...
identify(). This meant big endian systems had a NUXI problem. Removed
the redundant conversion from the callers, and made some in-passing cleanups
while I was there.
2006-06-07 00:27:25 +00:00
Bernhard Reutner-Fischer
c89982dcd7
- move #include busybox.h to the very top so we pull in the config
...
and eventual platform specific includes in early.
2006-06-03 19:49:21 +00:00
Rob Landley
0620841758
Patch from Tito to remove long options from hdparm.
2006-05-31 22:52:57 +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
81dab2cf83
Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bits
...
on 64 bit platforms), and move #include <inttypes.h> to libbb.h.
2006-05-28 01:56:08 +00:00
Rob Landley
299a6b4d7b
Consolidate #include <sys/time.h> so libbb.h does it.
2006-05-27 21:42:58 +00:00