Fix minInterval option
The number option needs to be specified using add_option,
not add_flag.
Tested: with the fix, --min_interval=60000 sets the minInterval to 60
seconds.
Resolves: openbmc/phosphor-watchdog#2
Signed-off-by: Kun Yi <kunyi731@gmail.com>
Change-Id: I2b318454d13b5f7e607f9c9b9de1903edf7bc3a6
diff --git a/mainapp.cpp b/mainapp.cpp
index abd4777..06b22ec 100644
--- a/mainapp.cpp
+++ b/mainapp.cpp
@@ -131,8 +131,8 @@
"is signaled.");
uint64_t minInterval = phosphor::watchdog::DEFAULT_MIN_INTERVAL_MS;
- app.add_flag("-m,--min_interval", minInterval,
- "Set minimum interval for watchdog");
+ app.add_option("-m,--min_interval", minInterval,
+ "Set minimum interval for watchdog in milliseconds");
CLI11_PARSE(app, argc, argv);