pmt: Introduce, fixup

- Fix pstderr file pointer.
 - Improve and add more functions on libpartition_map.
 - Improve functions.
This commit is contained in:
2025-08-28 23:13:52 +03:00
parent d7bd11165d
commit 1a9b4ff5ad
10 changed files with 161 additions and 59 deletions

View File

@@ -50,8 +50,7 @@ RUN(typeFunction) {
for (const auto &content : contents) {
if (!Variables->PartMap->hasPartition(content) &&
!Helper::fileIsExists(content))
throw Error("Couldn't find partition or image file: %s\n",
content.data());
throw Error("Couldn't find partition or image file: %s", content.data());
bool found = false;
for (const auto &[magic, name] : magics) {
@@ -68,7 +67,7 @@ RUN(typeFunction) {
}
if (!found)
throw Error("Couldn't determine type of %s%s\n", content.data(),
throw Error("Couldn't determine type of %s%s", content.data(),
content == "userdata" ? " (encrypted file system?)" : "");
}