pmt: CLeanup unnecessary function: real-link-path

- real-link-path function is removed.
 - Added --real-link-path flag to real-path function for as real-link-path.
This commit is contained in:
2025-08-15 11:52:03 +03:00
parent c3acd4b370
commit 1bc3b5ccef
6 changed files with 14 additions and 89 deletions

View File

@@ -27,6 +27,7 @@ bool realPathFunction::init(CLI::App &_app) {
cmd->add_option("partition(s)", partitions, "Partition name(s)")
->required()
->delimiter(',');
cmd->add_flag("--real-link-path", realLinkPath, "Print real link path(s)")->default_val(false);
return true;
}
@@ -46,7 +47,10 @@ bool realPathFunction::run() {
partition.data());
}
println("%s", Variables->PartMap->getRealPathOf(partition).data());
if (realLinkPath)
println("%s", Variables->PartMap->getRealLinkPathOf(partition).data());
else
println("%s", Variables->PartMap->getRealPathOf(partition).data());
}
return true;