main: corrected do_switch_root()

do_switch_root now mount moves "/dev", "/proc", "/sys", "/run" and
removes the old root recursively.
This commit is contained in:
Harald Hoyer
2012-05-21 18:45:10 +02:00
committed by Lennart Poettering
parent 386da8589b
commit f67cc036ba
3 changed files with 51 additions and 7 deletions
+1 -1
View File
@@ -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;
+1
View File
@@ -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);