ls: LIST_ID_NAME/ID_NUMERIC/LOPT/LONG are the same, merge as LONG
[oweals/busybox.git] / procps / ps.c
index e291ecd7ed40d78bff8848ad15566e157c89ac95..e8b122c5afa6cd4ced5a409ab2e37da3a8dbe2ac 100644 (file)
 //config:        Adds fields PPID, RSS, START, TIME & TTY
 //config:
 //config:config FEATURE_PS_TIME
-//config:      bool "Enable time and elapsed time output"
+//config:      bool "Support -o time and -o etime output specifiers"
 //config:      default y
 //config:      depends on PS && DESKTOP
 //config:      select PLATFORM_LINUX
-//config:      help
-//config:        Support -o time and -o etime output specifiers.
-//config:
-//config:config FEATURE_PS_ADDITIONAL_COLUMNS
-//config:      bool "Enable additional ps columns"
-//config:      default y
-//config:      depends on PS && DESKTOP
-//config:      help
-//config:        Support -o rgroup, -o ruser, -o nice output specifiers.
 //config:
 //config:config FEATURE_PS_UNUSUAL_SYSTEMS
 //config:      bool "Support Linux prior to 2.4.0 and non-ELF systems"
 //config:      help
 //config:        Include support for measuring HZ on old kernels and non-ELF systems
 //config:        (if you are on Linux 2.4.0+ and use ELF, you don't need this)
+//config:
+//config:config FEATURE_PS_ADDITIONAL_COLUMNS
+//config:      bool "Support -o rgroup, -o ruser, -o nice specifiers"
+//config:      default y
+//config:      depends on PS && DESKTOP
 
 //applet:IF_PS(APPLET(ps, BB_DIR_BIN, BB_SUID_DROP))
 
@@ -612,7 +608,9 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
        procps_status_t *p;
        llist_t* opt_o = NULL;
        char default_o[sizeof(DEFAULT_O_STR)];
+#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS
        int opt;
+#endif
        enum {
                OPT_Z = (1 << 0),
                OPT_o = (1 << 1),
@@ -642,7 +640,11 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
         * procps v3.2.7 supports -T and shows tids as SPID column,
         * it also supports -L where it shows tids as LWP column.
         */
-       opt = getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o);
+#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS
+       opt =
+#endif
+               getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o);
+
        if (opt_o) {
                do {
                        parse_o(llist_pop(&opt_o));