diff options
author | Sami Kerola | 2017-09-11 21:55:58 +0200 |
---|---|---|
committer | Karel Zak | 2017-09-15 12:24:31 +0200 |
commit | b120966812809c816a184f21bf10c65ed837bf49 (patch) | |
tree | 1602d19028dd96c66827ed9b73e7b65a3c7111f1 /sys-utils/rfkill.c | |
parent | rfkill: allow use of multiple arguments (diff) | |
download | kernel-qcow2-util-linux-b120966812809c816a184f21bf10c65ed837bf49.tar.gz kernel-qcow2-util-linux-b120966812809c816a184f21bf10c65ed837bf49.tar.xz kernel-qcow2-util-linux-b120966812809c816a184f21bf10c65ed837bf49.zip |
rfkill: do not fsync(3) /dev/rfkill file descriptor
Attempt to fsync() this device returns EINVAL, causing the rfkill always to
return EXIT_FAILURE when either block or unblock is requested. Simply
closing the file descriptor will fix the issue.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'sys-utils/rfkill.c')
-rw-r--r-- | sys-utils/rfkill.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys-utils/rfkill.c b/sys-utils/rfkill.c index 6b586d2ed..7914c4309 100644 --- a/sys-utils/rfkill.c +++ b/sys-utils/rfkill.c @@ -452,7 +452,7 @@ static int rfkill_block(uint8_t block, const char *param) closelog(); } free(message); - return close_fd(fd); + return close(fd); } static void __attribute__((__noreturn__)) usage(void) |