aboutsummaryrefslogtreecommitdiff
path: root/procps/ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/ps.c')
-rw-r--r--procps/ps.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/procps/ps.c b/procps/ps.c
index 395cfcf56..b9a4aef15 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -25,9 +25,9 @@ enum { MAX_WIDTH = 2*1024 };
25 25
26#if ENABLE_SELINUX 26#if ENABLE_SELINUX
27#define SELINUX_O_PREFIX "label," 27#define SELINUX_O_PREFIX "label,"
28#define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" USE_FEATURE_PS_TIME(",time") ",args") 28#define DEFAULT_O_STR (SELINUX_O_PREFIX "pid,user" IF_FEATURE_PS_TIME(",time") ",args")
29#else 29#else
30#define DEFAULT_O_STR ("pid,user" USE_FEATURE_PS_TIME(",time") ",args") 30#define DEFAULT_O_STR ("pid,user" IF_FEATURE_PS_TIME(",time") ",args")
31#endif 31#endif
32 32
33typedef struct { 33typedef struct {
@@ -425,7 +425,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
425{ 425{
426 procps_status_t *p; 426 procps_status_t *p;
427 llist_t* opt_o = NULL; 427 llist_t* opt_o = NULL;
428 USE_SELINUX(int opt;) 428 IF_SELINUX(int opt;)
429 429
430 // POSIX: 430 // POSIX:
431 // -a Write information for all processes associated with terminals 431 // -a Write information for all processes associated with terminals
@@ -439,7 +439,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv)
439 // Select which columns to display 439 // Select which columns to display
440 /* We allow (and ignore) most of the above. FIXME */ 440 /* We allow (and ignore) most of the above. FIXME */
441 opt_complementary = "o::"; 441 opt_complementary = "o::";
442 USE_SELINUX(opt =) getopt32(argv, "Zo:aAdefl", &opt_o); 442 IF_SELINUX(opt =) getopt32(argv, "Zo:aAdefl", &opt_o);
443 if (opt_o) { 443 if (opt_o) {
444 do { 444 do {
445 parse_o(llist_pop(&opt_o)); 445 parse_o(llist_pop(&opt_o));
@@ -486,8 +486,8 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
486{ 486{
487 procps_status_t *p = NULL; 487 procps_status_t *p = NULL;
488 int len; 488 int len;
489 SKIP_SELINUX(const) int use_selinux = 0; 489 IF_NOT_SELINUX(const) int use_selinux = 0;
490 USE_SELINUX(int i;) 490 IF_SELINUX(int i;)
491#if !ENABLE_FEATURE_PS_WIDE 491#if !ENABLE_FEATURE_PS_WIDE
492 enum { terminal_width = 79 }; 492 enum { terminal_width = 79 };
493#else 493#else
@@ -498,7 +498,7 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
498#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX 498#if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX
499#if ENABLE_FEATURE_PS_WIDE 499#if ENABLE_FEATURE_PS_WIDE
500 opt_complementary = "-:ww"; 500 opt_complementary = "-:ww";
501 USE_SELINUX(i =) getopt32(argv, USE_SELINUX("Z") "w", &w_count); 501 IF_SELINUX(i =) getopt32(argv, IF_SELINUX("Z") "w", &w_count);
502 /* if w is given once, GNU ps sets the width to 132, 502 /* if w is given once, GNU ps sets the width to 132,
503 * if w is given more than once, it is "unlimited" 503 * if w is given more than once, it is "unlimited"
504 */ 504 */