2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

ns: Extend ns_desc to carry the length of the ns name

This will be needed for fast parsing of procfs ns references.

[ xemul: Add user_ns_desc here ]

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Cyrill Gorcunov
2013-05-20 13:30:17 +04:00
committed by Pavel Emelyanov
parent 4531f0ac7d
commit 30936058a0
6 changed files with 15 additions and 20 deletions

View File

@@ -9,9 +9,18 @@ struct cr_options;
struct ns_desc {
unsigned int cflag;
char *str;
size_t len;
};
#define NS_DESC_ENTRY(_cflag, _str) \
{ \
.cflag = _cflag, \
.str = _str, \
.len = sizeof(_str) - 1, \
}
extern struct ns_desc pid_ns_desc;
extern struct ns_desc user_ns_desc;
extern unsigned long current_ns_mask;
int dump_namespaces(struct pid *pid, unsigned int ns_flags);