/system/core/fs_mgr/include_fstab/fstab/ |
D | fstab.h | 33 struct fstab { struct 63 struct fstab* fs_mgr_read_fstab_default(); 64 struct fstab* fs_mgr_read_fstab_dt(); 65 struct fstab* fs_mgr_read_fstab(const char* fstab_path); 66 void fs_mgr_free_fstab(struct fstab* fstab); 68 int fs_mgr_add_entry(struct fstab* fstab, const char* mount_point, const char* fs_type, 70 struct fstab_rec* fs_mgr_get_entry_for_mount_point(struct fstab* fstab, const std::string& path); 71 int fs_mgr_is_voldmanaged(const struct fstab_rec* fstab); 72 int fs_mgr_is_nonremovable(const struct fstab_rec* fstab); 73 int fs_mgr_is_verified(const struct fstab_rec* fstab); [all …]
|
/system/core/fs_mgr/ |
D | fs_mgr_fstab.cpp | 506 static struct fstab *fs_mgr_read_fstab_file(FILE *fstab_file) in fs_mgr_read_fstab_file() 514 struct fstab *fstab = NULL; in fs_mgr_read_fstab_file() local 542 fstab = static_cast<struct fstab *>(calloc(1, sizeof(struct fstab))); in fs_mgr_read_fstab_file() 543 fstab->num_entries = entries; in fs_mgr_read_fstab_file() 544 fstab->recs = static_cast<struct fstab_rec *>( in fs_mgr_read_fstab_file() 545 calloc(fstab->num_entries, sizeof(struct fstab_rec))); in fs_mgr_read_fstab_file() 578 fstab->recs[cnt].blk_device = strdup(p); in fs_mgr_read_fstab_file() 584 fstab->recs[cnt].mount_point = strdup(p); in fs_mgr_read_fstab_file() 590 fstab->recs[cnt].fs_type = strdup(p); in fs_mgr_read_fstab_file() 597 fstab->recs[cnt].flags = parse_flags(p, mount_flags, NULL, in fs_mgr_read_fstab_file() [all …]
|
D | fs_mgr.cpp | 562 static int mount_with_alternatives(struct fstab *fstab, int start_idx, int *end_idx, int *attempted… in mount_with_alternatives() argument 568 if (!end_idx || !attempted_idx || start_idx >= fstab->num_entries) { in mount_with_alternatives() 578 … i < fstab->num_entries && !strcmp(fstab->recs[start_idx].mount_point, fstab->recs[i].mount_point); in mount_with_alternatives() 587 << fstab->recs[i].mount_point << " rec[" << i in mount_with_alternatives() 588 << "].fs_type=" << fstab->recs[i].fs_type in mount_with_alternatives() 590 << fstab->recs[*attempted_idx].fs_type; in mount_with_alternatives() 594 int fs_stat = prepare_fs_for_mount(fstab->recs[i].blk_device, &fstab->recs[i]); in mount_with_alternatives() 597 << fstab->recs[i].mount_point << " rec[" << i in mount_with_alternatives() 598 << "].fs_type=" << fstab->recs[i].fs_type; in mount_with_alternatives() 605 if (!__mount(fstab->recs[i].blk_device, fstab->recs[i].mount_point, in mount_with_alternatives() [all …]
|
D | fs_mgr_slotselect.cpp | 34 bool fs_mgr_update_for_slotselect(struct fstab *fstab) { in fs_mgr_update_for_slotselect() argument 38 for (n = 0; n < fstab->num_entries; n++) { in fs_mgr_update_for_slotselect() 39 if (fstab->recs[n].fs_mgr_flags & MF_SLOTSELECT) { in fs_mgr_update_for_slotselect() 46 if (asprintf(&tmp, "%s%s", fstab->recs[n].blk_device, ab_suffix.c_str()) > 0) { in fs_mgr_update_for_slotselect() 47 free(fstab->recs[n].blk_device); in fs_mgr_update_for_slotselect() 48 fstab->recs[n].blk_device = tmp; in fs_mgr_update_for_slotselect()
|
D | fs_mgr_format.cpp | 136 int fs_mgr_do_format(struct fstab_rec *fstab, bool crypt_footer) in fs_mgr_do_format() argument 140 LERROR << __FUNCTION__ << ": Format " << fstab->blk_device in fs_mgr_do_format() 141 << " as '" << fstab->fs_type << "'"; in fs_mgr_do_format() 143 if (!strncmp(fstab->fs_type, "f2fs", 4)) { in fs_mgr_do_format() 144 rc = format_f2fs(fstab->blk_device, fstab->length, crypt_footer); in fs_mgr_do_format() 145 } else if (!strncmp(fstab->fs_type, "ext4", 4)) { in fs_mgr_do_format() 146 rc = format_ext4(fstab->blk_device, fstab->mount_point, crypt_footer); in fs_mgr_do_format() 148 LERROR << "File system type '" << fstab->fs_type << "' is not supported"; in fs_mgr_do_format()
|
D | fs_mgr_verity.cpp | 574 static int compare_last_signature(struct fstab_rec *fstab, int *match) in compare_last_signature() argument 587 if (fec_open(&f, fstab->blk_device, O_RDONLY, FEC_VERITY_DISABLE, in compare_last_signature() 589 PERROR << "Failed to open '" << fstab->blk_device << "'"; in compare_last_signature() 595 PERROR << "Failed to get verity metadata '" << fstab->blk_device << "'"; in compare_last_signature() 602 basename(fstab->mount_point)) >= (int)sizeof(tag)) { in compare_last_signature() 603 LERROR << "Metadata tag name too long for " << fstab->mount_point; in compare_last_signature() 607 if (metadata_find(fstab->verity_loc, tag, SHA256_DIGEST_LENGTH, in compare_last_signature() 612 fd = TEMP_FAILURE_RETRY(open(fstab->verity_loc, O_RDWR | O_SYNC | O_CLOEXEC)); in compare_last_signature() 615 PERROR << "Failed to open " << fstab->verity_loc; in compare_last_signature() 622 << fstab->verity_loc << " offset " << offset; in compare_last_signature() [all …]
|
D | fs_mgr_priv.h | 122 bool fs_mgr_update_for_slotselect(struct fstab *fstab); 126 int load_verity_state(struct fstab_rec* fstab, int* mode);
|
D | fs_mgr_avb_ops.cpp | 124 FsManagerAvbOps::FsManagerAvbOps(const fstab& fstab) { in FsManagerAvbOps() argument 128 for (int i = 0; i < fstab.num_entries; i++) { in FsManagerAvbOps() 129 std::string partition_name = basename(fstab.recs[i].blk_device); in FsManagerAvbOps() 130 by_name_symlink_map_[partition_name] = fstab.recs[i].blk_device; in FsManagerAvbOps()
|
D | fs_mgr_priv_avb_ops.h | 49 FsManagerAvbOps(const fstab& fstab);
|
D | fs_mgr_avb.cpp | 476 FsManagerAvbUniquePtr FsManagerAvbHandle::Open(const fstab& fstab) { in Open() argument 477 FsManagerAvbOps avb_ops(fstab); in Open()
|
/system/update_engine/ |
D | utils_android.cc | 29 static struct fstab* OpenFSTab() { in OpenFSTab() 30 struct fstab* fstab = fs_mgr_read_fstab_default(); in OpenFSTab() local 31 if (fstab != nullptr) in OpenFSTab() 32 return fstab; in OpenFSTab() 34 fstab = fs_mgr_read_fstab("/fstab.device"); in OpenFSTab() 35 return fstab; in OpenFSTab() 43 struct fstab* fstab; in DeviceForMountPoint() local 46 fstab = OpenFSTab(); in DeviceForMountPoint() 47 if (fstab == nullptr) { in DeviceForMountPoint() 51 record = fs_mgr_get_entry_for_mount_point(fstab, mount_point.c_str()); in DeviceForMountPoint() [all …]
|
/system/core/fs_mgr/include/ |
D | fs_mgr.h | 51 typedef void (*fs_mgr_verity_state_callback)(struct fstab_rec *fstab, 63 int fs_mgr_mount_all(struct fstab *fstab, int mount_mode); 69 int fs_mgr_do_mount(struct fstab *fstab, const char *n_name, char *n_blk_device, 73 int fs_mgr_unmount_all(struct fstab *fstab); 74 struct fstab_rec const* fs_mgr_get_crypt_entry(struct fstab const* fstab); 75 void fs_mgr_get_crypt_info(struct fstab* fstab, char* key_loc, char* real_blk_device, size_t size); 78 int fs_mgr_swapon_all(struct fstab *fstab); 80 int fs_mgr_do_format(struct fstab_rec *fstab, bool reserve_footer); 86 int fs_mgr_setup_verity(struct fstab_rec *fstab, bool wait_for_verity_dev);
|
D | fs_mgr_avb.h | 85 static FsManagerAvbUniquePtr Open(const fstab& fstab);
|
/system/extras/boot_control_copy/ |
D | bootinfo.cpp | 40 static struct fstab *open_fstab(void) in open_fstab() 42 struct fstab *fstab = fs_mgr_read_fstab_default(); in open_fstab() local 43 if (fstab != NULL) in open_fstab() 44 return fstab; in open_fstab() 46 fstab = fs_mgr_read_fstab("/fstab.device"); in open_fstab() 47 return fstab; in open_fstab() 54 struct fstab *fstab; in boot_info_open_partition() local 74 fstab = open_fstab(); in boot_info_open_partition() 75 if (fstab == NULL) in boot_info_open_partition() 77 record = fs_mgr_get_entry_for_mount_point(fstab, "/misc"); in boot_info_open_partition() [all …]
|
/system/libvintf/ |
D | VintfObjectRecovery.cpp | 28 using FstabMgr = std::unique_ptr<struct fstab, decltype(&fs_mgr_free_fstab)>; 30 static status_t mountAt(const FstabMgr &fstab, const char* path, const char* mount_point) { in mountAt() argument 31 fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab.get(), path); in mountAt() 46 FstabMgr fstab = defaultFstabMgr(); in mountSystem() local 47 if (fstab == NULL) { in mountSystem() 51 return mountAt(fstab, "/", "/system_root"); in mountSystem() 53 return mountAt(fstab, "/system", "/system"); in mountSystem() 58 FstabMgr fstab = defaultFstabMgr(); in mountVendor() local 59 if (fstab == NULL) { in mountVendor() 62 return mountAt(fstab, "/vendor", "/vendor"); in mountVendor()
|
/system/core/adb/ |
D | set_verity_enable_state_service.cpp | 40 struct fstab *fstab; variable 182 fstab = fs_mgr_read_fstab_default(); in set_verity_enabled_state_service() 183 if (!fstab) { in set_verity_enabled_state_service() 189 for (int i = 0; i < fstab->num_entries; i++) { in set_verity_enabled_state_service() 190 if (fs_mgr_is_verified(&fstab->recs[i])) { in set_verity_enabled_state_service() 191 if (set_verity_enabled_state(fd, fstab->recs[i].blk_device, in set_verity_enabled_state_service() 192 fstab->recs[i].mount_point, enable)) { in set_verity_enabled_state_service()
|
D | remount_service.cpp | 57 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(), in find_fstab_mount() local 59 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab.get(), dir); in find_fstab_mount()
|
/system/vold/ |
D | IdleMaint.cpp | 100 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(), in addFromFstab() local 104 for (int i = 0; i < fstab->num_entries; i++) { in addFromFstab() 105 auto fs_type = std::string(fstab->recs[i].fs_type); in addFromFstab() 111 if (fstab->recs[i].flags & MS_RDONLY) { in addFromFstab() 114 if (fs_mgr_is_voldmanaged(&fstab->recs[i])) { in addFromFstab() 117 if (fs_mgr_is_notrim(&fstab->recs[i])) { in addFromFstab() 124 if (prev_rec && !strcmp(prev_rec->mount_point, fstab->recs[i].mount_point)) { in addFromFstab() 129 paths->push_back(fstab->recs[i].mount_point); in addFromFstab() 132 if (std::string(fstab->recs[i].fs_type) == "f2fs" && in addFromFstab() 133 Realpath(fstab->recs[i].blk_device, &gc_path)) { in addFromFstab() [all …]
|
D | VoldUtil.cpp | 20 struct fstab *fstab_default;
|
D | VoldUtil.h | 23 extern struct fstab *fstab_default;
|
/system/extras/tests/fstest/ |
D | recovery_test.cpp | 191 struct fstab *fstab = fs_mgr_read_fstab_default(); in setCacheInfoFromFstab() local 192 if (!fstab) { in setCacheInfoFromFstab() 196 for (int i = 0; i < fstab->num_entries; ++i) { in setCacheInfoFromFstab() 197 if (!strcmp(fstab->recs[i].mount_point, "/cache")) { in setCacheInfoFromFstab() 198 strcpy(blk_path_, fstab->recs[i].blk_device); in setCacheInfoFromFstab() 199 if (!strcmp(fstab->recs[i].fs_type, "ext4")) { in setCacheInfoFromFstab() 202 } else if (!strcmp(fstab->recs[i].fs_type, "f2fs")) { in setCacheInfoFromFstab() 208 fs_mgr_free_fstab(fstab); in setCacheInfoFromFstab()
|
/system/core/init/ |
D | builtins.cpp | 452 struct fstab* fstab = fs_mgr_read_fstab(fstabfile); in mount_fstab() local 453 int child_ret = fs_mgr_mount_all(fstab, mount_mode); in mount_fstab() 454 fs_mgr_free_fstab(fstab); in mount_fstab() 591 struct fstab *fstab; in do_swapon_all() local 594 fstab = fs_mgr_read_fstab(args[1].c_str()); in do_swapon_all() 595 ret = fs_mgr_swapon_all(fstab); in do_swapon_all() 596 fs_mgr_free_fstab(fstab); in do_swapon_all() 712 static void verity_update_property(fstab_rec *fstab, const char *mount_point, in verity_update_property() argument
|
D | property_service.cpp | 729 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(), in load_recovery_id_prop() local 731 if (!fstab) { in load_recovery_id_prop() 736 fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab.get(), RECOVERY_MOUNT_POINT); in load_recovery_id_prop()
|
/system/sepolicy/public/ |
D | update_engine_common.te | 16 # read fstab
|
/system/sepolicy/prebuilts/api/28.0/public/ |
D | update_engine_common.te | 16 # read fstab
|