summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
authorHarald Hoyer <harald@redhat.com>2012-05-16 14:22:39 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-21 18:45:10 +0200
commitf67cc036ba92a3c71acb664ed2d548de5827cf1f (patch)
tree4de0fa5277126ca206773e534a81829b7584608b /src/shared
parent386da8589b4206b7fc5f5729908473edacbee013 (diff)
main: corrected do_switch_root()
do_switch_root now mount moves "/dev", "/proc", "/sys", "/run" and removes the old root recursively.
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/util.c2
-rw-r--r--src/shared/util.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c
index 0234f3b483..53185403d6 100644
--- a/src/shared/util.c
+++ b/src/shared/util.c
@@ -3139,7 +3139,7 @@ int get_ctty(pid_t pid, dev_t *_devnr, char **r) {
return 0;
}
-static int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
+int rm_rf_children(int fd, bool only_dirs, bool honour_sticky) {
DIR *d;
int ret = 0;
diff --git a/src/shared/util.h b/src/shared/util.h
index 49756dc21f..0af0299dbb 100644
--- a/src/shared/util.h
+++ b/src/shared/util.h
@@ -349,6 +349,7 @@ int get_ctty(pid_t, dev_t *_devnr, char **r);
int chmod_and_chown(const char *path, mode_t mode, uid_t uid, gid_t gid);
int fchmod_and_fchown(int fd, mode_t mode, uid_t uid, gid_t gid);
+int rm_rf_children(int fd, bool only_dirs, bool honour_sticky);
int rm_rf(const char *path, bool only_dirs, bool delete_root, bool honour_sticky);
int pipe_eof(int fd);