pmt: Improve pmt & libpartition_map

- Change some operator returnn types.
 - Use std::map instead of std::unordered on magic number maps.
 - Some improvements.
This commit is contained in:
2025-09-01 01:21:06 +03:00
parent fea9c834fc
commit e7baf4f5bc
15 changed files with 115 additions and 94 deletions

View File

@@ -18,9 +18,10 @@ Copyright 2025 Yağız Zengin
#include <PartitionManager/PartitionManager.hpp>
#define RFUN "rebootFunction"
#define FUNCTION_CLASS rebootFunction
namespace PartitionManager {
INIT(rebootFunction) {
INIT {
LOGN(RFUN, INFO) << "Initializing variables of reboot function." << std::endl;
cmd = _app.add_subcommand("reboot", "Reboots device");
cmd->add_option("rebootTarget", rebootTarget,
@@ -28,7 +29,7 @@ INIT(rebootFunction) {
return true;
}
RUN(rebootFunction) {
RUN {
LOGN(RFUN, INFO) << "Rebooting device!!! (custom reboot target: "
<< (rebootTarget.empty() ? "none" : rebootTarget)
<< std::endl;
@@ -39,7 +40,7 @@ RUN(rebootFunction) {
return true;
}
IS_USED_COMMON_BODY(rebootFunction)
IS_USED_COMMON_BODY
NAME(rebootFunction) { return RFUN; }
NAME { return RFUN; }
} // namespace PartitionManager