summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2018-05-14 16:08:14 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-05-14 16:08:14 +0000
commitc8dd6b74e66ee02132e9d2094675974f5285666a (patch)
tree30aa98add9988c8f7a7048c6514dba3facc6669f
parent3607fe672a1aa0fa775df01b60d18d287e7f8686 (diff)
parentf187715954c15d90b65b251459244c2442c04a7b (diff)
downloadsystem_core-c8dd6b74e66ee02132e9d2094675974f5285666a.tar.gz
system_core-c8dd6b74e66ee02132e9d2094675974f5285666a.tar.bz2
system_core-c8dd6b74e66ee02132e9d2094675974f5285666a.zip
Merge "init: keychord inotify add IN_ONLYDIR"
-rw-r--r--init/keychords.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/keychords.cpp b/init/keychords.cpp
index 10c56e311..293736d30 100644
--- a/init/keychords.cpp
+++ b/init/keychords.cpp
@@ -276,7 +276,7 @@ void GeteventOpenDevice() {
inotify_fd = ::inotify_init1(IN_NONBLOCK | IN_CLOEXEC);
if (inotify_fd < 0) {
PLOG(WARNING) << "Could not instantiate inotify for " << kDevicePath;
- } else if (::inotify_add_watch(inotify_fd, kDevicePath, IN_DELETE | IN_CREATE) < 0) {
+ } else if (::inotify_add_watch(inotify_fd, kDevicePath, IN_DELETE | IN_CREATE | IN_ONLYDIR) < 0) {
PLOG(WARNING) << "Could not add watch for " << kDevicePath;
::close(inotify_fd);
inotify_fd = -1;