diff options
author | Chris Fries <cfries@motorola.com> | 2013-09-05 13:19:21 -0500 |
---|---|---|
committer | Ed Tam <etam@google.com> | 2015-04-10 15:01:16 -0700 |
commit | 79f338465213885900cea5a39f3aeeea083bbe51 (patch) | |
tree | c2514aecb7030491246a006870f3bd6ecbeda5d0 /fs_mgr/fs_mgr_fstab.c | |
parent | 317b4024a2a46b8c57abfa08f2a649df13572bd3 (diff) | |
download | system_core-79f338465213885900cea5a39f3aeeea083bbe51.zip system_core-79f338465213885900cea5a39f3aeeea083bbe51.tar.gz system_core-79f338465213885900cea5a39f3aeeea083bbe51.tar.bz2 |
fs_mgr: introduce fs_mgr_format to format wiped partitions
Move fastboot's format logic into fs_mgr, to consolidate the knowledge
about how to do this (and when to wipe metadata).
Try to format these formattable paritions if they are wiped.
If formatting fails, we will fall out to let recovery mode handle it.
Bug: 20082763
Change-Id: I397cc197550e78d932e8a154fd234695c46dbe7b
Diffstat (limited to 'fs_mgr/fs_mgr_fstab.c')
-rw-r--r-- | fs_mgr/fs_mgr_fstab.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs_mgr/fs_mgr_fstab.c b/fs_mgr/fs_mgr_fstab.c index ab8f128..edd9591 100644 --- a/fs_mgr/fs_mgr_fstab.c +++ b/fs_mgr/fs_mgr_fstab.c @@ -68,6 +68,7 @@ static struct flag_list fs_mgr_flags[] = { { "zramsize=", MF_ZRAMSIZE }, { "verify", MF_VERIFY }, { "noemulatedsd", MF_NOEMULATEDSD }, + { "formattable", MF_FORMATTABLE }, { "defaults", 0 }, { 0, 0 }, }; @@ -432,3 +433,8 @@ int fs_mgr_is_noemulatedsd(struct fstab_rec *fstab) { return fstab->fs_mgr_flags & MF_NOEMULATEDSD; } + +int fs_mgr_is_formattable(struct fstab_rec *fstab) +{ + return fstab->fs_mgr_flags & (MF_FORMATTABLE); +} |