summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreehugger Robot2017-01-20 19:05:01 -0600
committerGerrit Code Review2017-01-20 19:05:02 -0600
commit41ee55a8754f12389394c0266c05d09123707f77 (patch)
tree18cd799115341818f94e7d4857c89bbbe36ce4a3
parentb479a5002e99e7454ed07d7b4631704d4c611193 (diff)
parentfb9a7e5995d2e6c2c7f08080201d41fe0f6c4b53 (diff)
downloadplatform-system-core-41ee55a8754f12389394c0266c05d09123707f77.tar.gz
platform-system-core-41ee55a8754f12389394c0266c05d09123707f77.tar.xz
platform-system-core-41ee55a8754f12389394c0266c05d09123707f77.zip
Merge "adb: check for and report inotify_init1 failure."
-rw-r--r--adb/adb_auth_host.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/adb/adb_auth_host.cpp b/adb/adb_auth_host.cpp
index ec9b1c364..c3f1fe07d 100644
--- a/adb/adb_auth_host.cpp
+++ b/adb/adb_auth_host.cpp
@@ -388,7 +388,13 @@ static void adb_auth_inotify_update(int fd, unsigned fd_event, void*) {
388 388
389static void adb_auth_inotify_init(const std::set<std::string>& paths) { 389static void adb_auth_inotify_init(const std::set<std::string>& paths) {
390 LOG(INFO) << "adb_auth_inotify_init..."; 390 LOG(INFO) << "adb_auth_inotify_init...";
391
391 int infd = inotify_init1(IN_CLOEXEC | IN_NONBLOCK); 392 int infd = inotify_init1(IN_CLOEXEC | IN_NONBLOCK);
393 if (infd < 0) {
394 PLOG(ERROR) << "failed to create inotify fd";
395 return;
396 }
397
392 for (const std::string& path : paths) { 398 for (const std::string& path : paths) {
393 int wd = inotify_add_watch(infd, path.c_str(), IN_CREATE | IN_MOVED_TO); 399 int wd = inotify_add_watch(infd, path.c_str(), IN_CREATE | IN_MOVED_TO);
394 if (wd < 0) { 400 if (wd < 0) {