diff options
author | Sami Kerola | 2017-07-23 23:20:37 +0200 |
---|---|---|
committer | Karel Zak | 2017-07-31 13:48:04 +0200 |
commit | 4aaabaa9f4a9ed61afb0b9d16f01e0aaf526e8e0 (patch) | |
tree | d8e294b23fcaa4405f4624285c9995d003ca8c3d /sys-utils/wdctl.c | |
parent | Docs: update howto-usage-function.txt (diff) | |
download | kernel-qcow2-util-linux-4aaabaa9f4a9ed61afb0b9d16f01e0aaf526e8e0.tar.gz kernel-qcow2-util-linux-4aaabaa9f4a9ed61afb0b9d16f01e0aaf526e8e0.tar.xz kernel-qcow2-util-linux-4aaabaa9f4a9ed61afb0b9d16f01e0aaf526e8e0.zip |
wdctl: do not call fsync(2) when closing watchdog device
This removes bogus write failed warning.
$ wdctl
wdctl: write failed: Invalid argument
Device: /dev/watchdog
[...]
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/wdctl.c')
-rw-r--r-- | sys-utils/wdctl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys-utils/wdctl.c b/sys-utils/wdctl.c index 33012dca3..642db85d2 100644 --- a/sys-utils/wdctl.c +++ b/sys-utils/wdctl.c @@ -343,7 +343,7 @@ static int set_watchdog(struct wdinfo *wd, int timeout) warn(_("cannot set timeout for %s"), wd->device); } - if (close_fd(fd)) + if (close(fd)) warn(_("write failed")); sigprocmask(SIG_SETMASK, &oldsigs, NULL); printf(P_("Timeout has been set to %d second.\n", @@ -408,7 +408,7 @@ static int read_watchdog(struct wdinfo *wd) * the machine might end up rebooting. */ } - if (close_fd(fd)) + if (close(fd)) warn(_("write failed")); sigprocmask(SIG_SETMASK, &oldsigs, NULL); |