mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 13:58:34 +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:
parent
ee71c396fa
commit
5b564db91e
@ -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, \
|
||||
|
10
namespaces.c
10
namespaces.c
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user