Home
last modified time | relevance | path

Searched refs:partition_name (Results 1 – 25 of 82) sorted by relevance

1234

/system/core/fs_mgr/liblp/include/liblp/
Dpartition_opener.h30 BlockDeviceInfo(const std::string& partition_name, uint64_t size, uint32_t alignment, in BlockDeviceInfo()
36 partition_name(partition_name) {} in BlockDeviceInfo()
50 std::string partition_name; member
60 virtual android::base::unique_fd Open(const std::string& partition_name, int flags) const = 0;
64 virtual bool GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const = 0;
69 virtual std::string GetDeviceString(const std::string& partition_name) const = 0;
76 virtual android::base::unique_fd Open(const std::string& partition_name,
78 virtual bool GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const override;
79 virtual std::string GetDeviceString(const std::string& partition_name) const override;
/system/core/fs_mgr/libfs_avb/
Davb_util.cpp128 const std::string& partition_name, const std::vector<VBMetaData>& vbmeta_images) { in GetHashDescriptor() argument
154 if (hash_desc->partition_name_len != partition_name.length()) { in GetHashDescriptor()
160 if (hash_partition_name == partition_name) { in GetHashDescriptor()
170 LERROR << "Hash descriptor not found: " << partition_name; in GetHashDescriptor()
174 hash_desc->partition_name = partition_name; in GetHashDescriptor()
186 const std::string& partition_name, const std::vector<VBMetaData>& vbmeta_images) { in GetHashtreeDescriptor() argument
213 if (hashtree_desc->partition_name_len != partition_name.length()) { in GetHashtreeDescriptor()
219 if (hashtree_partition_name == partition_name) { in GetHashtreeDescriptor()
229 LERROR << "Hashtree descriptor not found: " << partition_name; in GetHashtreeDescriptor()
233 hashtree_desc->partition_name = partition_name; in GetHashtreeDescriptor()
[all …]
Davb_util.h33 std::string partition_name; member
37 : partition_name(chain_partition_name), public_key_blob(chain_public_key_blob) {} in ChainInfo()
44 const std::string& partition_name, const std::vector<VBMetaData>& vbmeta_images);
48 const std::string& partition_name, const std::vector<VBMetaData>& vbmeta_images);
75 std::unique_ptr<VBMetaData> VerifyVBMetaData(int fd, const std::string& partition_name,
90 bool RollbackDetected(const std::string& partition_name, uint64_t rollback_index);
97 const std::string& image_path, const std::string& partition_name,
106 const std::string& partition_name, const std::string& ab_suffix,
Davb_ops.cpp111 static std::string DeriveMountPoint(const std::string& partition_name) { in DeriveMountPoint() argument
113 std::string mount_point(partition_name); in DeriveMountPoint()
114 auto found = partition_name.rfind(ab_suffix); in DeriveMountPoint()
147 std::string FsManagerAvbOps::GetLogicalPath(const std::string& partition_name) { in GetLogicalPath() argument
152 const auto mount_point = DeriveMountPoint(partition_name); in GetLogicalPath()
249 avb_slot_data->vbmeta_images[i].partition_name)); in AvbSlotVerify()
/system/core/fs_mgr/libsnapshot/
Dtest_helpers.cpp46 android::base::unique_fd TestPartitionOpener::Open(const std::string& partition_name, in Open() argument
48 if (partition_name == "super") { in Open()
51 return PartitionOpener::Open(partition_name, flags); in Open()
54 bool TestPartitionOpener::GetInfo(const std::string& partition_name, in GetInfo() argument
56 if (partition_name != "super") { in GetInfo()
57 return PartitionOpener::GetInfo(partition_name, info); in GetInfo()
71 std::string TestPartitionOpener::GetDeviceString(const std::string& partition_name) const { in GetDeviceString()
72 if (partition_name == "super") { in GetDeviceString()
75 return PartitionOpener::GetDeviceString(partition_name); in GetDeviceString()
151 for (const auto& partition_name : group.partition_names()) { in FillFakeMetadata() local
[all …]
Dsnapshot_metadata_updater.cpp53 for (const auto& partition_name : group.partition_names()) { in SnapshotMetadataUpdater() local
54 partition_group_map[partition_name] = group.name(); in SnapshotMetadataUpdater()
59 auto it = partition_group_map.find(p.partition_name()); in SnapshotMetadataUpdater()
61 partitions_.emplace_back(Partition{p.partition_name() + target_suffix_, in SnapshotMetadataUpdater()
101 for (const auto& partition_name : partitions_to_delete) { in DeletePartitions() local
102 builder_->RemovePartition(partition_name); in DeletePartitions()
/system/core/fs_mgr/liblp/
Dpartition_opener.cpp95 device_info->partition_name = android::base::Basename(block_device); in GetBlockDeviceInfo()
107 unique_fd PartitionOpener::Open(const std::string& partition_name, int flags) const { in Open() argument
108 std::string path = GetPartitionAbsolutePath(partition_name); in Open()
112 bool PartitionOpener::GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const { in GetInfo() argument
113 std::string path = GetPartitionAbsolutePath(partition_name); in GetInfo()
117 std::string PartitionOpener::GetDeviceString(const std::string& partition_name) const { in GetDeviceString()
118 return GetPartitionAbsolutePath(partition_name); in GetDeviceString()
Dtest_partition_opener.cpp31 unique_fd TestPartitionOpener::Open(const std::string& partition_name, int flags) const { in Open() argument
32 auto iter = partition_map_.find(partition_name); in Open()
40 bool TestPartitionOpener::GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const { in GetInfo() argument
41 auto iter = partition_info_.find(partition_name); in GetInfo()
Dbuilder.cpp175 std::string partition_name = builder->GetBlockDevicePartitionName(i); in New() local
177 if (opener->GetInfo(partition_name, &device_info)) { in New()
243 std::string partition_name = in UpdateMetadataForOtherSuper() local
245 std::string slot_suffix = GetPartitionSlotSuffix(partition_name); in UpdateMetadataForOtherSuper()
250 << partition_name; in UpdateMetadataForOtherSuper()
254 partition_name.substr(0, partition_name.size() - slot_suffix.size()) + in UpdateMetadataForOtherSuper()
330 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
335 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
340 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
345 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
[all …]
Dutility.cpp162 std::string GetPartitionSlotSuffix(const std::string& partition_name) { in GetPartitionSlotSuffix() argument
163 if (partition_name.size() <= 2) { in GetPartitionSlotSuffix()
166 std::string suffix = partition_name.substr(partition_name.size() - 2); in GetPartitionSlotSuffix()
176 if (name.size() > sizeof(device->partition_name)) { in UpdateBlockDevicePartitionName()
179 strncpy(device->partition_name, name.c_str(), sizeof(device->partition_name)); in UpdateBlockDevicePartitionName()
251 std::string partition_name = GetPartitionName(partition); in UpdateMetadataForInPlaceSnapshot() local
252 std::string slot_suffix = GetPartitionSlotSuffix(partition_name); in UpdateMetadataForInPlaceSnapshot()
258 partition_name.substr(0, partition_name.size() - slot_suffix.size()) + in UpdateMetadataForInPlaceSnapshot()
269 LWARN << "Removing partition " << partition_name << " from group " in UpdateMetadataForInPlaceSnapshot()
/system/core/fastboot/device/
Dflashing.cpp50 void WipeOverlayfsForPartition(FastbootDevice* device, const std::string& partition_name) { in WipeOverlayfsForPartition() argument
53 if (wiped.find(partition_name) != wiped.end()) return; in WipeOverlayfsForPartition()
54 wiped.insert(partition_name); in WipeOverlayfsForPartition()
68 if ((partition + device->GetCurrentSlot()) == partition_name) { in WipeOverlayfsForPartition()
147 int Flash(FastbootDevice* device, const std::string& partition_name) { in Flash() argument
149 if (!OpenPartition(device, partition_name, &handle)) { in Flash()
161 (partition_name == "boot" || partition_name == "boot_a" || in Flash()
162 partition_name == "boot_b")) { in Flash()
165 WipeOverlayfsForPartition(device, partition_name); in Flash()
202 std::string partition_name = GetPartitionName(partition); in UpdateSuper() local
[all …]
Dcommands.cpp209 const auto& partition_name = args[1]; in EraseHandler() local
210 if (IsProtectedPartitionDuringMerge(device, partition_name)) { in EraseHandler()
211 auto message = "Cannot erase " + partition_name + " while a snapshot update is in progress"; in EraseHandler()
216 if (!OpenPartition(device, partition_name, &handle)) { in EraseHandler()
222 if (partition_name == "userdata") { in EraseHandler()
425 explicit PartitionBuilder(FastbootDevice* device, const std::string& partition_name);
438 PartitionBuilder::PartitionBuilder(FastbootDevice* device, const std::string& partition_name) in PartitionBuilder() argument
440 std::string slot_suffix = GetSuperSlotSuffix(device, partition_name); in PartitionBuilder()
468 std::string partition_name = args[1]; in CreatePartitionHandler() local
473 PartitionBuilder builder(device, partition_name); in CreatePartitionHandler()
[all …]
Dutility.cpp52 bool OpenLogicalPartition(FastbootDevice* device, const std::string& partition_name, in OpenLogicalPartition() argument
54 std::string slot_suffix = GetSuperSlotSuffix(device, partition_name); in OpenLogicalPartition()
64 .partition_name = partition_name, in OpenLogicalPartition()
70 LOG(ERROR) << "Could not map partition: " << partition_name; in OpenLogicalPartition()
73 auto closer = [partition_name]() -> void { DestroyLogicalPartition(partition_name); }; in OpenLogicalPartition()
193 std::string partition_name = GetPartitionName(partition); in ListPartitions() local
194 if (std::find(partitions.begin(), partitions.end(), partition_name) == in ListPartitions()
196 partitions.emplace_back(partition_name); in ListPartitions()
227 std::string GetSuperSlotSuffix(FastbootDevice* device, const std::string& partition_name) { in GetSuperSlotSuffix() argument
238 std::string slot_suffix = GetPartitionSlotSuffix(partition_name); in GetSuperSlotSuffix()
/system/core/fs_mgr/libfs_avb/include/fs_avb/
Dtypes.h59 std::string partition_name; member
65 std::string partition_name; member
75 VBMetaData(const uint8_t* data, size_t size, const std::string& partition_name) in VBMetaData() argument
78 partition_name_(partition_name) { in VBMetaData()
84 explicit VBMetaData(size_t size, const std::string& partition_name) in VBMetaData() argument
87 partition_name_(partition_name) {} in VBMetaData()
/system/update_engine/
Ddynamic_partition_test_utils.h94 return os << "{" << p.partition_name() << ", "
183 for (const auto& partition_name : group.partition_names()) { variable
186 builder->AddPartition(partition_name, group.name(), partition_attr));
190 auto p = builder->FindPartition(partition.partition_name());
208 for (const auto& partition_name : group.partition_names()) { in MatchAndExplain() local
209 auto p = metadata->FindPartition(partition_name); in MatchAndExplain()
213 *listener << "No partition " << partition_name; in MatchAndExplain()
221 return p.partition_name() == partition_name; in MatchAndExplain()
224 *listener << "Can't find partition update " << partition_name; in MatchAndExplain()
232 *listener << "Partition " << partition_name << " has size " in MatchAndExplain()
[all …]
Dboot_control_chromeos.cc151 bool BootControlChromeOS::GetPartitionDevice(const string& partition_name, in GetPartitionDevice() argument
155 if (base::StartsWith(partition_name, in GetPartitionDevice()
161 partition_name.substr(strlen(kPartitionNamePrefixDlc)); in GetPartitionDevice()
164 << partition_name; in GetPartitionDevice()
174 int partition_num = GetPartitionNumber(partition_name, slot); in GetPartitionDevice()
308 const string partition_name, BootControlInterface::Slot slot) const { in GetPartitionNumber() argument
320 string partition_lower = base::ToLowerASCII(partition_name); in GetPartitionNumber()
328 LOG(ERROR) << "Unknown Chrome OS partition name \"" << partition_name << "\""; in GetPartitionNumber()
/system/extras/partition_tools/
Dlpadd.cc90 unique_fd Open(const std::string& partition_name, int flags) const override { in Open() argument
91 if (partition_name == local_super_) { in Open()
94 return PartitionOpener::Open(partition_name, flags); in Open()
107 bool AddPartition(const std::string& partition_name, const std::string& group_name,
114 bool WritePartition(borrowed_fd fd, uint64_t file_size, const std::string& partition_name);
160 bool SuperHelper::AddPartition(const std::string& partition_name, const std::string& group_name, in AddPartition() argument
167 auto partition = builder_->AddPartition(partition_name, group_name, attributes); in AddPartition()
169 std::cerr << "Could not add partition: " << partition_name << "\n"; in AddPartition()
196 std::cerr << "Failed to set partition " << partition_name << " size to " << size in AddPartition()
211 if (source_fd >= 0 && !WritePartition(source_fd, file_size, partition_name)) { in AddPartition()
[all …]
/system/core/fs_mgr/libfiemap/
Dmetadata.cpp164 bool RemoveImageMetadata(const std::string& metadata_dir, const std::string& partition_name) { in RemoveImageMetadata() argument
178 builder->RemovePartition(partition_name); in RemoveImageMetadata()
182 bool UpdateMetadata(const std::string& metadata_dir, const std::string& partition_name, in UpdateMetadata() argument
188 auto partition = builder->FindPartition(partition_name); in UpdateMetadata()
193 if ((partition = builder->AddPartition(partition_name, attrs)) == nullptr) { in UpdateMetadata()
194 LOG(ERROR) << "Could not add partition " << partition_name << " to metadata"; in UpdateMetadata()
206 bool AddAttributes(const std::string& metadata_dir, const std::string& partition_name, in AddAttributes() argument
216 auto partition = builder->FindPartition(partition_name); in AddAttributes()
Dmetadata.h30 bool UpdateMetadata(const std::string& metadata_dir, const std::string& partition_name,
32 bool AddAttributes(const std::string& metadata_dir, const std::string& partition_name,
34 bool RemoveImageMetadata(const std::string& metadata_dir, const std::string& partition_name);
Dimage_test.cpp53 android::base::unique_fd Open(const std::string& partition_name, int flags) const override { in Open() argument
54 return PartitionOpener::Open(GetPathForBlockDeviceName(partition_name), flags); in Open()
56 bool GetInfo(const std::string& partition_name, BlockDeviceInfo* info) const override { in GetInfo() argument
57 return PartitionOpener::GetInfo(GetPathForBlockDeviceName(partition_name), info); in GetInfo()
59 std::string GetDeviceString(const std::string& partition_name) const override { in GetDeviceString()
60 return PartitionOpener::GetDeviceString(GetPathForBlockDeviceName(partition_name)); in GetDeviceString()
/system/core/fs_mgr/
Dfs_mgr_dm_linear.cpp209 if (android::fs_mgr::GetPartitionName(metadata_partition) == partition_name) { in InitDefaults()
216 LERROR << "Could not find any partition with name: " << partition_name; in InitDefaults()
219 if (partition_name.empty()) { in InitDefaults()
220 partition_name = android::fs_mgr::GetPartitionName(*partition); in InitDefaults()
221 } else if (partition_name != android::fs_mgr::GetPartitionName(*partition)) { in InitDefaults()
222 LERROR << "Inconsistent partition_name " << partition_name << " with partition " in InitDefaults()
228 device_name = partition_name; in InitDefaults()
257 if (!partition_name.empty()) return partition_name; in GetPartitionName()
Dfs_mgr_overlayfs.cpp472 const auto partition_name = android::base::Basename(kScratchMountPoint); in fs_mgr_overlayfs_teardown_scratch() local
475 if (images && images->BackingImageExists(partition_name)) { in fs_mgr_overlayfs_teardown_scratch()
477 if (!images->DisableImage(partition_name)) { in fs_mgr_overlayfs_teardown_scratch()
481 if (!images->UnmapImageIfExists(partition_name) || in fs_mgr_overlayfs_teardown_scratch()
482 !images->DeleteBackingImage(partition_name)) { in fs_mgr_overlayfs_teardown_scratch()
497 if (builder->FindPartition(partition_name) == nullptr) { in fs_mgr_overlayfs_teardown_scratch()
501 builder->RemovePartition(partition_name); in fs_mgr_overlayfs_teardown_scratch()
505 if (!DestroyLogicalPartition(partition_name)) return false; in fs_mgr_overlayfs_teardown_scratch()
521 const auto partition_name = android::base::Basename(mount_point); in fs_mgr_overlayfs_teardown_one() local
522 const auto oldpath = top + (cleanup_all ? "" : ("/" + partition_name)); in fs_mgr_overlayfs_teardown_one()
[all …]
/system/core/fs_mgr/libfs_avb/tests/
Dfs_avb_test_util.cpp95 " --chain_partition %s:%u:%s", partition.partition_name.c_str(), in GenerateVBMetaImage()
160 const std::string& partition_name, const uint64_t partition_size, in AddAvbFooter() argument
182 add_footer_option.c_str(), image_path.value().c_str(), partition_name.c_str(), in AddAvbFooter()
188 const std::string& partition_name, const size_t image_size, const size_t partition_size, in GenerateImageAndExtractVBMetaData() argument
192 base::FilePath image_path = GenerateImage(partition_name + ".img", image_size); in GenerateImageAndExtractVBMetaData()
195 AddAvbFooter(image_path, footer_type, partition_name, partition_size, avb_algorithm, in GenerateImageAndExtractVBMetaData()
200 auto vbmeta_image = ExtractVBMetaImage(image_path, partition_name + "-vbmeta.img"); in GenerateImageAndExtractVBMetaData()
206 return {(const uint8_t*)vbmeta_buffer.data(), vbmeta_buffer.size(), partition_name}; in GenerateImageAndExtractVBMetaData()
220 std::string partition_name = image_path.RemoveExtension().BaseName().value(); in LoadVBMetaData() local
221 return {(const uint8_t*)vbmeta_buffer.data(), vbmeta_buffer.size(), partition_name}; in LoadVBMetaData()
/system/core/init/
Ddevices_test.cpp68 .partition_name = "", in TEST()
82 .partition_name = "modem", in TEST()
98 .partition_name = "", in TEST()
113 .partition_name = "modem", in TEST()
128 … .path = "/devices/pci0000:00/0000:00:1f.2/mmcblk0", .partition_name = "", .partition_num = -1, in TEST()
139 .path = "/devices/pci//mmcblk0", .partition_name = "", .partition_num = -1, in TEST()
150 .path = "/devices/vbd-1234/mmcblk0", .partition_name = "", .partition_num = -1, in TEST()
161 .path = "/devices/vbd-/mmcblk0", .partition_name = "", .partition_num = -1, in TEST()
173 .partition_name = "", in TEST()
/system/update_engine/common/
Dfake_boot_control.h49 bool GetPartitionDevice(const std::string& partition_name, in GetPartitionDevice() argument
54 auto part_it = devices_[slot].find(partition_name); in GetPartitionDevice()
96 void SetPartitionDevice(const std::string& partition_name, in SetPartitionDevice() argument
100 devices_[slot][partition_name] = device; in SetPartitionDevice()

1234