summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/sonynwz
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
parent1a76bc403e647ac40f2218dd3808ce8b3f9a80d9 (diff)
downloadrockbox-c6d2a0358f221be41450503b45a4f14db14bf690.tar.gz
rockbox-c6d2a0358f221be41450503b45a4f14db14bf690.tar.bz2
rockbox-c6d2a0358f221be41450503b45a4f14db14bf690.zip
hosted: open input device as read-only.
Change-Id: I4dcd98f45f41fe06a0a75a2a0dd45c753c2cf365
Diffstat (limited to 'firmware/target/hosted/sonynwz')
-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)
static void open_input_device(const char *path)
{
- int fd = open(path, O_RDWR);
+ int fd = open(path, O_RDONLY | O_CLOEXEC);
if(fd < 0)
return;
/* query name */