]> granicus.if.org Git - procps-ng/commitdiff
top: exploit library changes to cgroup & supgid
authorJim Warner <james.warner@comcast.net>
Thu, 28 Jun 2012 05:00:03 +0000 (00:00 -0500)
committerCraig Small <csmall@enc.com.au>
Wed, 29 Aug 2012 07:26:54 +0000 (17:26 +1000)
Signed-off-by: Jim Warner <james.warner@comcast.net>
top/top.c

index da0737076c3cf022dee1eeaec3b890d8ae79c44a..2365ef8c2e3914c4acaf74619ac20251e0be14b0 100644 (file)
--- a/top/top.c
+++ b/top/top.c
@@ -3585,8 +3585,7 @@ static void task_show (const WIN_t *q, const proc_t *p, char *ptr) {
             continue;
 #endif
          case P_CGR:
-            // our kernel may not support cgroups
-            makeVAR(p->cgroup ? *p->cgroup : "n/a");
+            makeVAR(p->cgroup[0]);
             break;
          case P_CMD:
             makeVAR(forest_display(q, p));
@@ -3663,10 +3662,10 @@ static void task_show (const WIN_t *q, const proc_t *p, char *ptr) {
             makeCOL(scale_num(pages2K(p->resident), w, s));
             break;
          case P_SGD:
-            makeVAR(p->supgid ? p->supgid : "n/a");
+            makeVAR(p->supgid);
             break;
          case P_SGN:
-            makeVAR(p->supgrp ? p->supgrp : "n/a");
+            makeVAR(p->supgrp);
             break;
          case P_SHR:
             makeCOL(scale_num(pages2K(p->share), w, s));