Searched refs:new_root (Results 1 – 2 of 2) sorted by relevance
37 std::vector<std::string> GetMounts(const std::string& new_root) { in GetMounts() argument53 if (mentry->mnt_dir == new_root) { in GetMounts()72 void SwitchRoot(const std::string& new_root) { in SwitchRoot() argument73 auto mounts = GetMounts(new_root); in SwitchRoot()75 LOG(INFO) << "Switching root to '" << new_root << "'"; in SwitchRoot()78 auto new_mount_path = new_root + mount_path; in SwitchRoot()85 if (chdir(new_root.c_str()) != 0) { in SwitchRoot()86 PLOG(FATAL) << "Could not chdir to new_root, '" << new_root << "'"; in SwitchRoot()89 if (mount(new_root.c_str(), "/", nullptr, MS_MOVE, nullptr) != 0) { in SwitchRoot()90 PLOG(FATAL) << "Unable to move root mount to new_root, '" << new_root << "'"; in SwitchRoot()
24 void SwitchRoot(const std::string& new_root);