Sami Kerola
4bfc4a00fb
pgrep: use libc error printing facilities
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:50 +01:00
Sami Kerola
9057b18a32
libproc-ng & ps: fix warning reported by smatch
...
proc/ksym.c +279 read_file(54) info: redundant null check on buf calling free()
proc/ksym.c +330 parse_ksyms(41) info: redundant null check on ksyms_data calling free()
proc/ksym.c +332 parse_ksyms(43) info: redundant null check on ksyms_index calling free()
proc/ksym.c +451 sysmap_mmap(110) info: redundant null check on sysmap_index calling free()
proc/procps.h:74:5: warning: undefined preprocessor identifier 'SHARED'
proc/slab.c +145 parse_slabinfo20(24) error: potential null derefence 'prev'.
proc/slab.c +222 parse_slabinfo11(21) error: potential null derefence 'prev'.
ps/stacktrace.c +131 debug(6) error: snprintf() is printing too much 99 vs 16
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:50 +01:00
Sami Kerola
c1fa3bfce8
misc: compiler warning fixes
...
Fix few compiler warnings. Some of these warnings appeared multiple
times, and the listing bellow is more about which sort of errors
where fixed.
devname.c:87:12: warning: comparison of integers of different signs: 'int' and 'unsigned long'
output.c:389:36: warning: passing 'char **const' to parameter of type 'const char *const restrict *' discards qualifiers in nested pointer types
output.c:611:31: warning: comparison of integers of different signs: 'const unsigned long' and 'int'
stacktrace.c:33:37: warning: unused parameter 'signum'
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:50 +01:00
Sami Kerola
1ef14f4bf9
includes: add xalloc.h to unify memory allocations
...
The xalloc.h provides necessary error checking.
Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:50 +01:00
Sami Kerola
4bd36d1483
ps: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:30:45 +01:00
Sami Kerola
f90e436b88
watch: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:18:25 +01:00
Sami Kerola
76841eda26
w: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
3465901ffb
vmstat: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
8152fa571e
uptime: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
24762e2ed8
tload: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
44f5745d7e
sysctl: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
0ac63f5bc1
slabtop: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
84c9e5fbf5
skill: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
e9f7392d31
pwdx: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
d59cf08c9d
pmap: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
ad6054b372
pgrep: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:04 +01:00
Sami Kerola
10db451038
free: add gettext support
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
43318fd0c2
build-sys: add c.h with fundamental C definitions
...
This file contains various preprocessor directed definitions, and
other definitions, which most programs need.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
a220ba6770
build-sys: add NLS support
...
Add GNU gettext internationalization and localization support.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Ludwig Nussel
7393599f73
sysctl: implement --pattern option
...
Useful for e.g network hook scripts together with --system to only apply
sysctls for a specific network interface.
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Ludwig Nussel
100959274c
sysctl: add --system switch
...
instead of requiring distributions to construct a loop around sysctl
in boot scripts just scan a set of default directories if the --system
switch is used.
Config files are applied in alphabetic order of their base name.
Each base name is only applied once according to the directory
preference. /etc/sysctl.conf is always applied last.
Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
db6aea7d3f
ps: new usage function
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
3c77055c5e
docs: clean up kill and skill man pages
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
b6578cb372
skill: new usage function
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
5e0306f042
docs: mention long options in man vmstat.8
...
This commit includes generic manual clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
1ddb5a3ae4
vmstat: add long options & new usage function
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
aa2284c820
docs: fix free.1 groff syntax
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:03 +01:00
Sami Kerola
3a21ef5580
docs: mention long options in man pgrep.1
...
This commit includes generic manual clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
7af14af685
w: new usage & fix coding style
...
Coding style fixed and more readable help output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
922d218e1e
include/devname.h: add missing header
...
The devname.h requires readproc.h header which has dev_t. Unless
header is included the includes in program files must be in
correct order. I also added FIXME item to remind that for uid &
gid value int not correct data type but uid_t or gid_t from
pwd.h.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
a08e0a6ef2
tload: new usage & fix coding style
...
Coding style fixed and more readable help output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
05765771c2
uptime: new usage & fix coding style
...
Coding style fixed and more readable help output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
61db37d48f
slabtop: new usage & fix coding style
...
Coding style fixed and more readable help output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
4f7b9c661b
pwdx.c: new usage & fix coding style
...
Coding style fixed and new help output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
4581ac2240
pgrep: add long options & new usage
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
e1bfc779f4
free: do not mix declarations and code [smatch scan]
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
d9b78de4be
docs: mention long options in man sysctl.8
...
The commit includes few generic manual clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
f6d715e7fa
docs: mention long options in man pmap.1
...
Also add range option to manual page. The commit includes few generic manual
clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
2cf4e8e03a
docs: mention long options in man watch.1
...
This patch also changed a little the manual page structure, and wording.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:02 +01:00
Sami Kerola
3fc07c1068
docs: mention long options in man w.1
...
The commit includes few generic manual clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Sami Kerola
35c8459c47
docs: mention long options in man tload.1
...
The commit includes few generic manual clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Sami Kerola
c1b3c819b0
docs: mention long options in man uptime.1
...
The commit includes few generic manual clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Sami Kerola
97b08249c6
docs: small nroff fixes to man slabtop.1
...
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Sami Kerola
74471cd69c
docs: mention long options in man pwdx.1
...
The commit includes few generic manual clean ups as well.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Sami Kerola
81df8e2630
sysctl: options handling & usage output
...
The sysctl now uses getopt_long and has help screen which be user
friendly. Rest of the modernization is left later, since this is
a command is used in scripts, and changing for instance error
printing to use warn & warnx could break stuff.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Sami Kerola
d50884788d
pmap: new usage & fix coding style
...
Coding style fixed and more readable help output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Sami Kerola
6dd092412f
watch: new usage & fix coding style
...
Coding style fixed and more readable help output.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
2011-12-20 17:17:01 +01:00
Craig Small
2865ded64e
Removed xalloc type functions from library
...
These xalloc functions are a private function for the library. If using
programs need them, then they should make their own error reporting or
use a common file.
2011-12-20 22:56:17 +11:00
Craig Small
562b4a039f
Added news item for top search capability
2011-12-20 22:16:40 +11:00
Jim Warner
ff67012161
top: update man document for new search capability
...
This commit documents the top search provisons as a
new section entitled:
5d. SEARCHING in a window
It also adds minor unrelated content and tweaks some
miscellaneous formatting and spacing inconsistencies.
2011-12-20 22:15:37 +11:00