diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-06-18 15:49:47 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-06-18 15:49:47 +0200 |
commit | 12ac6287eedf45d896557b95270a6e0323951917 (patch) | |
tree | de5833ccd888a768836df1353409f7b0f01501d2 /libbb | |
parent | da947607625bc5510ec56b27e04445db300f4418 (diff) | |
download | busybox-w32-12ac6287eedf45d896557b95270a6e0323951917.tar.gz busybox-w32-12ac6287eedf45d896557b95270a6e0323951917.tar.bz2 busybox-w32-12ac6287eedf45d896557b95270a6e0323951917.zip |
procps: remove PSSCAN_STAT define, users were using it incorrectly
Also contains small cleanups ps.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/procps.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libbb/procps.c b/libbb/procps.c index 5833a1f0d..9207e9254 100644 --- a/libbb/procps.c +++ b/libbb/procps.c | |||
@@ -357,7 +357,14 @@ procps_status_t* FAST_FUNC procps_scan(procps_status_t* sp, int flags) | |||
357 | sp->gid = sb.st_gid; | 357 | sp->gid = sb.st_gid; |
358 | } | 358 | } |
359 | 359 | ||
360 | if (flags & PSSCAN_STAT) { | 360 | /* These are all retrieved from proc/NN/stat in one go: */ |
361 | if (flags & (PSSCAN_PPID | PSSCAN_PGID | PSSCAN_SID | ||
362 | | PSSCAN_COMM | PSSCAN_STATE | ||
363 | | PSSCAN_VSZ | PSSCAN_RSS | ||
364 | | PSSCAN_STIME | PSSCAN_UTIME | PSSCAN_START_TIME | ||
365 | | PSSCAN_TTY | PSSCAN_NICE | ||
366 | | PSSCAN_CPU) | ||
367 | ) { | ||
361 | char *cp, *comm1; | 368 | char *cp, *comm1; |
362 | int tty; | 369 | int tty; |
363 | #if !ENABLE_FEATURE_FAST_TOP | 370 | #if !ENABLE_FEATURE_FAST_TOP |