[PATCH 2/2] rfkill: do not fsync(3) /dev/rfkill file descriptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxx>
---
 sys-utils/rfkill.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)
-- 
2.14.1

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux