Lines Matching refs:dir
39 static std::string find_proc_mount(const char* dir) { in find_proc_mount() argument
47 if (strcmp(dir, e->mnt_dir) == 0) { in find_proc_mount()
55 static std::string find_fstab_mount(const char* dir) { in find_fstab_mount() argument
61 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, dir); in find_fstab_mount()
69 static std::string find_mount(const char* dir) { in find_mount() argument
70 if (strcmp(dir, "/") == 0) { in find_mount()
71 return find_fstab_mount(dir); in find_mount()
73 return find_proc_mount(dir); in find_mount()
89 static bool remount_partition(int fd, const char* dir) { in remount_partition() argument
90 if (!directory_exists(dir)) { in remount_partition()
93 std::string dev = find_mount(dir); in remount_partition()
99 dir, dev.c_str(), strerror(errno)); in remount_partition()
102 if (mount(dev.c_str(), dir, "none", MS_REMOUNT, nullptr) == -1) { in remount_partition()
103 WriteFdFmt(fd, "remount of %s failed: %s\n", dir, strerror(errno)); in remount_partition()