summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKun Yi <kunyi731@gmail.com>2019-05-17 10:42:18 -0700
committerKun Yi <kunyi731@gmail.com>2019-05-17 10:42:18 -0700
commitd4695590d2f2b9f6295097714624b8043d25a701 (patch)
tree553b9aa18cc018e7794038bb7678fbc6a3f40a09
parent3987c8b499e07e2247a0c1c389fe909bcef3b268 (diff)
downloadphosphor-pid-control-d4695590d2f2b9f6295097714624b8043d25a701.tar.gz
phosphor-pid-control-d4695590d2f2b9f6295097714624b8043d25a701.zip
main: fix loggingEnabled checking
loggingPath is not populated after args are parsed. Tested: with -l, swampd correctly generated logs Resolves: openbmc/phosphor-pid-control#12 Signed-off-by: Kun Yi <kunyi731@gmail.com> Change-Id: Ic103879f6b65d4e89c49e8d9700c5d71b9549f4d
-rw-r--r--main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/main.cpp b/main.cpp
index db355ab..be0691d 100644
--- a/main.cpp
+++ b/main.cpp
@@ -139,10 +139,10 @@ int main(int argc, char* argv[])
->check(CLI::ExistingDirectory);
app.add_flag("-t,--tuning", tuningEnabled, "Enable or disable tuning");
- loggingEnabled = (!loggingPath.empty());
-
CLI11_PARSE(app, argc, argv);
+ loggingEnabled = (!loggingPath.empty());
+
static constexpr auto modeRoot = "/xyz/openbmc_project/settings/fanctrl";
// Create a manager for the ModeBus because we own it.
sdbusplus::server::manager::manager(
OpenPOWER on IntegriCloud