diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-16 17:31:05 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-16 17:31:05 +0100 |
commit | 4e08a123b0f8c7d2c66583e84759b0974e791ee9 (patch) | |
tree | 3454632cecf1f6a042e6cb705432866cf83f358d /procps | |
parent | 936e83e694b3225dbcc14fc99ca8053e2518ab35 (diff) | |
download | busybox-w32-4e08a123b0f8c7d2c66583e84759b0974e791ee9.tar.gz busybox-w32-4e08a123b0f8c7d2c66583e84759b0974e791ee9.tar.bz2 busybox-w32-4e08a123b0f8c7d2c66583e84759b0974e791ee9.zip |
Assorted warning fixes and added a comment, no code changes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'procps')
-rw-r--r-- | procps/ps.c | 8 | ||||
-rw-r--r-- | procps/pstree.c | 4 |
2 files changed, 11 insertions, 1 deletions
diff --git a/procps/ps.c b/procps/ps.c index 1d380590d..e8b122c5a 100644 --- a/procps/ps.c +++ b/procps/ps.c | |||
@@ -608,7 +608,9 @@ int ps_main(int argc UNUSED_PARAM, char **argv) | |||
608 | procps_status_t *p; | 608 | procps_status_t *p; |
609 | llist_t* opt_o = NULL; | 609 | llist_t* opt_o = NULL; |
610 | char default_o[sizeof(DEFAULT_O_STR)]; | 610 | char default_o[sizeof(DEFAULT_O_STR)]; |
611 | #if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS | ||
611 | int opt; | 612 | int opt; |
613 | #endif | ||
612 | enum { | 614 | enum { |
613 | OPT_Z = (1 << 0), | 615 | OPT_Z = (1 << 0), |
614 | OPT_o = (1 << 1), | 616 | OPT_o = (1 << 1), |
@@ -638,7 +640,11 @@ int ps_main(int argc UNUSED_PARAM, char **argv) | |||
638 | * procps v3.2.7 supports -T and shows tids as SPID column, | 640 | * procps v3.2.7 supports -T and shows tids as SPID column, |
639 | * it also supports -L where it shows tids as LWP column. | 641 | * it also supports -L where it shows tids as LWP column. |
640 | */ | 642 | */ |
641 | opt = getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o); | 643 | #if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS |
644 | opt = | ||
645 | #endif | ||
646 | getopt32(argv, "Zo:*aAdefl"IF_FEATURE_SHOW_THREADS("T"), &opt_o); | ||
647 | |||
642 | if (opt_o) { | 648 | if (opt_o) { |
643 | do { | 649 | do { |
644 | parse_o(llist_pop(&opt_o)); | 650 | parse_o(llist_pop(&opt_o)); |
diff --git a/procps/pstree.c b/procps/pstree.c index c5fb83688..f97e99639 100644 --- a/procps/pstree.c +++ b/procps/pstree.c | |||
@@ -357,7 +357,9 @@ static void handle_thread(const char *comm, pid_t pid, pid_t ppid, uid_t uid) | |||
357 | static void mread_proc(void) | 357 | static void mread_proc(void) |
358 | { | 358 | { |
359 | procps_status_t *p = NULL; | 359 | procps_status_t *p = NULL; |
360 | #if ENABLE_FEATURE_SHOW_THREADS | ||
360 | pid_t parent = 0; | 361 | pid_t parent = 0; |
362 | #endif | ||
361 | int flags = PSSCAN_COMM | PSSCAN_PID | PSSCAN_PPID | PSSCAN_UIDGID | PSSCAN_TASKS; | 363 | int flags = PSSCAN_COMM | PSSCAN_PID | PSSCAN_PPID | PSSCAN_UIDGID | PSSCAN_TASKS; |
362 | 364 | ||
363 | while ((p = procps_scan(p, flags)) != NULL) { | 365 | while ((p = procps_scan(p, flags)) != NULL) { |
@@ -368,7 +370,9 @@ static void mread_proc(void) | |||
368 | #endif | 370 | #endif |
369 | { | 371 | { |
370 | add_proc(p->comm, p->pid, p->ppid, p->uid/*, 0*/); | 372 | add_proc(p->comm, p->pid, p->ppid, p->uid/*, 0*/); |
373 | #if ENABLE_FEATURE_SHOW_THREADS | ||
371 | parent = p->pid; | 374 | parent = p->pid; |
375 | #endif | ||
372 | } | 376 | } |
373 | } | 377 | } |
374 | } | 378 | } |