Commit 01f6f890 authored by Pavel Emelyanov's avatar Pavel Emelyanov

ns: Introduce collect_namespaces routine

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent b4768792
...@@ -1799,7 +1799,7 @@ int cr_dump_tasks(pid_t pid) ...@@ -1799,7 +1799,7 @@ int cr_dump_tasks(pid_t pid)
if (collect_file_locks()) if (collect_file_locks())
goto err; goto err;
if (collect_mnt_namespaces() < 0) if (collect_namespaces() < 0)
goto err; goto err;
if (collect_sockets(pid)) if (collect_sockets(pid))
......
...@@ -41,6 +41,7 @@ extern unsigned long root_ns_mask; ...@@ -41,6 +41,7 @@ extern unsigned long root_ns_mask;
extern const struct fdtype_ops nsfile_dump_ops; extern const struct fdtype_ops nsfile_dump_ops;
extern struct collect_image_info nsfile_cinfo; extern struct collect_image_info nsfile_cinfo;
extern int collect_namespaces(void);
extern int collect_mnt_namespaces(void); extern int collect_mnt_namespaces(void);
extern int dump_mnt_namespaces(void); extern int dump_mnt_namespaces(void);
extern int dump_namespaces(struct pstree_item *item, unsigned int ns_flags); extern int dump_namespaces(struct pstree_item *item, unsigned int ns_flags);
......
...@@ -528,6 +528,17 @@ int dump_namespaces(struct pstree_item *item, unsigned int ns_flags) ...@@ -528,6 +528,17 @@ int dump_namespaces(struct pstree_item *item, unsigned int ns_flags)
return 0; return 0;
} }
int collect_namespaces(void)
{
int ret;
ret = collect_mnt_namespaces();
if (ret < 0)
return ret;
return 0;
}
int prepare_namespace(struct pstree_item *item, unsigned long clone_flags) int prepare_namespace(struct pstree_item *item, unsigned long clone_flags)
{ {
pid_t pid = item->pid.virt; pid_t pid = item->pid.virt;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment