summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorDavid Anderson2018-07-19 14:27:21 -0500
committerDavid Anderson2018-07-19 16:38:33 -0500
commite0384bbc69dea873757619f17e2ae19473444a5a (patch)
tree3cb65a959703ccd10f17b341a86eec08fd9eea7c /init
parentab8414dd6c91562f45c22367df6492181e491d43 (diff)
downloadplatform-system-core-e0384bbc69dea873757619f17e2ae19473444a5a.tar.gz
platform-system-core-e0384bbc69dea873757619f17e2ae19473444a5a.tar.xz
platform-system-core-e0384bbc69dea873757619f17e2ae19473444a5a.zip
fs_mgr: Remove early prototype code.
This early code is no longer needed now that logical partitions can be created and flashed normally. Bug: 79173901 Test: N/A Change-Id: I393ef23b3d3ce1cd9c80833358051838d0e9f333
Diffstat (limited to 'init')
-rw-r--r--init/init_first_stage.cpp20
1 files changed, 0 insertions, 20 deletions
diff --git a/init/init_first_stage.cpp b/init/init_first_stage.cpp
index a24a9a239..0ee020384 100644
--- a/init/init_first_stage.cpp
+++ b/init/init_first_stage.cpp
@@ -40,7 +40,6 @@
40#include "util.h" 40#include "util.h"
41 41
42using android::base::Timer; 42using android::base::Timer;
43using android::fs_mgr::LogicalPartitionTable;
44 43
45namespace android { 44namespace android {
46namespace init { 45namespace init {
@@ -75,7 +74,6 @@ class FirstStageMount {
75 bool need_dm_verity_; 74 bool need_dm_verity_;
76 75
77 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> device_tree_fstab_; 76 std::unique_ptr<fstab, decltype(&fs_mgr_free_fstab)> device_tree_fstab_;
78 std::unique_ptr<LogicalPartitionTable> dm_linear_table_;
79 std::string lp_metadata_partition_; 77 std::string lp_metadata_partition_;
80 std::vector<fstab_rec*> mount_fstab_recs_; 78 std::vector<fstab_rec*> mount_fstab_recs_;
81 std::set<std::string> required_devices_partition_names_; 79 std::set<std::string> required_devices_partition_names_;
@@ -150,10 +148,6 @@ FirstStageMount::FirstStageMount()
150 LOG(INFO) << "Failed to read fstab from device tree"; 148 LOG(INFO) << "Failed to read fstab from device tree";
151 } 149 }
152 150
153 if (IsDmLinearEnabled()) {
154 dm_linear_table_ = android::fs_mgr::LoadPartitionsFromDeviceTree();
155 }
156
157 auto boot_devices = fs_mgr_get_boot_devices(); 151 auto boot_devices = fs_mgr_get_boot_devices();
158 device_handler_ = 152 device_handler_ =
159 std::make_unique<DeviceHandler>(std::vector<Permissions>{}, std::vector<SysfsPermissions>{}, 153 std::make_unique<DeviceHandler>(std::vector<Permissions>{}, std::vector<SysfsPermissions>{},
@@ -195,15 +189,6 @@ bool FirstStageMount::GetBackingDmLinearDevices() {
195 } 189 }
196 190
197 required_devices_partition_names_.emplace(LP_METADATA_PARTITION_NAME); 191 required_devices_partition_names_.emplace(LP_METADATA_PARTITION_NAME);
198
199 if (dm_linear_table_) {
200 for (const auto& partition : dm_linear_table_->partitions) {
201 for (const auto& extent : partition.extents) {
202 const std::string& partition_name = android::base::Basename(extent.block_device());
203 required_devices_partition_names_.emplace(partition_name);
204 }
205 }
206 }
207 return true; 192 return true;
208} 193}
209 194
@@ -272,11 +257,6 @@ bool FirstStageMount::CreateLogicalPartitions() {
272 << LP_METADATA_PARTITION_NAME; 257 << LP_METADATA_PARTITION_NAME;
273 return false; 258 return false;
274 } 259 }
275 if (dm_linear_table_) {
276 if (!android::fs_mgr::CreateLogicalPartitions(*dm_linear_table_.get())) {
277 return false;
278 }
279 }
280 return android::fs_mgr::CreateLogicalPartitions(lp_metadata_partition_); 260 return android::fs_mgr::CreateLogicalPartitions(lp_metadata_partition_);
281} 261}
282 262