svn commit: trunk/busybox/procps

vodz at busybox.net vodz at busybox.net
Tue Oct 4 17:09:51 UTC 2005


Author: vodz
Date: 2005-10-04 10:09:50 -0700 (Tue, 04 Oct 2005)
New Revision: 11756

Log:
ps selinux logic correction, but do not tested too

Modified:
   trunk/busybox/procps/ps.c


Changeset:
Modified: trunk/busybox/procps/ps.c
===================================================================
--- trunk/busybox/procps/ps.c	2005-10-04 16:48:26 UTC (rev 11755)
+++ trunk/busybox/procps/ps.c	2005-10-04 17:09:50 UTC (rev 11756)
@@ -33,6 +33,7 @@
 #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 @@
 #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 @@
 	}
 #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 */




More information about the busybox-cvs mailing list