pmt: Improve libpartition_map types and some functions.

- Add new operators to Map_t.
 - Add new flags to info function.
 - Move some local pmt function(s) to libhelper.
 - Etc...
This commit is contained in:
2025-09-07 11:56:12 +03:00
parent 1984825dec
commit 77760bd1d4
8 changed files with 51 additions and 21 deletions

View File

@@ -241,5 +241,12 @@ uint64_t getRandomOffset(const uint64_t size, const uint64_t bufferSize) {
return rand() % maxOffset;
}
std::string convertTo(const uint64_t size, const std::string &multiple) {
if (multiple == "KB") return std::to_string(TO_KB(size));
if (multiple == "MB") return std::to_string(TO_MB(size));
if (multiple == "GB") return std::to_string(TO_GB(size));
return std::to_string(size);
}
std::string getLibVersion() { MKVERSION("libhelper"); }
} // namespace Helper