Home
last modified time | relevance | path

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

/system/core/fs_mgr/include/
Dfs_mgr.h48 struct fstab { struct
71 typedef void (*fs_mgr_verity_state_callback)(struct fstab_rec *fstab, argument
74 struct fstab *fs_mgr_read_fstab(const char *fstab_path);
75 void fs_mgr_free_fstab(struct fstab *fstab);
84 int fs_mgr_mount_all(struct fstab *fstab);
88 int fs_mgr_do_mount(struct fstab *fstab, char *n_name, char *n_blk_device,
91 int fs_mgr_unmount_all(struct fstab *fstab);
92 int fs_mgr_get_crypt_info(struct fstab *fstab, char *key_loc,
96 int fs_mgr_add_entry(struct fstab *fstab,
99 struct fstab_rec *fs_mgr_get_entry_for_mount_point(struct fstab *fstab, const char *path);
[all …]
/system/core/fs_mgr/
Dfs_mgr_fstab.c219 struct fstab *fs_mgr_read_fstab(const char *fstab_path) in fs_mgr_read_fstab()
228 struct fstab *fstab = NULL; in fs_mgr_read_fstab() local
262 fstab = calloc(1, sizeof(struct fstab)); in fs_mgr_read_fstab()
263 fstab->num_entries = entries; in fs_mgr_read_fstab()
264 fstab->fstab_filename = strdup(fstab_path); in fs_mgr_read_fstab()
265 fstab->recs = calloc(fstab->num_entries, sizeof(struct fstab_rec)); in fs_mgr_read_fstab()
298 fstab->recs[cnt].blk_device = strdup(p); in fs_mgr_read_fstab()
304 fstab->recs[cnt].mount_point = strdup(p); in fs_mgr_read_fstab()
310 fstab->recs[cnt].fs_type = strdup(p); in fs_mgr_read_fstab()
317 fstab->recs[cnt].flags = parse_flags(p, mount_flags, NULL, in fs_mgr_read_fstab()
[all …]
Dfs_mgr.c307 static int mount_with_alternatives(struct fstab *fstab, int start_idx, int *end_idx, int *attempted… in mount_with_alternatives() argument
313 if (!end_idx || !attempted_idx || start_idx >= fstab->num_entries) { in mount_with_alternatives()
323 … i < fstab->num_entries && !strcmp(fstab->recs[start_idx].mount_point, fstab->recs[i].mount_point); in mount_with_alternatives()
332fstab->recs[i].mount_point, i, fstab->recs[i].fs_type, fstab->recs[*attempted_idx].fs_type); in mount_with_alternatives()
336 if (fstab->recs[i].fs_mgr_flags & MF_CHECK) { in mount_with_alternatives()
337 check_fs(fstab->recs[i].blk_device, fstab->recs[i].fs_type, in mount_with_alternatives()
338 fstab->recs[i].mount_point); in mount_with_alternatives()
340 if (!__mount(fstab->recs[i].blk_device, fstab->recs[i].mount_point, &fstab->recs[i])) { in mount_with_alternatives()
345fstab->recs[i].blk_device, fstab->recs[i].mount_point, fstab->recs[i].fs_type, in mount_with_alternatives()
346 fstab->recs[start_idx].fs_type); in mount_with_alternatives()
[all …]
Dfs_mgr_slotselect.c37 static int get_active_slot_suffix_from_misc(struct fstab *fstab, in get_active_slot_suffix_from_misc() argument
47 for (n = 0; n < fstab->num_entries; n++) { in get_active_slot_suffix_from_misc()
48 if (strcmp(fstab->recs[n].mount_point, "/misc") == 0) { in get_active_slot_suffix_from_misc()
49 misc_fd = open(fstab->recs[n].blk_device, O_RDONLY); in get_active_slot_suffix_from_misc()
52 fstab->recs[n].blk_device, in get_active_slot_suffix_from_misc()
84 static int get_active_slot_suffix(struct fstab *fstab, char *out_suffix, in get_active_slot_suffix() argument
100 if (get_active_slot_suffix_from_misc(fstab, out_suffix, suffix_len) == 0) { in get_active_slot_suffix()
111 int fs_mgr_update_for_slotselect(struct fstab *fstab) in fs_mgr_update_for_slotselect() argument
117 for (n = 0; n < fstab->num_entries; n++) { in fs_mgr_update_for_slotselect()
118 if (fstab->recs[n].fs_mgr_flags & MF_SLOTSELECT) { in fs_mgr_update_for_slotselect()
[all …]
Dfs_mgr_verity.cpp617 static int compare_last_signature(struct fstab_rec *fstab, int *match) in compare_last_signature() argument
630 if (fec_open(&f, fstab->blk_device, O_RDONLY, FEC_VERITY_DISABLE, in compare_last_signature()
632 ERROR("Failed to open '%s' (%s)\n", fstab->blk_device, in compare_last_signature()
639 ERROR("Failed to get verity metadata '%s' (%s)\n", fstab->blk_device, in compare_last_signature()
647 basename(fstab->mount_point)) >= (int)sizeof(tag)) { in compare_last_signature()
648 ERROR("Metadata tag name too long for %s\n", fstab->mount_point); in compare_last_signature()
652 if (metadata_find(fstab->verity_loc, tag, SHA256_DIGEST_SIZE, in compare_last_signature()
657 fd = TEMP_FAILURE_RETRY(open(fstab->verity_loc, O_RDWR | O_SYNC | O_CLOEXEC)); in compare_last_signature()
660 ERROR("Failed to open %s: %s\n", fstab->verity_loc, strerror(errno)); in compare_last_signature()
667 sizeof(prev), fstab->verity_loc, offset, strerror(errno)); in compare_last_signature()
[all …]
Dfs_mgr_format.c104 int fs_mgr_do_format(struct fstab_rec *fstab) in fs_mgr_do_format() argument
108 ERROR("%s: Format %s as '%s'.\n", __func__, fstab->blk_device, fstab->fs_type); in fs_mgr_do_format()
110 if (!strncmp(fstab->fs_type, "f2fs", 4)) { in fs_mgr_do_format()
111 rc = format_f2fs(fstab->blk_device); in fs_mgr_do_format()
112 } else if (!strncmp(fstab->fs_type, "ext4", 4)) { in fs_mgr_do_format()
113 rc = format_ext4(fstab->blk_device, fstab->mount_point); in fs_mgr_do_format()
115 ERROR("File system type '%s' is not supported\n", fstab->fs_type); in fs_mgr_do_format()
Dfs_mgr_main.c86 struct fstab *fstab=NULL; in main() local
96 fstab = fs_mgr_read_fstab(fstab_file); in main()
99 return fs_mgr_mount_all(fstab); in main()
101 return fs_mgr_do_mount(fstab, n_name, n_blk_dev, 0); in main()
103 return fs_mgr_unmount_all(fstab); in main()
109 fs_mgr_free_fstab(fstab); in main()
Dfs_mgr_priv.h91 int fs_mgr_update_for_slotselect(struct fstab *fstab);
Dfs_mgr_priv_verity.h25 int fs_mgr_setup_verity(struct fstab_rec *fstab);
/system/extras/boot_control_copy/
Dbootinfo.c40 static struct fstab *open_fstab(void) in open_fstab()
44 struct fstab *fstab; in open_fstab() local
48 fstab = fs_mgr_read_fstab(fstab_name); in open_fstab()
49 if (fstab != NULL) in open_fstab()
50 return fstab; in open_fstab()
52 fstab = fs_mgr_read_fstab("/fstab.device"); in open_fstab()
53 return fstab; in open_fstab()
60 struct fstab *fstab; in boot_info_open_partition() local
80 fstab = open_fstab(); in boot_info_open_partition()
81 if (fstab == NULL) in boot_info_open_partition()
[all …]
/system/update_engine/
Dboot_control_android.cc36 static struct fstab* OpenFSTab() { in OpenFSTab()
38 struct fstab* fstab; in OpenFSTab() local
42 fstab = fs_mgr_read_fstab(fstab_name.c_str()); in OpenFSTab()
43 if (fstab != nullptr) in OpenFSTab()
44 return fstab; in OpenFSTab()
46 fstab = fs_mgr_read_fstab("/fstab.device"); in OpenFSTab()
47 return fstab; in OpenFSTab()
100 struct fstab* fstab; in GetPartitionDevice() local
122 fstab = OpenFSTab(); in GetPartitionDevice()
123 if (fstab == nullptr) { in GetPartitionDevice()
[all …]
/system/vold/
DTrimTask.cpp68 struct fstab *fstab; in addFromFstab() local
71 fstab = fs_mgr_read_fstab(android::vold::DefaultFstabPath().c_str()); in addFromFstab()
72 for (int i = 0; i < fstab->num_entries; i++) { in addFromFstab()
74 if (!strcmp(fstab->recs[i].fs_type, "emmc") || in addFromFstab()
75 !strcmp(fstab->recs[i].fs_type, "mtd")) { in addFromFstab()
79 if (fstab->recs[i].flags & MS_RDONLY) { in addFromFstab()
82 if (fs_mgr_is_voldmanaged(&fstab->recs[i])) { in addFromFstab()
85 if (fs_mgr_is_notrim(&fstab->recs[i])) { in addFromFstab()
92 if (prev_rec && !strcmp(prev_rec->mount_point, fstab->recs[i].mount_point)) { in addFromFstab()
96 mPaths.push_back(fstab->recs[i].mount_point); in addFromFstab()
[all …]
Dmain.cpp46 struct fstab *fstab; variable
212 fstab = fs_mgr_read_fstab(path.c_str()); in process_config()
213 if (!fstab) { in process_config()
220 for (int i = 0; i < fstab->num_entries; i++) { in process_config()
221 if (fs_mgr_is_voldmanaged(&fstab->recs[i])) { in process_config()
222 if (fs_mgr_is_nonremovable(&fstab->recs[i])) { in process_config()
227 std::string sysPattern(fstab->recs[i].blk_device); in process_config()
228 std::string nickname(fstab->recs[i].label); in process_config()
231 if (fs_mgr_is_encryptable(&fstab->recs[i])) { in process_config()
235 if (fs_mgr_is_noemulatedsd(&fstab->recs[i]) in process_config()
Dcryptfs.c440 extern struct fstab *fstab;
544 fs_mgr_get_crypt_info(fstab, key_loc, real_blkdev, sizeof(key_loc)); in get_crypt_ftr_info()
1688 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, DATA_MNT_POINT);
1704 while ((mount_rc = fs_mgr_do_mount(fstab, DATA_MNT_POINT,
1787 fs_mgr_get_crypt_info(fstab, key_loc, 0, sizeof(key_loc));
1852 fs_mgr_get_crypt_info(fstab, 0, real_blkdev, sizeof(real_blkdev));
1894 if (fs_mgr_do_mount(fstab, DATA_MNT_POINT, crypto_blkdev, tmp_mount_point)) {
2900 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, DATA_MNT_POINT);
2998 fs_mgr_get_crypt_info(fstab, key_loc, 0, sizeof(key_loc));
2999 fs_mgr_get_crypt_info(fstab, 0, real_blkdev, sizeof(real_blkdev));
[all …]
DCommandListener.cpp289 extern struct fstab *fstab; in runCommand()
303 fs_mgr_mount_all(fstab); in runCommand()
/system/core/adb/
Dset_verity_enable_state_service.cpp37 struct fstab *fstab; variable
116 fstab = fs_mgr_read_fstab(fstab_filename); in set_verity_enabled_state_service()
117 if (!fstab) { in set_verity_enabled_state_service()
123 for (i = 0; i < fstab->num_entries; i++) { in set_verity_enabled_state_service()
124 if(fs_mgr_is_verified(&fstab->recs[i])) { in set_verity_enabled_state_service()
125 if (!set_verity_enabled_state(fd, fstab->recs[i].blk_device, in set_verity_enabled_state_service()
126 fstab->recs[i].mount_point, in set_verity_enabled_state_service()
Dremount_service.cpp60 struct fstab* fstab = fs_mgr_read_fstab(fstab_filename.c_str()); in find_fstab_mount() local
61 struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, dir); in find_fstab_mount()
63 fs_mgr_free_fstab(fstab); in find_fstab_mount()
/system/extras/tests/fstest/
Drecovery_test.cpp196 struct fstab *fstab = fs_mgr_read_fstab(fstab_filename); in setCacheInfoFromFstab() local
197 if (!fstab) { in setCacheInfoFromFstab()
201 for (int i = 0; i < fstab->num_entries; ++i) { in setCacheInfoFromFstab()
202 if (!strcmp(fstab->recs[i].mount_point, "/cache")) { in setCacheInfoFromFstab()
203 strcpy(blk_path_, fstab->recs[i].blk_device); in setCacheInfoFromFstab()
204 if (!strcmp(fstab->recs[i].fs_type, "ext4")) { in setCacheInfoFromFstab()
207 } else if (!strcmp(fstab->recs[i].fs_type, "f2fs")) { in setCacheInfoFromFstab()
213 fs_mgr_free_fstab(fstab); in setCacheInfoFromFstab()
/system/core/init/
Dbuiltins.cpp507 struct fstab *fstab; in do_mount_all() local
533 fstab = fs_mgr_read_fstab(fstabfile); in do_mount_all()
534 child_ret = fs_mgr_mount_all(fstab); in do_mount_all()
535 fs_mgr_free_fstab(fstab); in do_mount_all()
584 struct fstab *fstab; in do_swapon_all() local
587 fstab = fs_mgr_read_fstab(args[1].c_str()); in do_swapon_all()
588 ret = fs_mgr_swapon_all(fstab); in do_swapon_all()
589 fs_mgr_free_fstab(fstab); in do_swapon_all()
749 static void verity_update_property(fstab_rec *fstab, const char *mount_point, in verity_update_property() argument
Dproperty_service.cpp490 std::unique_ptr<fstab, void(*)(fstab*)> tab(fs_mgr_read_fstab(fstab_filename.c_str()), in load_recovery_id_prop()
Dreadme.txt294 mount_all <fstab> [ <path> ]*
295 Calls fs_mgr_mount_all on the given fs_mgr-format fstab and imports .rc files
345 swapon_all <fstab>
346 Calls fs_mgr_swapon_all on the given fstab file.
/system/sepolicy/
Ddevice.te96 # mount option in your fstab file in the entry for userdata.
Dfile_contexts9 /fstab\..* u:object_r:rootfs:s0