summaryrefslogtreecommitdiffstats
path: root/src/Client/SystemCommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Client/SystemCommands.cpp')
-rw-r--r--src/Client/SystemCommands.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Client/SystemCommands.cpp b/src/Client/SystemCommands.cpp
index d33441f..2151071 100644
--- a/src/Client/SystemCommands.cpp
+++ b/src/Client/SystemCommands.cpp
@@ -80,8 +80,8 @@ void SystemCommands::printFSInfo(boost::shared_ptr<const Common::XmlData> &packe
float percent = 100*used/(used+available);
if(percent > 100) percent = 100;
- std::printf("\t%s%.*f%s", nameString.extract().c_str(), (used < 10) ? 2 : 1, used, (usedUnit == totalUnit) ? "" : Core::String(" " + units[usedUnit]).extract().c_str());
- std::printf("/%.*f %s (%.1f%%)\n", (total < 10) ? 2 : 1, total, units[totalUnit].extract().c_str(), percent);
+ std::printf("\t%s%.*f%s", nameString.toLocale().c_str(), (used < 10) ? 2 : 1, used, (usedUnit == totalUnit) ? "" : Core::String(" " + units[usedUnit]).toLocale().c_str());
+ std::printf("/%.*f %s (%.1f%%)\n", (total < 10) ? 2 : 1, total, units[totalUnit].toLocale().c_str(), percent);
}
}
@@ -126,7 +126,7 @@ void SystemCommands::printHostStatus(boost::shared_ptr<const Common::XmlData> &p
usedMem /= 1024;
}
- std::printf("\tMemory usage:\t%.*f/%.*f %s", (usedMem < 10) ? 2 : 1, usedMem, (totalMem < 10) ? 2 : 1, totalMem, units[unit].extract().c_str());
+ std::printf("\tMemory usage:\t%.*f/%.*f %s", (usedMem < 10) ? 2 : 1, usedMem, (totalMem < 10) ? 2 : 1, totalMem, units[unit].toLocale().c_str());
std::printf(" (%.1f%%)\n", usedMem*100.0f/totalMem);
totalMem = packet->get<unsigned long>("totalSwap");
@@ -142,7 +142,7 @@ void SystemCommands::printHostStatus(boost::shared_ptr<const Common::XmlData> &p
usedMem /= 1024;
}
- std::printf("\tSwap usage:\t%.*f/%.*f %s", (usedMem < 10) ? 2 : 1, usedMem, (totalMem < 10) ? 2 : 1, totalMem, units[unit].extract().c_str());
+ std::printf("\tSwap usage:\t%.*f/%.*f %s", (usedMem < 10) ? 2 : 1, usedMem, (totalMem < 10) ? 2 : 1, totalMem, units[unit].toLocale().c_str());
std::printf(" (%.1f%%)\n", usedMem*100.0f/totalMem);
}