2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-29 21:38:16 +00:00

namespace: move struct ns_id into namespace.h

It's going to be used for restoring namespaces. For example we need to
enumirate the ns_ids list for restoring mount namespaces.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin 2014-03-11 19:18:00 +04:00 committed by Pavel Emelyanov
parent ee71c396fa
commit 5b564db91e
2 changed files with 10 additions and 9 deletions

View File

@ -9,6 +9,15 @@ struct ns_desc {
size_t len;
};
struct ns_id {
unsigned int kid;
unsigned int id;
pid_t pid;
struct ns_desc *nd;
struct ns_id *next;
};
extern struct ns_id *ns_ids;
#define NS_DESC_ENTRY(_cflag, _str) \
{ \
.cflag = _cflag, \

View File

@ -113,15 +113,7 @@ int restore_ns(int rst, struct ns_desc *nd)
return ret;
}
struct ns_id {
unsigned int kid;
unsigned int id;
pid_t pid;
struct ns_desc *nd;
struct ns_id *next;
};
static struct ns_id *ns_ids;
struct ns_id *ns_ids = NULL;
static unsigned int ns_next_id = 1;
unsigned long current_ns_mask = 0;