aboutsummaryrefslogtreecommitdiff
path: root/procps/ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/ps.c')
-rw-r--r--procps/ps.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/procps/ps.c b/procps/ps.c
index 902811f31..f7242f2d5 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -32,19 +32,10 @@
32//config: Adds fields PPID, RSS, START, TIME & TTY 32//config: Adds fields PPID, RSS, START, TIME & TTY
33//config: 33//config:
34//config:config FEATURE_PS_TIME 34//config:config FEATURE_PS_TIME
35//config: bool "Enable time and elapsed time output" 35//config: bool "Support -o time and -o etime output specifiers"
36//config: default y 36//config: default y
37//config: depends on PS && DESKTOP 37//config: depends on PS && DESKTOP
38//config: select PLATFORM_LINUX 38//config: select PLATFORM_LINUX
39//config: help
40//config: Support -o time and -o etime output specifiers.
41//config:
42//config:config FEATURE_PS_ADDITIONAL_COLUMNS
43//config: bool "Enable additional ps columns"
44//config: default y
45//config: depends on PS && DESKTOP
46//config: help
47//config: Support -o rgroup, -o ruser, -o nice output specifiers.
48//config: 39//config:
49//config:config FEATURE_PS_UNUSUAL_SYSTEMS 40//config:config FEATURE_PS_UNUSUAL_SYSTEMS
50//config: bool "Support Linux prior to 2.4.0 and non-ELF systems" 41//config: bool "Support Linux prior to 2.4.0 and non-ELF systems"
@@ -53,6 +44,11 @@
53//config: help 44//config: help
54//config: Include support for measuring HZ on old kernels and non-ELF systems 45//config: Include support for measuring HZ on old kernels and non-ELF systems
55//config: (if you are on Linux 2.4.0+ and use ELF, you don't need this) 46//config: (if you are on Linux 2.4.0+ and use ELF, you don't need this)
47//config:
48//config:config FEATURE_PS_ADDITIONAL_COLUMNS
49//config: bool "Support -o rgroup, -o ruser, -o nice specifiers"
50//config: default y
51//config: depends on PS && DESKTOP
56 52
57//applet:IF_PS(APPLET(ps, BB_DIR_BIN, BB_SUID_DROP)) 53//applet:IF_PS(APPLET(ps, BB_DIR_BIN, BB_SUID_DROP))
58 54
@@ -628,7 +624,9 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
628 procps_status_t *p; 624 procps_status_t *p;
629 llist_t* opt_o = NULL; 625 llist_t* opt_o = NULL;
630 char default_o[sizeof(DEFAULT_O_STR)]; 626 char default_o[sizeof(DEFAULT_O_STR)];
627#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS
631 int opt; 628 int opt;
629#endif
632 enum { 630 enum {
633 OPT_Z = (1 << 0), 631 OPT_Z = (1 << 0),
634 OPT_o = (1 << 1), 632 OPT_o = (1 << 1),
@@ -658,7 +656,11 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
658 * procps v3.2.7 supports -T and shows tids as SPID column, 656 * procps v3.2.7 supports -T and shows tids as SPID column,
659 * it also supports -L where it shows tids as LWP column. 657 * it also supports -L where it shows tids as LWP column.
660 */ 658 */
661 opt = getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o); 659#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS
660 opt =
661#endif
662 getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o);
663
662 if (opt_o) { 664 if (opt_o) {
663 do { 665 do {
664 parse_o(llist_pop(&opt_o)); 666 parse_o(llist_pop(&opt_o));