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
450196c119
ps: work around libc bug: printf("%.*s\n", MAX_INT, buffer)
2007-03-28 21:57:12 +00:00
Denis Vlasenko
219d14d514
random style fixes (extra spaces deleted)
2007-03-24 15:40:16 +00:00
Bernhard Reutner-Fischer
26a8016da6
- change option -c to -Z to match newer upstream SElinux conventions
2007-03-14 08:52:28 +00:00
Denis Vlasenko
54cf511ce1
sort: fix multiple -k (was ignoring all except last)
2007-02-17 18:11:45 +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
06af216528
suppress warnings about easch <applet>_main() having
...
no preceding prototype
2007-02-03 17:28:39 +00:00
Denis Vlasenko
769d1e05e6
fix warning from needlessly-global functions
2007-01-22 23:04:27 +00:00
Denis Vlasenko
150f402b36
whitespace fixes (leading spaces to tab)
2007-01-13 21:06:21 +00:00
Denis Vlasenko
f7996f3b70
Trailing whitespace removal over entire tree
2007-01-11 17:20:00 +00:00
Denis Vlasenko
3bba545a54
done a dozen of randconfig test. guess what? ALL failed...
...
these are resulting fixes
2006-12-30 17:57:03 +00:00
Denis Vlasenko
bf0a201008
style fixes
...
last xcalloc replaced by xzalloc
2006-12-26 10:42:51 +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
6dca70a049
ps: fix buglet, add microoptimization
2006-12-18 14:20:01 +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
89f0b3486d
rodata cleanup. "unable to" == "cannot". -300 bytes
2006-11-18 22:04:09 +00:00
Denis Vlasenko
a7189f01a4
add -Wundef, fix uncovered bugs
2006-11-17 20:29:00 +00:00
Denis Vlasenko
402151671b
ps: add documentation on POSIX ps
2006-11-05 00:47:38 +00:00
Denis Vlasenko
9494919ea5
ps: implement POSIX-like options, most notably -o
...
(activated by CONFIG_DESKTOP)
2006-11-05 00:45:47 +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
9225854144
mostly style fixes
2006-11-01 10:25:35 +00:00
Denis Vlasenko
048c93cc55
pidof: reduce #ifdef forest
2006-11-01 09:17:47 +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
d3ada32285
ps: reduce #ifdef forest
2006-11-01 09:14:52 +00:00
Denis Vlasenko
25d8062128
top: batch mode should output all processes
2006-10-27 09:34:22 +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
c6f188def8
silly size savings and capitalization fixes
2006-10-26 00:37:00 +00:00
Denis Vlasenko
ea62077b85
add open_read_close() and similar stuff
2006-10-14 02:23:43 +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
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
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
266bc17690
top: add support for -b, -n <iterations>
2006-09-29 17:16:39 +00:00
Denis Vlasenko
0bb628f4f3
kill: implement killall5. OpenWRT folks will be happy.
...
However their code was unusably different from sysvinit original.
Run tested.
2006-09-27 14:25:33 +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
Rob Landley
e9a7a6212b
Change license statements (and clean up headers) on some of the files that
...
Erik or I are primary copyright holders on.
2006-09-22 02:52:41 +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
16bbb20089
Random cleanup hanging around my tree.
2006-09-12 20:28:34 +00:00
Denis Vlasenko
42dfcd2612
top: fixed wrong comment, made error message more clear
2006-09-09 12:55:02 +00:00
Denis Vlasenko
9cac521f07
using [xa]sprintf for string concatenation is neat and saves
...
~100 bytes according to bloatcheck. Also this fixes bug in rpm
2006-09-09 12:24:19 +00:00
Rob Landley
86b4d64aa3
These should have been part of 15767 too.
2006-08-03 17:58:17 +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
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
a526c30cc5
Make another warning go away.
2006-06-30 20:30:10 +00:00
Rob Landley
db1ab1aeb3
Top was catching sigterm (and fumbling sigint) so it could reset the terminal
...
type on the way out, but the signal handler didn't exit. Plus it did
unnecessary things with sigaction. This code is overgrown and needs a serious
weed-whacking...
2006-06-28 14:11:25 +00:00