diff options
author | "Vladimir N. Oleynik" | 2005-10-04 17:09:50 +0000 |
---|---|---|
committer | "Vladimir N. Oleynik" | 2005-10-04 17:09:50 +0000 |
commit | 9c44dce304150753879269b982f3e2c55c6bb287 (patch) | |
tree | 8842df697837607431fb2abd54342b76aa7a115f /procps | |
parent | be0ed3d0b94489e08cc9280f65075c42ba80bf8c (diff) | |
download | busybox-9c44dce304150753879269b982f3e2c55c6bb287.zip busybox-9c44dce304150753879269b982f3e2c55c6bb287.tar.gz |
ps selinux logic correction, but do not tested too
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/procps/ps.c b/procps/ps.c index a0081c8..6b5a4a9 100644 --- a/procps/ps.c +++ b/procps/ps.c @@ -33,6 +33,7 @@ extern int ps_main(int argc, char **argv) #if ENABLE_FEATURE_PS_WIDE int terminal_width; int w_count = 0; + bb_opt_complementally="ww"; #else # define terminal_width 80 #endif @@ -40,12 +41,10 @@ extern int ps_main(int argc, char **argv) #if ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX /* handle arguments */ #if ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX - bb_opt_complementally="ww"; i = bb_getopt_ulflags(argc, argv, "wc", &w_count); #elif ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX - bb_opt_complementally="ww"; i = bb_getopt_ulflags(argc, argv, "w", &w_count); -#else /* !ENABLE_FEATURE_PS_WIDE && !ENABLE_SELINUX */ +#else /* !ENABLE_FEATURE_PS_WIDE && ENABLE_SELINUX */ i = bb_getopt_ulflags(argc, argv, "c"); #endif #if ENABLE_FEATURE_PS_WIDE @@ -61,7 +60,7 @@ extern int ps_main(int argc, char **argv) } #endif #if ENABLE_SELINUX - if ((i & 2) && is_selinux_enabled()) + if ((i & (1+ENABLE_FEATURE_PS_WIDE)) && is_selinux_enabled()) use_selinux = 1; #endif #endif /* ENABLE_FEATURE_PS_WIDE || ENABLE_SELINUX */ |