From b4987d09e5dd5178c83876b2d06d8bdf1d67d086 Mon Sep 17 00:00:00 2001 From: Kunhoon Baik Date: Mon, 8 Aug 2016 20:16:27 +0900 Subject: [systemd backend] modification of aw_register behavior Prev : return NOT support Now : return after checking statically-registered Change-Id: I2116d7413d2ab662f42f079aad703e7d4976ae99 --- src/argos-systemd.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/argos-systemd.c b/src/argos-systemd.c index e0724ee..493f1f7 100644 --- a/src/argos-systemd.c +++ b/src/argos-systemd.c @@ -16,17 +16,21 @@ #include "common.h" #include +#include /* In case of watchdog based on systemd sd_notify, * runtime registration does not support. - * It will be supported by resrouced watchdog in the future */ - + * Thus, just check whether the watchdog is enabled or not*/ int _aw_register(unsigned int timeout) { - return -ENOTSUP; + + if ( sd_watchdog_enabled(0, NULL) ) + return 0; + else + return -1; } -/* Under development - Ask to Mr.Hwang for the progress */ +/* NOT Support for systemd backend */ int _aw_control(aw_op_e op, void *data) { return -ENOTSUP; -- cgit v1.2.3