Message ID | 20230414110331.723694-1-sean@mess.org |
---|---|
State | New |
Headers | show |
Series | [v4l-utils] keytable: open lirc for read/write for attaching/detaching bpf programs | expand |
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;
Signed-off-by: Sean Young <sean@mess.org> --- utils/keytable/keytable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)