2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-03 15:55:53 +00:00

ns: Introduce ns descriptors

These are structs that (now) tie together ns string
and the CLONE_ flag. It's nice to have one (some code
becomes simpler) and will help us with auto-namespaces
detection.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-01-15 23:24:01 +04:00
parent eb8f8c12cd
commit 3a1c7d1d76
12 changed files with 60 additions and 18 deletions

View File

@@ -8,7 +8,14 @@ int dump_namespaces(struct pid *pid, unsigned int ns_flags);
int prepare_namespace(int pid, unsigned long clone_flags);
struct cr_options;
int try_show_namespaces(int pid, struct cr_options *);
int switch_ns(int pid, int type, char *ns, int *rst);
int restore_ns(int rst, int type);
struct ns_desc {
unsigned int cflag;
char *str;
};
int switch_ns(int pid, struct ns_desc *nd, int *rst);
int restore_ns(int rst, struct ns_desc *nd);
extern struct ns_desc pid_ns_desc;
#endif /* __CR_NS_H__ */