Home
last modified time | relevance | path

Searched refs:fstab (Results 1 – 25 of 70) sorted by relevance

123

/system/core/fs_mgr/tests/
Dfs_mgr_test.cpp144 Fstab fstab; in TEST() local
145 ASSERT_TRUE(ReadFstabFromFile("/proc/mounts", &fstab)); in TEST()
154 ASSERT_LT(i, fstab.size()); in TEST()
155 auto& entry = fstab[i]; in TEST()
205 EXPECT_EQ(i, fstab.size()); in TEST()
231 Fstab fstab; in TEST() local
232 EXPECT_TRUE(ReadFstabFromFile(tf.path, &fstab)); in TEST()
233 ASSERT_EQ(11U, fstab.size()); in TEST()
235 EXPECT_EQ("/", fstab[0].mount_point); in TEST()
236 EXPECT_EQ(static_cast<unsigned long>(MS_RDONLY), fstab[0].flags); in TEST()
[all …]
/system/core/fs_mgr/libfs_avb/tests/
Dfs_avb_device_test.cpp38 Fstab fstab; in TEST() local
39 EXPECT_TRUE(ReadDefaultFstab(&fstab)); in TEST()
41 FstabEntry* system_entry = GetEntryForMountPoint(&fstab, "/system"); in TEST()
68 Fstab fstab; in TEST() local
69 EXPECT_TRUE(ReadFstabFromFile("/system/etc/fstab.postinstall", &fstab)); in TEST()
73 EXPECT_EQ(2UL, fstab.size()); in TEST()
76 FstabEntry* system_other = &fstab[1]; in TEST()
107 Fstab fstab; in TEST() local
108 EXPECT_TRUE(ReadFstabFromFile("/system/etc/fstab.postinstall", &fstab)); in TEST()
112 EXPECT_EQ(2UL, fstab.size()); in TEST()
[all …]
/system/gsid/tests/
Dboot_tests.cpp31 Fstab fstab; in TEST() local
32 if (ReadFstabFromDt(&fstab)) { in TEST()
33 auto entry = GetEntryForMountPoint(&fstab, "/metadata"); in TEST()
36 ASSERT_TRUE(ReadDefaultFstab(&fstab)); in TEST()
37 auto entry = GetEntryForMountPoint(&fstab, "/metadata"); in TEST()
44 Fstab fstab; in TEST() local
45 ASSERT_TRUE(ReadDefaultFstab(&fstab)); in TEST()
47 auto entry = GetEntryForMountPoint(&fstab, "/metadata"); in TEST()
/system/core/fs_mgr/
Dfs_mgr_fstab.cpp437 Fstab fstab; in ReadFstabFile() local
495 fstab.emplace_back(std::move(entry)); in ReadFstabFile()
498 if (fstab.empty()) { in ReadFstabFile()
504 if (!fs_mgr_update_for_slotselect(&fstab)) { in ReadFstabFile()
509 *fstab_out = std::move(fstab); in ReadFstabFile()
527 std::set<std::string> ExtraBootDevices(const Fstab& fstab) { in ExtraBootDevices() argument
530 for (const auto& entry : fstab) { in ExtraBootDevices()
579 bool EraseFstabEntry(Fstab* fstab, const std::string& mount_point) { in EraseFstabEntry() argument
580 auto iter = std::remove_if(fstab->begin(), fstab->end(), in EraseFstabEntry()
582 if (iter != fstab->end()) { in EraseFstabEntry()
[all …]
Dfs_mgr_roots.cpp36 FstabEntry* GetEntryForPath(Fstab* fstab, const std::string& path) { in GetEntryForPath() argument
40 auto entry = GetEntryForMountPoint(fstab, str); in GetEntryForPath()
74 bool EnsurePathMounted(Fstab* fstab, const std::string& path, const std::string& mount_pt) { in EnsurePathMounted() argument
75 auto rec = GetEntryForPath(fstab, path); in EnsurePathMounted()
138 bool EnsurePathUnmounted(Fstab* fstab, const std::string& path) { in EnsurePathUnmounted() argument
139 auto rec = GetEntryForPath(fstab, path); in EnsurePathUnmounted()
172 Fstab fstab; in GetSystemRoot() local
173 if (!ReadDefaultFstab(&fstab)) { in GetSystemRoot()
178 auto entry = GetEntryForMountPoint(&fstab, kSystemRoot); in GetSystemRoot()
Dfs_mgr_remount.cpp196 android::fs_mgr::Fstab fstab; in do_remount() local
199 fstab_read = android::fs_mgr::ReadFstabFromFile(fstab_file, &fstab); in do_remount()
201 fstab_read = android::fs_mgr::ReadDefaultFstab(&fstab); in do_remount()
203 if (!GetEntryForMountPoint(&fstab, "/system") && !GetEntryForMountPoint(&fstab, "/")) { in do_remount()
207 if (entry->fs_type != "rootfs") fstab.emplace_back(*entry); in do_remount()
212 if (!fstab_read || fstab.empty()) { in do_remount()
234 auto overlayfs_candidates = fs_mgr_overlayfs_candidate_list(fstab); in do_remount()
238 for (auto const& entry : fstab) { in do_remount()
260 auto it = std::find_if(fstab.begin(), fstab.end(), find_part); in do_remount()
261 if (it == fstab.end()) { in do_remount()
[all …]
Dfs_mgr.cpp831 static bool mount_with_alternatives(const Fstab& fstab, int start_idx, int* end_idx, in mount_with_alternatives() argument
840 i < fstab.size() && fstab[start_idx].mount_point == fstab[i].mount_point; i++) { in mount_with_alternatives()
845 LERROR << __FUNCTION__ << "(): skipping fstab dup mountpoint=" << fstab[i].mount_point in mount_with_alternatives()
846 << " rec[" << i << "].fs_type=" << fstab[i].fs_type << " already mounted as " in mount_with_alternatives()
847 << fstab[*attempted_idx].fs_type; in mount_with_alternatives()
851 int fs_stat = prepare_fs_for_mount(fstab[i].blk_device, fstab[i]); in mount_with_alternatives()
854 << "(): skipping mount due to invalid magic, mountpoint=" << fstab[i].mount_point in mount_with_alternatives()
855 << " blk_dev=" << realpath(fstab[i].blk_device) << " rec[" << i in mount_with_alternatives()
856 << "].fs_type=" << fstab[i].fs_type; in mount_with_alternatives()
863 if (!__mount(fstab[i].blk_device, fstab[i].mount_point, fstab[i])) { in mount_with_alternatives()
[all …]
Dfs_mgr_overlayfs.cpp318 Fstab fstab; in fs_mgr_overlayfs_already_mounted() local
320 if (!ReadFstabFromFile("/proc/mounts", &fstab)) { in fs_mgr_overlayfs_already_mounted()
325 for (const auto& entry : fstab) { in fs_mgr_overlayfs_already_mounted()
442 bool fs_mgr_overlayfs_has_logical(const Fstab& fstab) { in fs_mgr_overlayfs_has_logical() argument
443 for (const auto& entry : fstab) { in fs_mgr_overlayfs_has_logical()
1095 static bool CanUseSuperPartition(const Fstab& fstab, bool* is_virtual_ab) { in CanUseSuperPartition() argument
1098 if (!fs_mgr_rw_access(super_device) || !fs_mgr_overlayfs_has_logical(fstab)) { in CanUseSuperPartition()
1109 bool fs_mgr_overlayfs_create_scratch(const Fstab& fstab, std::string* scratch_device, in fs_mgr_overlayfs_create_scratch() argument
1120 if (CanUseSuperPartition(fstab, &is_virtual_ab)) { in fs_mgr_overlayfs_create_scratch()
1133 bool fs_mgr_overlayfs_setup_scratch(const Fstab& fstab, bool* change) { in fs_mgr_overlayfs_setup_scratch() argument
[all …]
Dfs_mgr_slotselect.cpp56 bool fs_mgr_update_for_slotselect(Fstab* fstab) { in fs_mgr_update_for_slotselect() argument
59 for (auto& entry : *fstab) { in fs_mgr_update_for_slotselect()
Dfs_mgr_priv.h92 bool fs_mgr_update_for_slotselect(android::fs_mgr::Fstab* fstab);
100 bool fs_mgr_teardown_verity(android::fs_mgr::FstabEntry* fstab);
/system/core/fs_mgr/include/
Dfs_mgr.h64 int fs_mgr_mount_all(android::fs_mgr::Fstab* fstab, int mount_mode);
69 int fs_mgr_do_mount(android::fs_mgr::Fstab* fstab, const char* n_name, char* n_blk_device,
71 int fs_mgr_do_mount(android::fs_mgr::Fstab* fstab, const char* n_name, char* n_blk_device,
79 bool fs_mgr_swapon_all(const android::fs_mgr::Fstab& fstab);
92 int fs_mgr_setup_verity(android::fs_mgr::FstabEntry* fstab, bool wait_for_verity_dev);
108 int fs_mgr_umount_all(android::fs_mgr::Fstab* fstab);
112 android::fs_mgr::Fstab* fstab, const std::string& data_block_device);
113 int fs_mgr_remount_userdata_into_checkpointing(android::fs_mgr::Fstab* fstab);
Dfs_mgr_overlayfs.h27 android::fs_mgr::Fstab fs_mgr_overlayfs_candidate_list(const android::fs_mgr::Fstab& fstab);
29 bool fs_mgr_overlayfs_mount_all(android::fs_mgr::Fstab* fstab);
30 std::vector<std::string> fs_mgr_overlayfs_required_devices(android::fs_mgr::Fstab* fstab);
48 void MapScratchPartitionIfNeeded(Fstab* fstab,
/system/core/fs_mgr/include_fstab/fstab/
Dfstab.h100 bool ReadFstabFromFile(const std::string& path, Fstab* fstab);
101 bool ReadFstabFromDt(Fstab* fstab, bool log = true);
102 bool ReadDefaultFstab(Fstab* fstab);
103 bool SkipMountingPartitions(Fstab* fstab);
105 FstabEntry* GetEntryForMountPoint(Fstab* fstab, const std::string& path);
107 std::vector<FstabEntry*> GetEntriesForMountPoint(Fstab* fstab, const std::string& path);
117 void TransformFstabForDsu(Fstab* fstab, const std::vector<std::string>& dsu_partitions);
/system/core/init/
Dfirst_stage_mount.cpp78 FirstStageMount(Fstab fstab);
125 FirstStageMountVBootV1(Fstab fstab) : FirstStageMount(std::move(fstab)) {} in FirstStageMountVBootV1() argument
137 FirstStageMountVBootV2(Fstab fstab);
151 static inline bool IsDtVbmetaCompatible(const Fstab& fstab) { in IsDtVbmetaCompatible() argument
152 if (std::any_of(fstab.begin(), fstab.end(), in IsDtVbmetaCompatible()
160 Fstab fstab; in ReadFirstStageFstab() local
161 if (!ReadFstabFromDt(&fstab)) { in ReadFirstStageFstab()
162 if (ReadDefaultFstab(&fstab)) { in ReadFirstStageFstab()
163 fstab.erase(std::remove_if(fstab.begin(), fstab.end(), in ReadFirstStageFstab()
167 fstab.end()); in ReadFirstStageFstab()
[all …]
Dmount_handler.cpp55 } else if (android::fs_mgr::Fstab fstab; android::fs_mgr::ReadDefaultFstab(&fstab)) { in ParseMount() local
56 auto entry = GetEntryForMountPoint(&fstab, "/"); in ParseMount()
57 if (entry || (entry = GetEntryForMountPoint(&fstab, "/system"))) { in ParseMount()
Dbuiltins.cpp658 Fstab fstab; in do_mount_all() local
660 if (!ReadDefaultFstab(&fstab)) { in do_mount_all()
664 if (!ReadFstabFromFile(mount_all->fstab_path, &fstab)) { in do_mount_all()
669 auto mount_fstab_return_code = fs_mgr_mount_all(&fstab, mount_all->mode); in do_mount_all()
694 Fstab fstab; in do_umount_all() local
696 if (!ReadDefaultFstab(&fstab)) { in do_umount_all()
700 if (!ReadFstabFromFile(*umount_all, &fstab)) { in do_umount_all()
705 if (auto result = fs_mgr_umount_all(&fstab); result != 0) { in do_umount_all()
716 Fstab fstab; in do_swapon_all() local
718 if (!ReadDefaultFstab(&fstab)) { in do_swapon_all()
[all …]
/system/extras/boot_control_copy/
Dbootinfo.cpp43 static bool open_fstab(Fstab* fstab) in open_fstab() argument
45 return ReadDefaultFstab(fstab) || ReadFstabFromFile("/fstab.device", fstab); in open_fstab()
70 Fstab fstab; in boot_info_open_partition() local
71 if (!open_fstab(&fstab)) { in boot_info_open_partition()
74 auto record = GetEntryForMountPoint(&fstab, "/misc"); in boot_info_open_partition()
/system/extras/cppreopts/
Dcppreopts.rc25 # /system. Therefore, the fstab can only be in either /system or /product.
26 on property:sys.cppreopt=requested && property:ro.postinstall.fstab.prefix=/system
27 mount_all /system/etc/fstab.postinstall
31 umount_all /system/etc/fstab.postinstall
34 on property:sys.cppreopt=requested && property:ro.postinstall.fstab.prefix=/product
35 mount_all /product/etc/fstab.postinstall
39 umount_all /product/etc/fstab.postinstall
DAndroid.bp31 "fstab.postinstall",
36 name: "fstab.postinstall",
37 src: "fstab.postinstall",
/system/core/fs_mgr/include/fs_mgr/
Droots.h30 FstabEntry* GetEntryForPath(Fstab* fstab, const std::string& path);
38 bool EnsurePathMounted(Fstab* fstab, const std::string& path, const std::string& mount_point = "");
42 bool EnsurePathUnmounted(Fstab* fstab, const std::string& path);
/system/core/fs_mgr/libsnapshot/
Dutility.cpp126 Fstab fstab; in New() local
127 if (!ReadDefaultFstab(&fstab)) { in New()
132 if (GetEntryForPath(&fstab, path) == nullptr) { in New()
137 if (!EnsurePathMounted(&fstab, path)) { in New()
141 return std::unique_ptr<AutoUnmountDevice>(new AutoUnmountDevice(path, std::move(fstab))); in New()
/system/sepolicy/private/
Dlpdumpd.te16 # Allow lpdumpd to read fstab.
20 # Triggered when lpdumpd tries to read default fstab.
/system/sepolicy/prebuilts/api/30.0/private/
Dlpdumpd.te16 # Allow lpdumpd to read fstab.
20 # Triggered when lpdumpd tries to read default fstab.
/system/sepolicy/prebuilts/api/29.0/private/
Dlpdumpd.te16 # Allow lpdumpd to read fstab.
20 # Triggered when lpdumpd tries to read default fstab.
/system/core/set-verity-state/
Dset-verity-state.cpp251 android::fs_mgr::Fstab fstab; in main() local
252 if (!android::fs_mgr::ReadDefaultFstab(&fstab)) { in main()
259 for (const auto& entry : fstab) { in main()

123