chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
771f19c
)
watchdog: really return the actual watchdog timeout
author
Michael Olbrich
<m.olbrich@pengutronix.de>
Fri, 6 Apr 2012 19:37:26 +0000
(21:37 +0200)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 10 Apr 2012 20:32:30 +0000
(22:32 +0200)
In the current code setting the return argument is never reached.
src/watchdog.c
patch
|
blob
|
history
diff --git
a/src/watchdog.c
b/src/watchdog.c
index 9625e151af1ee5190a3ba422379697c8b3d8613d..372c16f317477e1cc5a8221dd29db29e013560ac 100644
(file)
--- a/
src/watchdog.c
+++ b/
src/watchdog.c
@@
-98,6
+98,7
@@
static int open_watchdog(void) {
}
int watchdog_set_timeout(usec_t *usec) {
}
int watchdog_set_timeout(usec_t *usec) {
+ int r;
watchdog_timeout = *usec;
watchdog_timeout = *usec;
@@
-107,11
+108,13
@@
int watchdog_set_timeout(usec_t *usec) {
return 0;
if (watchdog_fd < 0)
return 0;
if (watchdog_fd < 0)
- r
eturn
open_watchdog();
+ r
=
open_watchdog();
else
else
- r
eturn
update_timeout();
+ r
=
update_timeout();
*usec = watchdog_timeout;
*usec = watchdog_timeout;
+
+ return r;
}
int watchdog_ping(void) {
}
int watchdog_ping(void) {