partitionSizeFunction: fiz --only-size flag

This commit is contained in:
2025-08-09 22:24:03 +03:00
parent 8e629d60d0
commit fc1e45f2ca
2 changed files with 5 additions and 5 deletions

View File

@@ -1,3 +0,0 @@
# Partiton Manager
## WORK IN PROGRESS!

View File

@@ -35,7 +35,7 @@ namespace PartitionManager {
cmd->add_flag("--as-kilobyte", asKiloBytes, "Tell input size of partition list as kilobyte.");
cmd->add_flag("--as-megabyte", asMega, "Tell input size of partition list as megabyte.");
cmd->add_flag("--as-gigabyte", asGiga, "Tell input size of partition list as gigabyte.");
cmd->add_flag("--only-size", onlySize, "Tell input size of partition list as not printing multiple.");
cmd->add_flag("--only-size", onlySize, "Tell input size of partition list as not printing multiple and partition name.");
return true;
}
@@ -57,7 +57,10 @@ namespace PartitionManager {
if (asMega) multiple = "MB";
if (asGiga) multiple = "GB";
println("%s: %s%s", partition.data(), convertTo(Variables->PartMap->sizeOf(partition), multiple).data(),
if (onlySize)
println("%s", convertTo(Variables->PartMap->sizeOf(partition), multiple).data());
else
println("%s: %s%s", partition.data(), convertTo(Variables->PartMap->sizeOf(partition), multiple).data(),
multiple.data());
}