[CRIU] [PATCH cr] Make Pavel happy

Andrey Vagin avagin at openvz.org
Fri Jun 1 08:36:41 EDT 2012


Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
 cr-dump.c         |    6 ++++--
 include/crtools.h |   19 ++++++++-----------
 2 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/cr-dump.c b/cr-dump.c
index 2065c7c..6aab68b 100644
--- a/cr-dump.c
+++ b/cr-dump.c
@@ -1748,9 +1748,11 @@ int cr_dump_tasks(pid_t pid, const struct cr_options *opts)
 	if (dump_pstree(root_item))
 		goto err;
 
-	if (opts->namespaces_flags)
-		if (dump_namespaces(&root_item->cpt_pid, opts->namespaces_flags) < 0)
+	if (opts->namespaces_flags) {
+		struct pid pid_ns = {root_item->pid, root_item->real_pid};
+		if (dump_namespaces(&pid_ns, opts->namespaces_flags) < 0)
 			goto err;
+	}
 
 	ret = cr_dump_shmem();
 	if (ret)
diff --git a/include/crtools.h b/include/crtools.h
index 773d6fa..2c023ec 100644
--- a/include/crtools.h
+++ b/include/crtools.h
@@ -175,20 +175,17 @@ struct rst_info {
 	struct list_head	eventpoll;
 };
 
+struct pid {
+	u32 pid;
+	u32 real_pid;
+};
+
 struct pstree_item {
 	struct list_head	list;
+	u32 pid;
 	union {
-		struct pid {
-			u32 pid;
-			u32 real_pid;
-		} cpt_pid;	/* leader pid */
-		struct {
-			u32 pid;
-			union {
-				u32 born_sid;
-				u32 real_pid;
-			};
-		};
+		u32 born_sid;
+		u32 real_pid;
 	};
 	struct pstree_item	*parent;
 	struct list_head	children;	/* array of children */
-- 
1.7.1



More information about the CRIU mailing list