Commit 5b564db9 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ee71c396
......@@ -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, \
......
......@@ -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;
......
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