Merge "keychords.cpp: O_RDWR -> O_RDONLY"

This commit is contained in:
Treehugger Robot 2018-08-27 20:37:22 +00:00 committed by Gerrit Code Review
commit 31e5fc5cf7
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ bool Keychords::GeteventEnable(int fd) {
void Keychords::GeteventOpenDevice(const std::string& device) {
if (registration_.count(device)) return;
auto fd = TEMP_FAILURE_RETRY(::open(device.c_str(), O_RDWR | O_CLOEXEC));
auto fd = TEMP_FAILURE_RETRY(::open(device.c_str(), O_RDONLY | O_CLOEXEC));
if (fd == -1) {
PLOG(ERROR) << "Can not open " << device;
return;