summaryrefslogtreecommitdiffstats
path: root/roots.cpp
diff options
context:
space:
mode:
authorConnor O'Brien <connoro@google.com>2017-01-25 05:28:09 +0100
committerandroid-build-merger <android-build-merger@google.com>2017-01-25 05:28:09 +0100
commite3a55e2b31a7f6526eaea39020b93e8498231717 (patch)
treea93052fb13c17955e033634f8b0d832982b7d9b2 /roots.cpp
parentMerge "minui: Move callback functions to std::function." am: a476312714 am: 343987b2a1 am: 19856bcb2e (diff)
parentMerge "Use flash erase & logical block size for userdata wipe" am: c8f7b5bad7 am: a78bbda4e2 (diff)
downloadandroid_bootable_recovery-e3a55e2b31a7f6526eaea39020b93e8498231717.tar
android_bootable_recovery-e3a55e2b31a7f6526eaea39020b93e8498231717.tar.gz
android_bootable_recovery-e3a55e2b31a7f6526eaea39020b93e8498231717.tar.bz2
android_bootable_recovery-e3a55e2b31a7f6526eaea39020b93e8498231717.tar.lz
android_bootable_recovery-e3a55e2b31a7f6526eaea39020b93e8498231717.tar.xz
android_bootable_recovery-e3a55e2b31a7f6526eaea39020b93e8498231717.tar.zst
android_bootable_recovery-e3a55e2b31a7f6526eaea39020b93e8498231717.zip
Diffstat (limited to 'roots.cpp')
-rw-r--r--roots.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/roots.cpp b/roots.cpp
index 14018fcdc..376fcbd1b 100644
--- a/roots.cpp
+++ b/roots.cpp
@@ -215,7 +215,12 @@ int format_volume(const char* volume, const char* directory) {
}
int result;
if (strcmp(v->fs_type, "ext4") == 0) {
- result = make_ext4fs_directory(v->blk_device, length, volume, sehandle, directory);
+ if (v->erase_blk_size != 0 && v->logical_blk_size != 0) {
+ result = make_ext4fs_directory_align(v->blk_device, length, volume, sehandle,
+ directory, v->erase_blk_size, v->logical_blk_size);
+ } else {
+ result = make_ext4fs_directory(v->blk_device, length, volume, sehandle, directory);
+ }
} else { /* Has to be f2fs because we checked earlier. */
if (v->key_loc != NULL && strcmp(v->key_loc, "footer") == 0 && length < 0) {
LOG(ERROR) << "format_volume: crypt footer + negative length (" << length