Searched refs:fstab (Results 1 - 25 of 26) sorted by relevance

12

/system/update_engine/
H A Dutils_android.cc28 // Open the appropriate fstab file and fallback to /fstab.device if
30 static struct fstab* OpenFSTab() {
31 struct fstab* fstab = fs_mgr_read_fstab_default(); local
32 if (fstab != nullptr)
33 return fstab;
35 fstab = fs_mgr_read_fstab("/fstab.device");
36 return fstab;
44 struct fstab* fstab; local
[all...]
/system/core/fs_mgr/include/
H A Dfs_mgr.h57 * The entries must be kept in the same order as they were seen in the fstab.
61 struct fstab { struct
90 typedef void (*fs_mgr_verity_state_callback)(struct fstab_rec *fstab,
93 struct fstab *fs_mgr_read_fstab_default();
94 struct fstab *fs_mgr_read_fstab_dt();
95 struct fstab *fs_mgr_read_fstab(const char *fstab_path);
96 void fs_mgr_free_fstab(struct fstab *fstab);
105 int fs_mgr_mount_all(struct fstab *fstab, in
[all...]
H A Dfs_mgr_avb.h59 // name to by-name symlink, or a fstab file to which the ByNameSymlinkMap is
76 static FsManagerAvbUniquePtr Open(const fstab& fstab);
79 // Sets up dm-verity on the given fstab entry.
/system/core/fs_mgr/
H A Dfs_mgr_slotselect.cpp40 // Updates |fstab| for slot_suffix. Returns true on success, false on error.
41 bool fs_mgr_update_for_slotselect(struct fstab *fstab) { argument
45 for (n = 0; n < fstab->num_entries; n++) {
46 if (fstab->recs[n].fs_mgr_flags & MF_SLOTSELECT) {
53 if (asprintf(&tmp, "%s%s", fstab->recs[n].blk_device, ab_suffix.c_str()) > 0) {
54 free(fstab->recs[n].blk_device);
55 fstab->recs[n].blk_device = tmp;
H A Dfs_mgr.cpp520 * Tries to mount any of the consecutive fstab entries that match
521 * the mountpoint of the one given by fstab->recs[start_idx].
524 * attempted_idx: On return, will indicate which fstab rec
530 static int mount_with_alternatives(struct fstab *fstab, int start_idx, int *end_idx, int *attempted_idx) argument
536 if (!end_idx || !attempted_idx || start_idx >= fstab->num_entries) {
543 /* Hunt down an fstab entry for the same mount point that might succeed */
545 /* We required that fstab entries for the same mountpoint be consecutive */
546 i < fstab->num_entries && !strcmp(fstab
782 fs_mgr_mount_all(struct fstab *fstab, int mount_mode) argument
1002 fs_mgr_do_mount(struct fstab *fstab, const char *n_name, char *n_blk_device, char *tmp_mount_point) argument
1133 fs_mgr_unmount_all(struct fstab *fstab) argument
1157 fs_mgr_swapon_all(struct fstab *fstab) argument
1250 fs_mgr_get_crypt_info(struct fstab *fstab, char *key_loc, char *real_blk_device, int size) argument
[all...]
H A Dfs_mgr_fstab.cpp363 std::string file_name = kAndroidDtDir + "/fstab/compatible";
365 if (dt_value == "android,fstab") {
374 std::string fstab; local
376 return fstab;
379 std::string fstabdir_name = kAndroidDtDir + "/fstab";
381 if (!fstabdir) return fstab;
412 fstab.clear();
421 fstab.clear();
429 fstab.clear();
437 fstab
469 struct fstab *fstab = NULL; local
636 struct fstab *fstab; local
674 struct fstab *fstab = fs_mgr_read_fstab_file(fstab_file.get()); local
708 struct fstab *fstab = fs_mgr_read_fstab(default_fstab.c_str()); local
713 fs_mgr_free_fstab(struct fstab *fstab) argument
742 fs_mgr_add_entry(struct fstab *fstab, const char *mount_point, const char *fs_type, const char *blk_device) argument
774 fs_mgr_get_entry_for_mount_point_after(struct fstab_rec *start_rec, struct fstab *fstab, const char *path) argument
806 fs_mgr_get_entry_for_mount_point(struct fstab *fstab, const char *path) argument
811 fs_mgr_is_voldmanaged(const struct fstab_rec *fstab) argument
816 fs_mgr_is_nonremovable(const struct fstab_rec *fstab) argument
821 fs_mgr_is_verified(const struct fstab_rec *fstab) argument
826 fs_mgr_is_avb(const struct fstab_rec *fstab) argument
831 fs_mgr_is_verifyatboot(const struct fstab_rec *fstab) argument
836 fs_mgr_is_encryptable(const struct fstab_rec *fstab) argument
841 fs_mgr_is_file_encrypted(const struct fstab_rec *fstab) argument
846 fs_mgr_get_file_encryption_modes(const struct fstab_rec *fstab, const char **contents_mode_ret, const char **filenames_mode_ret) argument
856 fs_mgr_is_convertible_to_fbe(const struct fstab_rec *fstab) argument
861 fs_mgr_is_noemulatedsd(const struct fstab_rec *fstab) argument
866 fs_mgr_is_notrim(struct fstab_rec *fstab) argument
871 fs_mgr_is_formattable(struct fstab_rec *fstab) argument
876 fs_mgr_is_slotselect(struct fstab_rec *fstab) argument
881 fs_mgr_is_nofail(struct fstab_rec *fstab) argument
886 fs_mgr_is_latemount(struct fstab_rec *fstab) argument
891 fs_mgr_is_quota(struct fstab_rec *fstab) argument
[all...]
H A Dfs_mgr_main.cpp90 struct fstab *fstab=NULL; local
98 /* The name of the fstab file is last, after the option */
101 fstab = fs_mgr_read_fstab(fstab_file);
104 return fs_mgr_mount_all(fstab, MOUNT_MODE_DEFAULT);
106 return fs_mgr_do_mount(fstab, n_name, (char *)n_blk_dev, 0);
108 return fs_mgr_unmount_all(fstab);
114 fs_mgr_free_fstab(fstab);
H A Dfs_mgr_format.cpp127 int fs_mgr_do_format(struct fstab_rec *fstab, bool crypt_footer) argument
131 LERROR << __FUNCTION__ << ": Format " << fstab->blk_device
132 << " as '" << fstab->fs_type << "'";
134 if (!strncmp(fstab->fs_type, "f2fs", 4)) {
135 rc = format_f2fs(fstab->blk_device);
136 } else if (!strncmp(fstab->fs_type, "ext4", 4)) {
137 rc = format_ext4(fstab->blk_device, fstab->mount_point, crypt_footer);
139 LERROR << "File system type '" << fstab->fs_type << "' is not supported";
H A Dfs_mgr_verity.cpp571 static int compare_last_signature(struct fstab_rec *fstab, int *match) argument
584 if (fec_open(&f, fstab->blk_device, O_RDONLY, FEC_VERITY_DISABLE,
586 PERROR << "Failed to open '" << fstab->blk_device << "'";
592 PERROR << "Failed to get verity metadata '" << fstab->blk_device << "'";
599 basename(fstab->mount_point)) >= (int)sizeof(tag)) {
600 LERROR << "Metadata tag name too long for " << fstab->mount_point;
604 if (metadata_find(fstab->verity_loc, tag, SHA256_DIGEST_LENGTH,
609 fd = TEMP_FAILURE_RETRY(open(fstab->verity_loc, O_RDWR | O_SYNC | O_CLOEXEC));
612 PERROR << "Failed to open " << fstab->verity_loc;
619 << fstab
642 get_verity_state_offset(struct fstab_rec *fstab, off64_t *offset) argument
656 load_verity_state(struct fstab_rec* fstab, int* mode) argument
723 fs_mgr_setup_verity(struct fstab_rec *fstab, bool wait_for_verity_dev) argument
[all...]
H A Dfs_mgr_priv_avb_ops.h49 FsManagerAvbOps(const fstab& fstab);
H A Dfs_mgr_priv.h48 /* fstab has the following format:
115 bool fs_mgr_update_for_slotselect(struct fstab *fstab);
118 int load_verity_state(struct fstab_rec* fstab, int* mode);
H A Dfs_mgr_avb_ops.cpp112 FsManagerAvbOps::FsManagerAvbOps(const fstab& fstab) { argument
113 // Constructs the by-name symlink map for each fstab record.
116 for (int i = 0; i < fstab.num_entries; i++) {
117 std::string partition_name = basename(fstab.recs[i].blk_device);
118 by_name_symlink_map_[partition_name] = fstab.recs[i].blk_device;
H A Dfs_mgr_avb.cpp461 FsManagerAvbUniquePtr FsManagerAvbHandle::Open(const fstab& fstab) { argument
462 FsManagerAvbOps avb_ops(fstab);
/system/libvintf/
H A DVintfObjectRecovery.cpp29 using FstabMgr = std::unique_ptr<struct fstab, decltype(&fs_mgr_free_fstab)>;
31 static status_t mountAt(const FstabMgr &fstab, const char* path, const char* mount_point) { argument
32 fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab.get(), path);
47 FstabMgr fstab = defaultFstabMgr(); variable
48 if (fstab == NULL) {
52 return mountAt(fstab, "/", "/system_root");
54 return mountAt(fstab, "/system", "/system");
59 FstabMgr fstab = defaultFstabMgr(); variable
60 if (fstab == NULL) {
63 return mountAt(fstab, "/vendo
[all...]
/system/extras/boot_control_copy/
H A Dbootinfo.c38 // Open the appropriate fstab file and fallback to /fstab.device if
40 static struct fstab *open_fstab(void)
42 struct fstab *fstab = fs_mgr_read_fstab_default(); local
43 if (fstab != NULL)
44 return fstab;
46 fstab = fs_mgr_read_fstab("/fstab.device");
47 return fstab;
54 struct fstab *fstab; local
[all...]
/system/core/adb/
H A Dset_verity_enable_state_service.cpp39 struct fstab *fstab; variable in typeref:struct:fstab
111 // read all fstab entries at once from all sources
112 fstab = fs_mgr_read_fstab_default();
113 if (!fstab) {
114 WriteFdFmt(fd, "Failed to read fstab\nMaybe run adb root?\n");
120 for (int i = 0; i < fstab->num_entries; i++) {
121 if (fs_mgr_is_verified(&fstab->recs[i])) {
122 if (!set_verity_enabled_state(fd, fstab->recs[i].blk_device,
123 fstab
[all...]
H A Dremount_service.cpp55 // Returns the device used to mount a directory in the fstab.
57 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
59 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab.get(), dir);
63 // The proc entry for / is full of lies, so check fstab instead.
/system/vold/
H A DTrimTask.cpp50 // Collect both fstab and vold volumes
68 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
72 for (int i = 0; i < fstab->num_entries; i++) {
74 if (!strcmp(fstab->recs[i].fs_type, "emmc") ||
75 !strcmp(fstab->recs[i].fs_type, "mtd")) {
79 if (fstab->recs[i].flags & MS_RDONLY) {
82 if (fs_mgr_is_voldmanaged(&fstab->recs[i])) {
85 if (fs_mgr_is_notrim(&fstab->recs[i])) {
92 if (prev_rec && !strcmp(prev_rec->mount_point, fstab
[all...]
H A Dmain.cpp46 struct fstab *fstab; variable in typeref:struct:fstab
218 fstab = fs_mgr_read_fstab_default();
219 if (!fstab) {
220 PLOG(ERROR) << "Failed to open default fstab";
226 for (int i = 0; i < fstab->num_entries; i++) {
227 if (fs_mgr_is_voldmanaged(&fstab->recs[i])) {
228 if (fs_mgr_is_nonremovable(&fstab->recs[i])) {
233 std::string sysPattern(fstab->recs[i].blk_device);
234 std::string nickname(fstab
[all...]
H A Dcryptfs.cpp194 extern struct fstab *fstab;
298 fs_mgr_get_crypt_info(fstab, key_loc, real_blkdev, sizeof(key_loc));
1428 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, DATA_MNT_POINT);
1444 while ((mount_rc = fs_mgr_do_mount(fstab, DATA_MNT_POINT,
1527 fs_mgr_get_crypt_info(fstab, key_loc, 0, sizeof(key_loc));
1595 fs_mgr_get_crypt_info(fstab, 0, real_blkdev, sizeof(real_blkdev));
1627 if (fs_mgr_do_mount(fstab, DATA_MNT_POINT, crypto_blkdev, tmp_mount_point)) {
2643 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, DATA_MNT_POINT);
2743 fs_mgr_get_crypt_info(fstab, key_lo
[all...]
H A DCommandListener.cpp292 extern struct fstab *fstab;
306 fs_mgr_mount_all(fstab, MOUNT_MODE_DEFAULT);
/system/extras/tests/fstest/
H A Drecovery_test.cpp191 struct fstab *fstab = fs_mgr_read_fstab_default(); local
192 if (!fstab) {
193 testPrintE("failed to open default fstab\n");
196 for (int i = 0; i < fstab->num_entries; ++i) {
197 if (!strcmp(fstab->recs[i].mount_point, "/cache")) {
198 strcpy(blk_path_, fstab->recs[i].blk_device);
199 if (!strcmp(fstab->recs[i].fs_type, "ext4")) {
202 } else if (!strcmp(fstab->recs[i].fs_type, "f2fs")) {
208 fs_mgr_free_fstab(fstab);
[all...]
/system/core/init/
H A Dbuiltins.cpp403 * Call fs_mgr_mount_all() to mount the given fstab
436 struct fstab* fstab = fs_mgr_read_fstab(fstabfile); local
437 int child_ret = fs_mgr_mount_all(fstab, mount_mode);
438 fs_mgr_free_fstab(fstab);
497 /* mount_all <fstab> [ <path> ]* [--<options>]*
546 struct fstab *fstab; local
549 fstab = fs_mgr_read_fstab(args[1].c_str());
550 ret = fs_mgr_swapon_all(fstab);
640 verity_update_property(fstab_rec *fstab, const char *mount_point, int mode, int status) argument
[all...]
H A Dproperty_service.cpp628 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> fstab(fs_mgr_read_fstab_default(),
630 if (!fstab) {
631 PLOG(ERROR) << "unable to read default fstab";
635 fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab.get(), RECOVERY_MOUNT_POINT);
637 LOG(ERROR) << "/recovery not specified in fstab";
H A Dinit_first_stage.cpp46 bool DoFirstStageMount(); // Mounts fstab entries read from device tree.
61 // Device tree fstab entries.
62 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> device_tree_fstab_;
111 LOG(ERROR) << "Failed to read fstab from device tree";
267 // Includes the partition names of fstab records and verity_loc_device (if any).
415 // Mounts /system, /vendor, and/or /odm if they are present in the fstab provided by device tree.
423 // Firstly checks if device tree fstab entries are compatible.
424 if (!is_android_dt_value_expected("fstab/compatible", "android,fstab")) {
425 LOG(INFO) << "First stage mount skipped (missing/incompatible fstab i
[all...]

Completed in 238 milliseconds

12