Toolbox: |ps -t| now correctly displays the USER for threads

use tid to display thread information

Bug: https://code.google.com/p/android/issues/detail?id=198564
Bug: http://b/26470660
Signed-off-by: "Phani (Gargey) Avadhanam" <pgargey@codeaurora.org>
Change-Id: Ife8ce59d7b6eb6906ab39acebea18c7aee50339a
diff --git a/toolbox/ps.c b/toolbox/ps.c
index 3bc540d..ecc1c9f 100644
--- a/toolbox/ps.c
+++ b/toolbox/ps.c
@@ -57,7 +57,7 @@
     int prio, nice, rtprio, sched, psr;
     struct passwd *pw;
 
-    sprintf(statline, "/proc/%d", pid);
+    sprintf(statline, "/proc/%d", tid ? tid : pid);
     stat(statline, &stats);
 
     if(tid) {