Commit bec1dd18 authored by Pavel Emelyanov's avatar Pavel Emelyanov

ns: Move all CLONE_FOO into namespaces.h

This removes double declaration of CLONE_NEWCGROUP. Also -- removes
re-declaration of the CLONE_ALLNS in pstree.c.

Tycho, the two CLONE_ALLNS-s we had differ from each other :) The one
in pstree.c doesn't have CLONE_NEWCGROUP. I believe this was just a
misprint :) tests seem to pass.
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Acked-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
Acked-by: 's avatarTycho Andersen <tycho.andersen@canonical.com>
parent 7fdbfba4
...@@ -4,12 +4,36 @@ ...@@ -4,12 +4,36 @@
#include "compiler.h" #include "compiler.h"
#include "files.h" #include "files.h"
/* including syscall-types.h gives another weird error; do we really need to #ifndef CLONE_NEWNS
* define this twice? */ #define CLONE_NEWNS 0x00020000
#endif
#ifndef CLONE_NEWPID
#define CLONE_NEWPID 0x20000000
#endif
#ifndef CLONE_NEWUTS
#define CLONE_NEWUTS 0x04000000
#endif
#ifndef CLONE_NEWIPC
#define CLONE_NEWIPC 0x08000000
#endif
#ifndef CLONE_NEWNET
#define CLONE_NEWNET 0x40000000
#endif
#ifndef CLONE_NEWUSER
#define CLONE_NEWUSER 0x10000000
#endif
#ifndef CLONE_NEWCGROUP #ifndef CLONE_NEWCGROUP
#define CLONE_NEWCGROUP 0x02000000 #define CLONE_NEWCGROUP 0x02000000
#endif #endif
#define CLONE_ALLNS (CLONE_NEWPID | CLONE_NEWNET | CLONE_NEWIPC | CLONE_NEWUTS | CLONE_NEWNS | CLONE_NEWUSER | CLONE_NEWCGROUP)
/* Nested namespaces are supported only for these types */ /* Nested namespaces are supported only for these types */
#define CLONE_SUBNS (CLONE_NEWNS) #define CLONE_SUBNS (CLONE_NEWNS)
......
...@@ -42,36 +42,6 @@ struct itimerspec; ...@@ -42,36 +42,6 @@ struct itimerspec;
#define F_GETFD 1 #define F_GETFD 1
#endif #endif
#ifndef CLONE_NEWNS
#define CLONE_NEWNS 0x00020000
#endif
#ifndef CLONE_NEWPID
#define CLONE_NEWPID 0x20000000
#endif
#ifndef CLONE_NEWUTS
#define CLONE_NEWUTS 0x04000000
#endif
#ifndef CLONE_NEWIPC
#define CLONE_NEWIPC 0x08000000
#endif
#ifndef CLONE_NEWNET
#define CLONE_NEWNET 0x40000000
#endif
#ifndef CLONE_NEWUSER
#define CLONE_NEWUSER 0x10000000
#endif
#ifndef CLONE_NEWCGROUP
#define CLONE_NEWCGROUP 0x02000000
#endif
#define CLONE_ALLNS (CLONE_NEWPID | CLONE_NEWNET | CLONE_NEWIPC | CLONE_NEWUTS | CLONE_NEWNS | CLONE_NEWUSER | CLONE_NEWCGROUP)
struct krlimit { struct krlimit {
unsigned long rlim_cur; unsigned long rlim_cur;
unsigned long rlim_max; unsigned long rlim_max;
......
...@@ -18,8 +18,6 @@ ...@@ -18,8 +18,6 @@
struct pstree_item *root_item; struct pstree_item *root_item;
#define CLONE_ALLNS (CLONE_NEWPID | CLONE_NEWNET | CLONE_NEWIPC | CLONE_NEWUTS | CLONE_NEWNS | CLONE_NEWUSER)
void core_entry_free(CoreEntry *core) void core_entry_free(CoreEntry *core)
{ {
if (core->tc && core->tc->timers) if (core->tc && core->tc->timers)
......
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