summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac7
-rw-r--r--epoch_base.hpp5
-rw-r--r--manager.hpp5
3 files changed, 13 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 59cf5ce..2680788 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,13 @@ AC_ARG_VAR(HOST_OFFSET_FILE, [The file to save host time offset])
AS_IF([test "x$HOST_OFFSET_FILE" == "x"], [HOST_OFFSET_FILE="/var/lib/obmc/saved_host_offset"])
AC_DEFINE_UNQUOTED([HOST_OFFSET_FILE], ["$HOST_OFFSET_FILE"], [The file to save host time offset])
+AC_ARG_VAR(DEFAULT_TIME_MODE, [The default time mode])
+AS_IF([test "x$DEFAULT_TIME_MODE" == "x"], [DEFAULT_TIME_MODE=Mode::Manual])
+AC_DEFINE_UNQUOTED([DEFAULT_TIME_MODE], [$DEFAULT_TIME_MODE], [The default time mode])
+
+AC_ARG_VAR(DEFAULT_TIME_OWNER, [The default time owner])
+AS_IF([test "x$DEFAULT_TIME_OWNER" == "x"], [DEFAULT_TIME_OWNER=Owner::Both])
+AC_DEFINE_UNQUOTED([DEFAULT_TIME_OWNER], [$DEFAULT_TIME_OWNER], [The default time owner])
AC_CONFIG_FILES([Makefile test/Makefile])
AC_OUTPUT
diff --git a/epoch_base.hpp b/epoch_base.hpp
index 4f23d51..79aca90 100644
--- a/epoch_base.hpp
+++ b/epoch_base.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "config.h"
#include "property_change_listener.hpp"
#include <sdbusplus/bus.hpp>
@@ -38,10 +39,10 @@ class EpochBase : public sdbusplus::server::object::object <
sdbusplus::bus::bus& bus;
/** @brief The current time mode */
- Mode timeMode = Mode::Manual;
+ Mode timeMode = DEFAULT_TIME_MODE;
/** @brief The current time owner */
- Owner timeOwner = Owner::Both;
+ Owner timeOwner = DEFAULT_TIME_OWNER;
/** @brief Set current time to system
*
diff --git a/manager.hpp b/manager.hpp
index e84652c..3256f59 100644
--- a/manager.hpp
+++ b/manager.hpp
@@ -1,5 +1,6 @@
#pragma once
+#include "config.h"
#include "types.hpp"
#include "property_change_listener.hpp"
#include "settings.hpp"
@@ -64,10 +65,10 @@ class Manager
std::string requestedOwner;
/** @brief The current time mode */
- Mode timeMode;
+ Mode timeMode = DEFAULT_TIME_MODE;
/** @brief The current time owner */
- Owner timeOwner;
+ Owner timeOwner = DEFAULT_TIME_OWNER;
/** @brief Restore saved settings */
void restoreSettings();
OpenPOWER on IntegriCloud