Home
last modified time | relevance | path

Searched refs:mount_point (Results 1 – 25 of 45) sorted by relevance

12

/system/core/fs_mgr/
Dfs_mgr_remount.cpp70 if (entry.mount_point == "/") return "/system"; in system_mount_point()
71 return entry.mount_point; in system_mount_point()
76 auto mount_point = system_mount_point(entry); in is_wrapped() local
78 [&mount_point](const auto& entry) { in is_wrapped()
79 return android::base::StartsWith(mount_point, in is_wrapped()
239 GetEntryForMountPoint(&overlayfs_candidates, entry.mount_point) || in do_remount()
252 const auto mount_point = system_mount_point(entry); in do_remount() local
253 if (partition == mount_point) return true; in do_remount()
254 if (partition == android::base::Basename(mount_point)) return true; in do_remount()
268 << wrap->mount_point << ", switching"; in do_remount()
[all …]
Dfs_mgr_roots.cpp60 static MountState GetMountState(const std::string& mount_point) { in GetMountState() argument
67 auto mv = GetEntryForMountPoint(&mounted_fstab, mount_point); in GetMountState()
104 const std::string mount_point = mount_pt.empty() ? rec->mount_point : mount_pt; in EnsurePathMounted() local
106 auto mounted = GetMountState(mount_point); in EnsurePathMounted()
116 LERROR << "unknown fs_type \"" << rec->fs_type << "\" for " << mount_point; in EnsurePathMounted()
120 int result = fs_mgr_do_mount_one(*rec, mount_point); in EnsurePathMounted()
122 PERROR << "Failed to mount " << mount_point << "; formatting"; in EnsurePathMounted()
125 PERROR << "Failed to format " << mount_point; in EnsurePathMounted()
128 result = fs_mgr_do_mount_one(*rec, mount_point); in EnsurePathMounted()
132 PERROR << "Failed to mount " << mount_point; in EnsurePathMounted()
[all …]
Dfs_mgr_overlayfs.cpp152 bool fs_mgr_filesystem_has_space(const std::string& mount_point) { in fs_mgr_filesystem_has_space() argument
157 if (statvfs(mount_point.c_str(), &vst)) { in fs_mgr_filesystem_has_space()
204 if (!fs_mgr_filesystem_has_space(entry->mount_point)) { in fs_mgr_overlayfs_enabled()
216 auto has_shared_blocks = fs_mgr_has_shared_blocks(entry->mount_point, entry->blk_device); in fs_mgr_overlayfs_enabled()
217 if (!has_shared_blocks && (entry->mount_point == "/system")) { in fs_mgr_overlayfs_enabled()
274 std::string fs_mgr_get_overlayfs_candidate(const std::string& mount_point) { in fs_mgr_get_overlayfs_candidate() argument
275 if (!fs_mgr_is_dir(mount_point)) return ""; in fs_mgr_get_overlayfs_candidate()
276 const auto base = android::base::Basename(mount_point) + "/"; in fs_mgr_get_overlayfs_candidate()
293 std::string fs_mgr_get_overlayfs_options(const std::string& mount_point) { in fs_mgr_get_overlayfs_options() argument
294 auto candidate = fs_mgr_get_overlayfs_candidate(mount_point); in fs_mgr_get_overlayfs_options()
[all …]
Dfs_mgr_verity.cpp388 const std::string mount_point(basename(entry->mount_point.c_str())); in fs_mgr_setup_verity() local
462 LINFO << "Enabling dm-verity for " << mount_point.c_str() in fs_mgr_setup_verity()
470 if (load_verity_table(dm, mount_point, verity.data_size, &params, format_verity_table) == 0) { in fs_mgr_setup_verity()
476 LINFO << "Disabling error correction for " << mount_point.c_str(); in fs_mgr_setup_verity()
479 … if (load_verity_table(dm, mount_point, verity.data_size, &params, format_verity_table) == 0) { in fs_mgr_setup_verity()
485 if (load_verity_table(dm, mount_point, verity.data_size, &params, format_legacy_verity_table) == in fs_mgr_setup_verity()
492 LINFO << "Falling back to EIO mode for " << mount_point.c_str(); in fs_mgr_setup_verity()
495 if (load_verity_table(dm, mount_point, verity.data_size, &params, in fs_mgr_setup_verity()
501 LERROR << "Failed to load verity table for " << mount_point.c_str(); in fs_mgr_setup_verity()
505 if (!dm.GetDmDevicePathByName(mount_point, &verity_blk_name)) { in fs_mgr_setup_verity()
[all …]
Dfs_mgr.cpp688 check_fs(blk_device, entry.fs_type, entry.mount_point, &fs_stat); in prepare_fs_for_mount()
836 i < fstab.size() && fstab[start_idx].mount_point == fstab[i].mount_point; i++) { in mount_with_alternatives()
841 LERROR << __FUNCTION__ << "(): skipping fstab dup mountpoint=" << fstab[i].mount_point in mount_with_alternatives()
850 << "(): skipping mount due to invalid magic, mountpoint=" << fstab[i].mount_point in mount_with_alternatives()
859 if (!__mount(fstab[i].blk_device, fstab[i].mount_point, fstab[i])) { in mount_with_alternatives()
864 << fstab[i].mount_point << " with fs_type=" << fstab[i].fs_type in mount_with_alternatives()
878 check_fs(fstab[i].blk_device, fstab[i].fs_type, fstab[i].mount_point, &fs_stat); in mount_with_alternatives()
957 auto convert_fde_name = entry.mount_point + "/misc/vold/convert_fde"; in needs_block_encryption()
962 auto convert_fbe_name = entry.mount_point + "/convert_fbe"; in needs_block_encryption()
977 if (umount(entry.mount_point.c_str()) == 0) { in handle_encryptable()
[all …]
Dfs_mgr_fstab.cpp359 std::string mount_point; in ReadFstabFromDt() local
364 mount_point = value; in ReadFstabFromDt()
366 mount_point = android::base::StringPrintf("/%s", dp->d_name); in ReadFstabFromDt()
368 fstab_entry.push_back(mount_point); in ReadFstabFromDt()
391 fstab_dt_entries.emplace_back(mount_point, android::base::Join(fstab_entry, " ")); in ReadFstabFromDt()
460 entry.mount_point = p; in ReadFstabFile()
559 .mount_point = "/data", in BuildDsuUserdataFstabEntry()
573 bool EraseFstabEntry(Fstab* fstab, const std::string& mount_point) { in EraseFstabEntry() argument
575 [&](const auto& entry) { return entry.mount_point == mount_point; }); in EraseFstabEntry()
621 std::string mount_point = "/" + lp_name; in TransformFstabForDsu() local
[all …]
Dfs_mgr_vendor_overlay.cpp71 bool fs_mgr_vendor_overlay_mount(const std::pair<std::string, std::string>& mount_point) { in fs_mgr_vendor_overlay_mount() argument
72 const auto [overlay_top, mount_dir] = mount_point; in fs_mgr_vendor_overlay_mount()
/system/core/fs_mgr/tests/
Dfs_mgr_test.cpp158 EXPECT_EQ(mentry->mnt_dir, entry.mount_point); in TEST()
235 EXPECT_EQ("/", fstab[0].mount_point); in TEST()
239 EXPECT_EQ("/metadata", fstab[1].mount_point); in TEST()
243 EXPECT_EQ("/data", fstab[2].mount_point); in TEST()
247 EXPECT_EQ("/misc", fstab[3].mount_point); in TEST()
251 EXPECT_EQ("/vendor/firmware_mnt", fstab[4].mount_point); in TEST()
258 EXPECT_EQ("auto", fstab[5].mount_point); in TEST()
262 EXPECT_EQ("none", fstab[6].mount_point); in TEST()
266 EXPECT_EQ("none2", fstab[7].mount_point); in TEST()
270 EXPECT_EQ("none3", fstab[8].mount_point); in TEST()
[all …]
/system/apex/apexd/
Dapexd_prepostinstall.cpp88 << mount.mount_point << " after " << name << ": " in StageFnInstall()
102 std::string mount_point = in StageFnInstall() local
105 auto mount_data = apexd_private::TempMountPackage(apex, mount_point); in StageFnInstall()
133 mounted_apexes[hook_idx].mount_point, // Make the APEX with hook first. in StageFnInstall()
137 args.push_back(mounted_apexes[i].mount_point); in StageFnInstall()
163 auto bind_fn = [&fn, name](const std::string& mount_point) { in RunFnInstall() argument
168 ReadManifest(mount_point + "/" + kManifestFilenamePb); in RunFnInstall()
170 LOG(ERROR) << "Could not read manifest from " << mount_point << "/" in RunFnInstall()
175 manifest_or = ReadManifest(mount_point + "/" + kManifestFilenameJson); in RunFnInstall()
177 LOG(ERROR) << "Could not read manifest from " << mount_point << "/" in RunFnInstall()
[all …]
Dapex_database.h36 std::string mount_point; // Path this apex is mounted on. member
46 const std::string& mount_point, in MountedApexData()
51 mount_point(mount_point), in MountedApexData()
68 compare_val = mount_point.compare(rhs.mount_point);
Dapex_shim.cpp111 Result<void> ValidateShimApex(const std::string& mount_point, in ValidateShimApex() argument
113 LOG(DEBUG) << "Validating shim apex " << mount_point; in ValidateShimApex()
125 auto iter = fs::recursive_directory_iterator(mount_point, ec); in ValidateShimApex()
133 auto resolved_mount_point = fs::path(mount_point).string(); in ValidateShimApex()
158 return Error() << "Failed to scan " << mount_point << " : " in ValidateShimApex()
Dapexd.cpp349 const std::string& mount_point) { in VerifyMountedImage() argument
350 auto result = apex.VerifyManifestMatches(mount_point); in VerifyMountedImage()
355 return shim::ValidateShimApex(mount_point, apex); in VerifyMountedImage()
504 const ApexFile& apex, const std::string& mount_point) { in VerifyAndTempMountPackage() argument
506 LOG(DEBUG) << "Temp mounting " << package_id << " to " << mount_point; in VerifyAndTempMountPackage()
515 return MountPackageImpl(apex, mount_point, temp_device_name, in VerifyAndTempMountPackage()
522 << data.mount_point; in Unmount()
524 if (umount2(data.mount_point.c_str(), UMOUNT_NOFOLLOW) != 0 && in Unmount()
526 return ErrnoError() << "Failed to unmount directory " << data.mount_point; in Unmount()
530 if (rmdir(data.mount_point.c_str()) != 0) { in Unmount()
[all …]
Dapex_shim.h29 android::base::Result<void> ValidateShimApex(const std::string& mount_point,
/system/core/init/
Dmount_handler.cpp85 if (stat(entry.mount_point.c_str(), &sb) || !S_ISDIR(sb.st_mode)) value = ""; in SetMountProperty()
88 if (android::base::StartsWith(entry.mount_point, "/apex/")) value = ""; in SetMountProperty()
90 auto mount_prop = entry.mount_point; in SetMountProperty()
103 MountHandlerEntry::MountHandlerEntry(const std::string& blk_device, const std::string& mount_point, in MountHandlerEntry() argument
105 : blk_device(blk_device), mount_point(mount_point), fs_type(fs_type) {} in MountHandlerEntry()
110 if (mount_point < r.mount_point) return true; in operator <()
111 if (mount_point > r.mount_point) return false; in operator <()
Dmount_namespace.cpp38 static bool BindMount(const std::string& source, const std::string& mount_point, in BindMount() argument
44 if (mount(source.c_str(), mount_point.c_str(), nullptr, mountflags, nullptr) == -1) { in BindMount()
51 static bool MakeShared(const std::string& mount_point, bool recursive = false) { in MakeShared() argument
56 if (mount(nullptr, mount_point.c_str(), nullptr, mountflags, nullptr) == -1) { in MakeShared()
63 static bool MakeSlave(const std::string& mount_point, bool recursive = false) { in MakeSlave() argument
68 if (mount(nullptr, mount_point.c_str(), nullptr, mountflags, nullptr) == -1) { in MakeSlave()
75 static bool MakePrivate(const std::string& mount_point, bool recursive = false) { in MakePrivate() argument
80 if (mount(nullptr, mount_point.c_str(), nullptr, mountflags, nullptr) == -1) { in MakePrivate()
Dfirst_stage_mount.cpp184 return entry.mount_point == "/" && entry.fs_type != "rootfs"; in GetRootEntry()
218 LOG(ERROR) << "Image rollback detected for " << fstab_entry.mount_point in IsStandaloneImageRollback()
377 PLOG(ERROR) << "Failed to setup verity for '" << begin->mount_point << "'"; in MountPartition()
385 for (; current != fstab_.end() && current->mount_point == begin->mount_point; current++) { in MountPartition()
455 return entry.mount_point == "/system"; in TrySwitchSystemAsRoot()
478 return entry.mount_point == "/metadata"; in MountPartitions()
497 if (current->mount_point == "/system") { in MountPartitions()
513 LOG(INFO) << "Failed to mount " << current->mount_point in MountPartitions()
516 LOG(INFO) << "Failed to mount " << current->mount_point in MountPartitions()
519 PLOG(ERROR) << "Failed to mount " << current->mount_point; in MountPartitions()
[all …]
Dmount_handler.h31 MountHandlerEntry(const std::string& blk_device, const std::string& mount_point,
37 const std::string mount_point; member
/system/core/set-verity-state/
Dset-verity-state.cpp63 static bool set_verity_enabled_state(const char* block_device, const char* mount_point, in set_verity_enabled_state() argument
86 printf("Verity already disabled on %s\n", mount_point); in set_verity_enabled_state()
91 printf("Verity already enabled on %s\n", mount_point); in set_verity_enabled_state()
103 if (enable ? fs_mgr_overlayfs_teardown(mount_point, &change) in set_verity_enabled_state()
104 : fs_mgr_overlayfs_setup(nullptr, mount_point, &change)) { in set_verity_enabled_state()
106 printf("%s overlayfs for %s\n", enable ? "disabling" : "using", mount_point); in set_verity_enabled_state()
112 mount_point, strerror(errno)); in set_verity_enabled_state()
115 printf("Verity %s on %s\n", enable ? "enabled" : "disabled", mount_point); in set_verity_enabled_state()
261 if (set_verity_enabled_state(entry.blk_device.c_str(), entry.mount_point.c_str(), enable)) { in main()
/system/core/fs_mgr/include/
Dfs_mgr_overlayfs.h31 bool fs_mgr_overlayfs_setup(const char* backing = nullptr, const char* mount_point = nullptr,
33 bool fs_mgr_overlayfs_teardown(const char* mount_point = nullptr, bool* change = nullptr);
35 bool fs_mgr_has_shared_blocks(const std::string& mount_point, const std::string& dev);
36 std::string fs_mgr_get_context(const std::string& mount_point);
/system/extras/ext4_utils/
Dmkuserimg_mke2fs.py170 if args.mount_point:
171 mke2fs_opts += ["-M", args.mount_point]
186 ["-f", args.src_dir, "-a", args.mount_point,
201 if not args.mount_point:
204 if args.mount_point[0] != '/':
205 args.mount_point = '/' + args.mount_point
Dtest_mkuserimg_mke2fs.py42 self.assertEqual("data", args.mount_point)
76 self.assertEqual("data", args.mount_point)
129 args.file_contexts, "-f", args.src_dir, "-a", args.mount_point,
/system/core/fs_mgr/libfs_avb/
Davb_ops.cpp113 std::string mount_point(partition_name); in DeriveMountPoint() local
116 mount_point.erase(found); // converts system_a => system in DeriveMountPoint()
119 return "/" + mount_point; in DeriveMountPoint()
152 const auto mount_point = DeriveMountPoint(partition_name); in GetLogicalPath() local
153 if (mount_point.empty()) return ""; in GetLogicalPath()
155 auto fstab_entry = GetEntryForMountPoint(&fstab_, mount_point); in GetLogicalPath()
/system/vold/
DMetadataCrypt.cpp89 static bool mount_via_fs_mgr(const char* mount_point, const char* blk_device) { in mount_via_fs_mgr() argument
100 auto mount_rc = fs_mgr_do_mount(&fstab_default, const_cast<char*>(mount_point), in mount_via_fs_mgr()
111 LOG(DEBUG) << "Mounted " << mount_point; in mount_via_fs_mgr()
271 bool fscrypt_mount_metadata_encrypted(const std::string& blk_device, const std::string& mount_point, in fscrypt_mount_metadata_encrypted() argument
273 LOG(DEBUG) << "fscrypt_mount_metadata_encrypted: " << mount_point << " " << needs_encrypt; in fscrypt_mount_metadata_encrypted()
280 auto data_rec = GetEntryForMountPoint(&fstab_default, mount_point); in fscrypt_mount_metadata_encrypted()
282 LOG(ERROR) << "Failed to get data_rec for " << mount_point; in fscrypt_mount_metadata_encrypted()
338 LOG(DEBUG) << "Mounting metadata-encrypted filesystem:" << mount_point; in fscrypt_mount_metadata_encrypted()
339 mount_via_fs_mgr(mount_point.c_str(), crypto_blkdev.c_str()); in fscrypt_mount_metadata_encrypted()
DMetadataCrypt.h29 const std::string& mount_point, bool needs_encrypt);
/system/core/fs_mgr/include/fs_mgr/
Droots.h38 bool EnsurePathMounted(Fstab* fstab, const std::string& path, const std::string& mount_point = "");

12