pmt: start working for 1.1.0, first: add * operator to libpartition_map

This commit is contained in:
2025-08-13 09:41:27 +03:00
parent 7350791d04
commit 23087966d6
6 changed files with 115 additions and 1 deletions

View File

@@ -89,7 +89,7 @@ bool hasMagic(const uint64_t magic, const ssize_t buf,
return false;
}
auto *buffer = new uint8_t[buf];
auto *buffer = new(std::nothrow) uint8_t[buf];
collector.delAfterProgress(buffer);
const ssize_t bytesRead = read(fd, buffer, buf);

View File

@@ -251,5 +251,13 @@ bool basic_partition_map_builder::operator()(const std::string_view path) {
return readDirectory(path);
}
Map_t& basic_partition_map_builder::operator*() {
return _current_map;
}
const Map_t& basic_partition_map_builder::operator*() const {
return _current_map;
}
std::string getLibVersion() { MKVERSION("libpartition_map"); }
} // namespace PartitionMap