summaryrefslogtreecommitdiff
path: root/src/core/namespace.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-19 20:32:44 +0200
committerLennart Poettering <lennart@poettering.net>2015-05-20 14:38:12 +0200
commit6458ec20b574edf7170fda61c51ccd3c6e73937f (patch)
tree0baed30f599b2e01b9e929ad483a23572c2e7187 /src/core/namespace.c
parenteba6fd30f2a27f51fa328484cb241807c6934ce1 (diff)
core,nspawn: unify code that moves the root dir
Diffstat (limited to 'src/core/namespace.c')
-rw-r--r--src/core/namespace.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/core/namespace.c b/src/core/namespace.c
index 5b782798c8..c0c64fd706 100644
--- a/src/core/namespace.c
+++ b/src/core/namespace.c
@@ -125,22 +125,6 @@ static void drop_duplicates(BindMount *m, unsigned *n) {
*n = t - m;
}
-static int mount_move_root(const char *path) {
- if (chdir(path) < 0)
- return -errno;
-
- if (mount(path, "/", NULL, MS_MOVE, NULL) < 0)
- return -errno;
-
- if (chroot(".") < 0)
- return -errno;
-
- if (chdir("/") < 0)
- return -errno;
-
- return 0;
-}
-
static int mount_dev(BindMount *m) {
static const char devnodes[] =
"/dev/null\0"