aboutsummaryrefslogtreecommitdiffstats
path: root/src/cli
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-07-11 18:22:27 -0400
committerJack Lloyd <[email protected]>2018-07-11 18:22:27 -0400
commit8bd4b4d11b916ca3455bf7b763aba9d00a26bc23 (patch)
treefbf5185266cf7ee844988053d34810d46e77f181 /src/cli
parentd52a0280a8942b93e9cb4c964f9a9fcd7117a413 (diff)
In speed command warn if some unknown flag is passed to --clear-cpuid
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/speed.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cli/speed.cpp b/src/cli/speed.cpp
index d1b6aead3..42172f38d 100644
--- a/src/cli/speed.cpp
+++ b/src/cli/speed.cpp
@@ -742,7 +742,13 @@ class Speed final : public Command
for(std::string cpuid_to_clear : Botan::split_on(get_arg("clear-cpuid"), ','))
{
- for(auto bit : Botan::CPUID::bit_from_string(cpuid_to_clear))
+ auto bits = Botan::CPUID::bit_from_string(cpuid_to_clear);
+ if(bits.empty())
+ {
+ error_output() << "Warning don't know CPUID flag '" << cpuid_to_clear << "'\n";
+ }
+
+ for(auto bit : bits)
{
Botan::CPUID::clear_cpuid_bit(bit);
}