Watchdog: Add Notlog setting function
Add function to set Notlog property to implement the function of
the watchdog not recording logs.
Related commit:
https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/66240
https://gerrit.openbmc.org/c/openbmc/phosphor-watchdog/+/66242
Change-Id: Ia90c345a72f8f877aa8f8216337a1267f09b839a
Signed-off-by: Tim Chao <Tim.Chao@quantatw.com>
diff --git a/app/watchdog.cpp b/app/watchdog.cpp
index 3126c0c..2f6d883 100644
--- a/app/watchdog.cpp
+++ b/app/watchdog.cpp
@@ -249,6 +249,7 @@
// Mark as initialized so that future resets behave correctly
wd_service.setInitialized(true);
+ wd_service.setNotlog(dontLog);
lastCallSuccessful = true;
return ipmi::responseSuccess();
diff --git a/app/watchdog_service.cpp b/app/watchdog_service.cpp
index e17f146..f9fb625 100644
--- a/app/watchdog_service.cpp
+++ b/app/watchdog_service.cpp
@@ -183,6 +183,11 @@
setProperty("Enabled", enabled);
}
+void WatchdogService::setNotlog(bool Notlog)
+{
+ setProperty("Notlog", Notlog);
+}
+
void WatchdogService::setExpireAction(Action expireAction)
{
setProperty("ExpireAction", convertForMessage(expireAction));
diff --git a/app/watchdog_service.hpp b/app/watchdog_service.hpp
index 1a5486a..f466ec7 100644
--- a/app/watchdog_service.hpp
+++ b/app/watchdog_service.hpp
@@ -67,6 +67,12 @@
*/
void setEnabled(bool enabled);
+ /** @brief Sets the value of the Notlog property on the host watchdog
+ *
+ * @param[in] Notlog - The new Notlog value
+ */
+ void setNotlog(bool Notlog);
+
/** @brief Sets the value of the expireAction property on the host watchdog
*
* @param[in] expireAction - The new expireAction value