chiark / gitweb /
relicense to LGPLv2.1 (with exceptions)
[elogind.git] / src / watchdog.c
index 9625e151af1ee5190a3ba422379697c8b3d8613d..13265e76929d0d8b8e80353fb59c2baa5e048b22 100644 (file)
@@ -6,16 +6,16 @@
   Copyright 2012 Lennart Poettering
 
   systemd is free software; you can redistribute it and/or modify it
-  under the terms of the GNU General Public License as published by
-  the Free Software Foundation; either version 2 of the License, or
+  under the terms of the GNU Lesser General Public License as published by
+  the Free Software Foundation; either version 2.1 of the License, or
   (at your option) any later version.
 
   systemd is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-  General Public License for more details.
+  Lesser General Public License for more details.
 
-  You should have received a copy of the GNU General Public License
+  You should have received a copy of the GNU Lesser General Public License
   along with systemd; If not, see <http://www.gnu.org/licenses/>.
 ***/
 
@@ -98,6 +98,7 @@ static int open_watchdog(void) {
 }
 
 int watchdog_set_timeout(usec_t *usec) {
+        int r;
 
         watchdog_timeout = *usec;
 
@@ -107,11 +108,13 @@ int watchdog_set_timeout(usec_t *usec) {
                 return 0;
 
         if (watchdog_fd < 0)
-                return open_watchdog();
+                r = open_watchdog();
         else
-                return update_timeout();
+                r = update_timeout();
 
         *usec = watchdog_timeout;
+
+        return r;
 }
 
 int watchdog_ping(void) {