[PATCH v4l-utils] keytable: open lirc for read/write for attaching/detaching bpf programs

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

 



Signed-off-by: Sean Young <sean@xxxxxxxx>
---
 utils/keytable/keytable.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
index c47211fa..3d5a3c51 100644
--- a/utils/keytable/keytable.c
+++ b/utils/keytable/keytable.c
@@ -1752,7 +1752,7 @@ static bool attach_bpf(const char *lirc_name, const char *bpf_prog, struct proto
 	struct rlimit rl;
 	int fd, ret;
 
-	fd = open(lirc_name, O_RDONLY);
+	fd = open(lirc_name, O_RDWR);
 	if (fd == -1) {
 		perror(lirc_name);
 		return false;
@@ -1843,7 +1843,7 @@ static void clear_bpf(const char *lirc_name)
 	unsigned int features, i;
 	int ret, prog_fd, fd;
 
-	fd = open(lirc_name, O_RDONLY);
+	fd = open(lirc_name, O_RDWR);
 	if (fd == -1) {
 		perror(lirc_name);
 		return;
-- 
2.39.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux