summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/sonynwz/button-nwz.c
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-16 14:11:51 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-16 14:37:01 -0400
commitc6d2a0358f221be41450503b45a4f14db14bf690 (patch)
tree80af5b360d9b54238a1247d93215d2a4f2c5a556 /firmware/target/hosted/sonynwz/button-nwz.c
parent1a76bc403e647ac40f2218dd3808ce8b3f9a80d9 (diff)
downloadrockbox-c6d2a0358f221be41450503b45a4f14db14bf690.tar.gz
rockbox-c6d2a0358f221be41450503b45a4f14db14bf690.zip
hosted: open input device as read-only.
Change-Id: I4dcd98f45f41fe06a0a75a2a0dd45c753c2cf365
Diffstat (limited to 'firmware/target/hosted/sonynwz/button-nwz.c')
-rw-r--r--firmware/target/hosted/sonynwz/button-nwz.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/hosted/sonynwz/button-nwz.c b/firmware/target/hosted/sonynwz/button-nwz.c
index 2fb23e1471..f85a4be496 100644
--- a/firmware/target/hosted/sonynwz/button-nwz.c
+++ b/firmware/target/hosted/sonynwz/button-nwz.c
@@ -156,7 +156,7 @@ static void key_init_state(int fd)
156 156
157static void open_input_device(const char *path) 157static void open_input_device(const char *path)
158{ 158{
159 int fd = open(path, O_RDWR); 159 int fd = open(path, O_RDONLY | O_CLOEXEC);
160 if(fd < 0) 160 if(fd < 0)
161 return; 161 return;
162 /* query name */ 162 /* query name */