aboutsummaryrefslogtreecommitdiff
path: root/miscutils/hdparm.c
AgeCommit message (Collapse)Author
2007-10-11add -fvisibility=hidden to CC flags, mark XXX_main functionsDenis Vlasenko
EXTERNALLY_VISIBLE. 5% size reduction of libbusybox.so
2007-10-01printf("%s\n") -> puts()Denis Vlasenko
2007-09-28hdparm: paranoia-induced fix against theoretical div-by-0 caseDenis Vlasenko
2007-09-28hdparm: more robust (re overflows) code. +38 bytes.Denis Vlasenko
2007-09-28hdparm: reduce possibility of numeric overflow in -T.Denis Vlasenko
do_time 386 410 +24 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 24/0) Total: 24 bytes
2007-09-28hdparm: simplify timing measurement (it wa the last last userDenis Vlasenko
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-28hdparm: get rid of static variablesDenis Vlasenko
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-27hdparm: use fixed fd #3 for device being interrogatedDenis Vlasenko
(surprisingly, on i386 almost no code size change)
2007-09-27introduce bb_putchar(). saves ~1800 on uclibc (less on glibc).Denis Vlasenko
2007-08-16hdparm: shrink rodata by ~250 bytesDenis Vlasenko
2007-08-16whitespace fixes, no code changesDenis Vlasenko
2007-08-12trylink: produce even more info about final link stageDenis Vlasenko
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-07-17remove accumulated stray trailing whitespaceDenis Vlasenko
2007-07-14xioctl and friends by Tito <farmatito@tiscali.it>Denis Vlasenko
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-05-30whitespace fixesDenis Vlasenko
2007-05-26usage.c: remove reference to busybox.hDenis Vlasenko
*: s/include "busybox.h"/include "libbb.h"
2007-05-22hdparm: make -T -t code smaller (-194 bytes), and output prettierDenis Vlasenko
2007-04-16style fixes, no code changesDenis Vlasenko
2007-03-31hdparm: fix multisector mode settingDenis Vlasenko
(from Toni Mirabete <amirabete@catix.cat>)
2007-03-28hdparm: flag variables can easily be smaller than longDenis Vlasenko
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-28hdparm: remove stray static (-200 bytes bss)Denis Vlasenko
2007-03-28hdparm: whitespace style fixesDenis Vlasenko
2007-02-18hdparm: style fixes, no code changesDenis Vlasenko
2007-02-03suppress warnings about easch <applet>_main() havingDenis Vlasenko
no preceding prototype
2007-01-29preparatory patch for -Wwrite-strings #2Denis Vlasenko
2007-01-12random small size optimizationsDenis Vlasenko
2006-12-26style fixesDenis Vlasenko
last xcalloc replaced by xzalloc
2006-10-26silly size savings and capitalization fixesDenis Vlasenko
2006-10-20message string changes, mostly for consistency, also -32 bytes in .rodataDenis Vlasenko
2006-10-08attempt to regularize atoi mess.Denis Vlasenko
2006-10-03getopt_ulflags -> getopt32.Denis Vlasenko
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-09-23bb_askpass: shorten static password buffer. 256 is way too large.Denis Vlasenko
simplify code a bit.
2006-09-17whitespace cleanupDenis Vlasenko
2006-08-03Patch from tito to improve options parsing.Rob Landley
2006-08-03Remove bb_ prefixes from xfuncs.c (and a few other places), consolidateRob Landley
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-06-15Patch from Yann Morin to put BLKGETSIZE64 in platform.h had rather a lot ofRob Landley
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-08Some day, maybe gcc will be able to optimize out static functions that areRob Landley
never used so we don't have to #ifdef them. Wouldn't that be nice?
2006-06-07Fix from Tito to read from stdin only when it's not a tty.Rob Landley
2006-06-07Tito writes: this patch fixes two potential bugs with the -i -I flags that ↵Mike Frysinger
could be reset during option parsing
2006-06-07Callers to identify() converted the endianness of the buffer. So didRob Landley
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-03- move #include busybox.h to the very top so we pull in the configBernhard Reutner-Fischer
and eventual platform specific includes in early.
2006-05-31Patch from Tito to remove long options from hdparm.Rob Landley
2006-05-29Add SWAP_LE?? and SWAP_BE?? macros, and make things use them. Converts valuesRob Landley
to/from little endian or big endian, which is a NOP if that's what the current platform already is.
2006-05-28Fix hdparm to use PRIu64 instead of typecasting to long long (which is 128 bitsRob Landley
on 64 bit platforms), and move #include <inttypes.h> to libbb.h.
2006-05-27Consolidate #include <sys/time.h> so libbb.h does it.Rob Landley
2006-05-26Yann E. MORIN. writes:Mike Frysinger
hdparm has a uint64_t passed to printf with a %llu format (which is ok, because it's the same size), but without first being casted(?) to unsigned long long int. Which is kinda funny because it's done OK on a few lines above...
2006-05-25Patch from Tito:Rob Landley
Remove -v verbose -V version -q quiet flags Remove parse_opt_v2(); Rename parse_opt_v3() to parse_xfermode() Remove if_strcat() Rearrange code in  dump_identity() to reduce size Modify some strings so that they could be optimized by the compiler Minor code clean up Remove unneeded #define <shm.h> #if BB_BIG_ENDIAN && !defined(__USE_XOPEN) # define __USE_XOPEN #endif     Must be before #include <unistd.h> and #include "busybox.h" (noticed by Bernhard Fischer <rep.nop@aon.at>) Remove duplicate code in do_time()
2006-05-19Patch from tito to replace shared memory usage with mlock(), slightly tweakedRob Landley
by me.
2006-05-16Largeish cleanup patch from Tito, mostly if statement therapy.Rob Landley
2006-05-11typecast bbig to kill format warningsMike Frysinger