pmt: reformat code, etc.

This commit is contained in:
2025-09-04 20:42:50 +03:00
parent e1dc7132ee
commit deab481fd7
7 changed files with 37 additions and 14 deletions

View File

@@ -223,6 +223,11 @@ public:
*/
[[nodiscard]] bool hasPartition(std::string_view name) const;
/**
* Returns true if the device has dynamic partitions, false otherwise.
*/
[[nodiscard]] bool hasLogicalPartitions() const;
/**
* Returns the bool type status of whether the
* entered partition name is marked as logical in the

View File

@@ -177,6 +177,14 @@ bool basic_partition_map_builder::hasPartition(
return _current_map.find(name);
}
bool basic_partition_map_builder::hasLogicalPartitions() const {
_map_build_check();
for (const auto &[name, props] : _current_map)
if (props.isLogical) return true;
return false;
}
bool basic_partition_map_builder::isLogical(const std::string_view name) const {
_map_build_check();
return _current_map.is_logical(name);