diff options
author | John Crispin <blogic@openwrt.org> | 2014-06-10 17:50:15 +0200 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-06-11 00:06:12 +0200 |
commit | 13259259bc53657617844660f2664f4b4fb4ac02 (patch) | |
tree | ec7e121e780ddfd1923e48d7d17243241b213948 /watchdog.c | |
parent | 53c1ea6b9ade10eff3cec07519db862b365a4233 (diff) | |
download | unitd-13259259bc53657617844660f2664f4b4fb4ac02.tar unitd-13259259bc53657617844660f2664f4b4fb4ac02.zip |
add upgraded support for nand flashing
Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'watchdog.c')
-rw-r--r-- | watchdog.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -119,3 +119,12 @@ void watchdog_init(int preinit) DEBUG(4, "Opened watchdog with timeout %ds\n", watchdog_timeout(0)); } + + +void watchdog_no_cloexec(void) +{ + if (wdt_fd < 0) + return; + + fcntl(wdt_fd, F_SETFD, fcntl(wdt_fd, F_GETFD) & ~FD_CLOEXEC); +} |