[CRIU] [crtools-bot for Pavel Emelyanov ] dump: Don't pass pid to children parser routine

Cyrill Gorcunov gorcunov at openvz.org
Thu Mar 1 10:31:20 EST 2012


The commit is pushed to "master" and will appear on git://github.com/cyrillos/crtools.git
------>
commit 30a2b6f31483d36d2b60dfcd148440192e73cc10
Author: Pavel Emelyanov <xemul at parallels.com>
Date:   Thu Mar 1 19:05:39 2012 +0400

    dump: Don't pass pid to children parser routine
    
    It's in item already.
    
    Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
    Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 cr-dump.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index ffca7bc..9717240 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -774,7 +774,7 @@ static int parse_threads(struct pstree_item *item)
 	return 0;
 }
 
-static int parse_children(struct pstree_item *item, pid_t pid)
+static int parse_children(struct pstree_item *item)
 {
 	FILE *file;
 	char *tok;
@@ -783,7 +783,7 @@ static int parse_children(struct pstree_item *item, pid_t pid)
 
 	for (i = 0; i < item->nr_threads; i++) {
 
-		file = fopen_proc(pid, "task/%d/children", item->threads[i]);
+		file = fopen_proc(item->pid, "task/%d/children", item->threads[i]);
 		if (!file)
 			goto err;
 
@@ -909,7 +909,7 @@ static struct pstree_item *collect_task(pid_t pid, pid_t ppid, struct list_head
 	if (ret < 0)
 		goto err_close;
 
-	ret = parse_children(item, pid);
+	ret = parse_children(item);
 	if (ret < 0)
 		goto err_close;
 


More information about the CRIU mailing list