You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by id...@apache.org on 2015/05/23 01:44:11 UTC
[2/2] mesos git commit: Remove unnecessary ifdefs for missing CLONE_
flags.
Remove unnecessary ifdefs for missing CLONE_ flags.
Review: https://reviews.apache.org/r/34620
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5f77cbcb
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5f77cbcb
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5f77cbcb
Branch: refs/heads/master
Commit: 5f77cbcb2ffd7e7511340e022281cee5e3b251f3
Parents: 02a8e40
Author: Ian Downes <id...@twitter.com>
Authored: Fri May 22 16:28:59 2015 -0700
Committer: Ian Downes <id...@twitter.com>
Committed: Fri May 22 16:43:42 2015 -0700
----------------------------------------------------------------------
src/linux/ns.hpp | 29 -----------------------------
1 file changed, 29 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5f77cbcb/src/linux/ns.hpp
----------------------------------------------------------------------
diff --git a/src/linux/ns.hpp b/src/linux/ns.hpp
index 27cf735..6876967 100644
--- a/src/linux/ns.hpp
+++ b/src/linux/ns.hpp
@@ -92,41 +92,12 @@ inline Try<int> nstype(const std::string& ns)
{
hashmap<std::string, int> nstypes;
-#ifdef CLONE_NEWNS
nstypes["mnt"] = CLONE_NEWNS;
-#else
- nstypes["mnt"] = 0x00020000;
-#endif
-
-#ifdef CLONE_NEWUTS
nstypes["uts"] = CLONE_NEWUTS;
-#else
- nstypes["uts"] = 0x04000000;
-#endif
-
-#ifdef CLONE_NEWIPC
nstypes["ipc"] = CLONE_NEWIPC;
-#else
- nstypes["ipc"] = 0x08000000;
-#endif
-
-#ifdef CLONE_NEWNET
nstypes["net"] = CLONE_NEWNET;
-#else
- nstypes["net"] = 0x40000000;
-#endif
-
-#ifdef CLONE_NEWUSER
nstypes["user"] = CLONE_NEWUSER;
-#else
- nstypes["user"] = 0x10000000;
-#endif
-
-#ifdef CLONE_NEWPID
nstypes["pid"] = CLONE_NEWPID;
-#else
- nstypes["pid"] = 0x20000000;
-#endif
if (!nstypes.contains(ns)) {
return Error("Unknown namespace '" + ns + "'");