pmt: reformat code
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
|
||||
namespace PartitionManager {
|
||||
RUN_ASYNC(backupFunction)(const std::string &partitionName,
|
||||
const std::string &outputName,
|
||||
const uint64_t bufferSize) {
|
||||
const std::string &outputName,
|
||||
const uint64_t bufferSize) {
|
||||
if (!Variables->PartMap->hasPartition(partitionName))
|
||||
return {format("Couldn't find partition: %s", partitionName.data()), false};
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ Copyright 2025 Yağız Zengin
|
||||
|
||||
namespace PartitionManager {
|
||||
RUN_ASYNC(eraseFunction)(const std::string &partitionName,
|
||||
const uint64_t bufferSize) {
|
||||
const uint64_t bufferSize) {
|
||||
if (!Variables->PartMap->hasPartition(partitionName))
|
||||
return {format("Couldn't find partition: %s", partitionName.data()), false};
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ Copyright 2025 Yağız Zengin
|
||||
|
||||
namespace PartitionManager {
|
||||
RUN_ASYNC(flashFunction)(const std::string &partitionName,
|
||||
const std::string &imageName,
|
||||
const uint64_t bufferSize) {
|
||||
const std::string &imageName,
|
||||
const uint64_t bufferSize) {
|
||||
if (!Helper::fileIsExists(imageName))
|
||||
return {format("Couldn't find image file: %s", imageName.data()), false};
|
||||
if (!Variables->PartMap->hasPartition(partitionName))
|
||||
|
||||
@@ -32,9 +32,9 @@ INIT(partitionSizeFunction) {
|
||||
<< "Initializing variables of partition size getter function."
|
||||
<< std::endl;
|
||||
cmd = _app.add_subcommand("sizeof", "Tell size(s) of input partition list")
|
||||
->footer("Use get-all or getvar-all as partition name for getting "
|
||||
"sizes of all "
|
||||
"partitions.");
|
||||
->footer("Use get-all or getvar-all as partition name for getting "
|
||||
"sizes of all "
|
||||
"partitions.");
|
||||
cmd->add_option("partition(s)", partitions, "Partition name(s).")
|
||||
->required()
|
||||
->delimiter(',');
|
||||
|
||||
@@ -25,14 +25,15 @@
|
||||
#define RUN(cls) bool cls::run()
|
||||
#define RUN_ASYNC(cls) pair cls::runAsync
|
||||
#define IS_USED(cls) bool cls::isUsed() const
|
||||
#define IS_USED_COMMON_BODY(cls) bool cls::isUsed() const { return cmd->parsed(); }
|
||||
#define IS_USED_COMMON_BODY(cls) \
|
||||
bool cls::isUsed() const { return cmd->parsed(); }
|
||||
#define NAME(cls) const char *cls::name() const
|
||||
|
||||
#define COMMON_FUNCTION_BODY() \
|
||||
CLI::App *cmd = nullptr; \
|
||||
bool init(CLI::App &_app) override; \
|
||||
bool run() override; \
|
||||
[[nodiscard]] bool isUsed() const override; \
|
||||
#define COMMON_FUNCTION_BODY() \
|
||||
CLI::App *cmd = nullptr; \
|
||||
bool init(CLI::App &_app) override; \
|
||||
bool run() override; \
|
||||
[[nodiscard]] bool isUsed() const override; \
|
||||
[[nodiscard]] const char *name() const override
|
||||
|
||||
namespace PartitionManager {
|
||||
|
||||
Reference in New Issue
Block a user