From b120966812809c816a184f21bf10c65ed837bf49 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Mon, 11 Sep 2017 20:55:58 +0100 Subject: 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 --- sys-utils/rfkill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys-utils/rfkill.c') 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) -- cgit v1.2.3-55-g7522