aboutsummaryrefslogtreecommitdiff
path: root/procps/ps.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2015-07-14 14:12:05 +0100
committerRon Yorston <rmy@pobox.com>2015-07-14 14:12:05 +0100
commit895a1533781ca4713ef92113ab6ac5f2584ddd9d (patch)
tree49c8602e9cd733e6f6c105e94e614b8236677853 /procps/ps.c
parent535ec990c50206697852d5c25e94a959f24d86bc (diff)
parent072fc60f29ee3a4ff38f095a9ef149b2e820c8c0 (diff)
downloadbusybox-w32-895a1533781ca4713ef92113ab6ac5f2584ddd9d.tar.gz
busybox-w32-895a1533781ca4713ef92113ab6ac5f2584ddd9d.tar.bz2
busybox-w32-895a1533781ca4713ef92113ab6ac5f2584ddd9d.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'procps/ps.c')
-rw-r--r--procps/ps.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/procps/ps.c b/procps/ps.c
index 9fca3524e..07ff7568f 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -670,8 +670,8 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
670 OPT_l = (1 << ENABLE_SELINUX) * (1 << ENABLE_FEATURE_SHOW_THREADS) * ENABLE_FEATURE_PS_LONG, 670 OPT_l = (1 << ENABLE_SELINUX) * (1 << ENABLE_FEATURE_SHOW_THREADS) * ENABLE_FEATURE_PS_LONG,
671 }; 671 };
672#if ENABLE_FEATURE_PS_LONG 672#if ENABLE_FEATURE_PS_LONG
673 time_t now = now; 673 time_t now = now; /* for compiler */
674 unsigned long uptime; 674 unsigned long uptime = uptime;
675#endif 675#endif
676 /* If we support any options, parse argv */ 676 /* If we support any options, parse argv */
677#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS || ENABLE_FEATURE_PS_WIDE || ENABLE_FEATURE_PS_LONG 677#if ENABLE_SELINUX || ENABLE_FEATURE_SHOW_THREADS || ENABLE_FEATURE_PS_WIDE || ENABLE_FEATURE_PS_LONG
@@ -802,9 +802,11 @@ int ps_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
802 802
803 { 803 {
804 int sz = terminal_width - len; 804 int sz = terminal_width - len;
805 char buf[sz + 1]; 805 if (sz >= 0) {
806 read_cmdline(buf, sz, p->pid, p->comm); 806 char buf[sz + 1];
807 puts(buf); 807 read_cmdline(buf, sz, p->pid, p->comm);
808 puts(buf);
809 }
808 } 810 }
809 } 811 }
810 if (ENABLE_FEATURE_CLEAN_UP) 812 if (ENABLE_FEATURE_CLEAN_UP)