diff options
Diffstat (limited to 'init/init_first_stage.cpp')
-rw-r--r-- | init/init_first_stage.cpp | 20 |
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 | ||
42 | using android::base::Timer; | 42 | using android::base::Timer; |
43 | using android::fs_mgr::LogicalPartitionTable; | ||
44 | 43 | ||
45 | namespace android { | 44 | namespace android { |
46 | namespace init { | 45 | namespace 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 | ||