diff options
author | Mark Salyzyn <salyzyn@google.com> | 2018-05-14 16:08:14 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-05-14 16:08:14 +0000 |
commit | c8dd6b74e66ee02132e9d2094675974f5285666a (patch) | |
tree | 30aa98add9988c8f7a7048c6514dba3facc6669f | |
parent | 3607fe672a1aa0fa775df01b60d18d287e7f8686 (diff) | |
parent | f187715954c15d90b65b251459244c2442c04a7b (diff) | |
download | system_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.cpp | 2 |
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; |