[CRIU] [PATCH 08/15] protobuf: use generic show function for pstree

Kinsbursky Stanislav skinsbursky at openvz.org
Wed Jul 18 05:05:34 EDT 2012


From: Stanislav Kinsbursky <skinsbursky at openvz.org>

Signed-off-by: Stanislav Kinsbursky <skinsbursky at openvz.org>
---
 cr-show.c |   16 ++--------------
 1 files changed, 2 insertions(+), 14 deletions(-)
-------------- next part --------------
diff --git a/cr-show.c b/cr-show.c
index 1a90bd9..729426a 100644
--- a/cr-show.c
+++ b/cr-show.c
@@ -417,9 +417,8 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect)
 		ret = pb_read_eof(fd_pstree, &e, pstree_entry);
 		if (ret <= 0)
 			goto out;
-		pr_msg("pid: %8d ppid %8d pgid: %8d sid %8d  n_threads: %8d\n",
-		       (int)e->pid, (int)e->ppid, (int)e->pgid,
-		       (int)e->sid, (int)e->n_threads);
+
+		pb_show_msg(e, &pstree_entry__descriptor);
 
 		if (collect) {
 			item = xzalloc(sizeof(struct pstree_item));
@@ -437,17 +436,6 @@ static int show_collect_pstree(int fd_pstree, struct list_head *collect)
 			list_add_tail(&item->list, collect);
 		}
 
-		if (e->n_threads) {
-			pr_msg("  \\\n");
-			pr_msg("   --- threads: ");
-			while (e->n_threads--) {
-				pr_msg(" %6d", (int)e->threads[e->n_threads]);
-				if (item)
-					item->threads[e->n_threads].virt = e->threads[e->n_threads];
-			}
-			pr_msg("\n");
-		}
-
 		pstree_entry__free_unpacked(e, NULL);
 	}
 


More information about the CRIU mailing list