Lines Matching defs:new_root
42 int switch_root(const char *new_root, const char *oldroot, bool detach_oldroot, unsigned long mountflags) {
56 if (path_equal(new_root, "/"))
59 temporary_old_root = strjoina(new_root, oldroot);
64 if (stat(new_root, &new_root_stat) < 0)
65 return log_error_errno(errno, "Failed to stat directory %s: %m", new_root);
79 xsprintf(new_mount, "%s%s", new_root, i);
112 (void) base_filesystem_create(new_root, UID_INVALID, GID_INVALID);
114 if (chdir(new_root) < 0)
115 return log_error_errno(errno, "Failed to change directory to %s: %m", new_root);
126 if (pivot_root(new_root, temporary_old_root) >= 0) {
135 } else if (mount(new_root, "/", NULL, MS_MOVE, NULL) < 0)
136 return log_error_errno(errno, "Failed to mount moving %s to /: %m", new_root);