Home
last modified time | relevance | path

Searched refs:partition_name (Results 1 – 25 of 93) 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/update_engine/payload_consumer/
Dpartition_update_generator_android.cc60 for (const auto& partition_name : ab_partitions.value()) { in GenerateOperationsForPartitionsNotInPayload() local
61 if (partitions_in_payload.find(partition_name) != in GenerateOperationsForPartitionsNotInPayload()
63 LOG(INFO) << partition_name << " has included in payload"; in GenerateOperationsForPartitionsNotInPayload()
68 CreatePartitionUpdate(partition_name, source_slot, target_slot); in GenerateOperationsForPartitionsNotInPayload()
70 LOG(ERROR) << "Failed to create partition update for " << partition_name; in GenerateOperationsForPartitionsNotInPayload()
98 auto partition_name = entry.path().filename().string(); in GetStaticAbPartitionsOnDevice() local
99 if (android::base::EndsWith(partition_name, SUFFIX_A) || in GetStaticAbPartitionsOnDevice()
100 android::base::EndsWith(partition_name, SUFFIX_B)) { in GetStaticAbPartitionsOnDevice()
101 partitions_with_suffix.insert(partition_name); in GetStaticAbPartitionsOnDevice()
127 const std::string& partition_name, in CreatePartitionUpdate() argument
[all …]
/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,
/system/core/fs_mgr/libsnapshot/corpus/
Dlaunch_device.txt14 partition_name: "sys_a"
20 partition_name: "vnd_a"
26 partition_name: "prd_a"
49 partition_name: "sys"
62 partition_name: "vnd"
75 partition_name: "prd"
103 partition_name: "sys_b"
113 partition_name: "vnd_b"
123 partition_name: "prd_b"
/system/core/fs_mgr/libsnapshot/
Dtest_helpers.cpp45 android::base::unique_fd TestPartitionOpener::Open(const std::string& partition_name, in Open() argument
47 if (partition_name == "super") { in Open()
50 return PartitionOpener::Open(partition_name, flags); in Open()
53 bool TestPartitionOpener::GetInfo(const std::string& partition_name, in GetInfo() argument
55 if (partition_name != "super") { in GetInfo()
56 return PartitionOpener::GetInfo(partition_name, info); in GetInfo()
70 std::string TestPartitionOpener::GetDeviceString(const std::string& partition_name) const { in GetDeviceString()
71 if (partition_name == "super") { in GetDeviceString()
74 return PartitionOpener::GetDeviceString(partition_name); in GetDeviceString()
150 for (const auto& partition_name : group.partition_names()) { in FillFakeMetadata() local
[all …]
/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()
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()
Dbuilder.cpp207 std::string partition_name = builder->GetBlockDevicePartitionName(i); in New() local
209 if (opener->GetInfo(partition_name, &device_info)) { in New()
275 std::string partition_name = in UpdateMetadataForOtherSuper() local
277 std::string slot_suffix = GetPartitionSlotSuffix(partition_name); in UpdateMetadataForOtherSuper()
282 << partition_name; in UpdateMetadataForOtherSuper()
286 partition_name.substr(0, partition_name.size() - slot_suffix.size()) + in UpdateMetadataForOtherSuper()
362 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
367 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
372 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
377 LERROR << "Block device " << device_info.partition_name in VerifyDeviceProperties()
[all …]
/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()
205 std::string partition_name = GetPartitionName(partition); in UpdateSuper() local
[all …]
Dcommands.cpp176 const auto& partition_name = args[1]; in EraseHandler() local
177 if (IsProtectedPartitionDuringMerge(device, partition_name)) { in EraseHandler()
178 auto message = "Cannot erase " + partition_name + " while a snapshot update is in progress"; in EraseHandler()
183 if (!OpenPartition(device, partition_name, &handle)) { in EraseHandler()
376 explicit PartitionBuilder(FastbootDevice* device, const std::string& partition_name);
389 PartitionBuilder::PartitionBuilder(FastbootDevice* device, const std::string& partition_name) in PartitionBuilder() argument
391 std::string slot_suffix = GetSuperSlotSuffix(device, partition_name); in PartitionBuilder()
419 std::string partition_name = args[1]; in CreatePartitionHandler() local
424 PartitionBuilder builder(device, partition_name); in CreatePartitionHandler()
429 if (builder->FindPartition(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/
Dboot_control_chromeos.cc155 const std::string partition_name, in ParseDlcPartitionName() argument
162 partition_name, "/", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); in ParseDlcPartitionName()
164 LOG(ERROR) << "DLC partition name (" << partition_name in ParseDlcPartitionName()
179 bool BootControlChromeOS::GetPartitionDevice(const std::string& partition_name, in GetPartitionDevice() argument
185 if (base::StartsWith(partition_name, in GetPartitionDevice()
189 if (!ParseDlcPartitionName(partition_name, &dlc_id, &dlc_package)) in GetPartitionDevice()
200 int partition_num = GetPartitionNumber(partition_name, slot); in GetPartitionDevice()
215 bool BootControlChromeOS::GetPartitionDevice(const string& partition_name, in GetPartitionDevice() argument
218 return GetPartitionDevice(partition_name, slot, false, device, nullptr); in GetPartitionDevice()
343 const string partition_name, BootControlInterface::Slot slot) const { in GetPartitionNumber() argument
[all …]
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.h48 bool GetPartitionDevice(const std::string& partition_name,
53 bool GetPartitionDevice(const std::string& partition_name,
80 int GetPartitionNumber(const std::string partition_name,
86 bool ParseDlcPartitionName(const std::string partition_name,
/system/update_engine/common/
Dfake_boot_control.h49 bool GetPartitionDevice(const std::string& partition_name, in GetPartitionDevice() argument
56 auto part_it = devices_[slot].find(partition_name); in GetPartitionDevice()
63 bool GetPartitionDevice(const std::string& partition_name, in GetPartitionDevice() argument
66 return GetPartitionDevice(partition_name, slot, false, device, nullptr); in GetPartitionDevice()
104 void SetPartitionDevice(const std::string& partition_name, in SetPartitionDevice() argument
108 devices_[slot][partition_name] = device; in SetPartitionDevice()
/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()

1234