diff options
author | 2024-12-21 00:03:49 +0000 | |
---|---|---|
committer | 2024-12-21 00:05:29 +0000 | |
commit | de71c6f7956269f27b5aa5aaf453902cadc69ad5 (patch) | |
tree | 94b10b4cca16e4cee281d12679906b0d12200ee8 | |
parent | b2361af7335ebc09e3dc18e160f3fc16881848bc (diff) |
InputTransport: print FD in fatal error
This error can be used to kill input flinger, and
the calling code should be changed as well.
Bug: 301519740
Test: w/ fuzzer, determined FD in bad state was '-1'
Change-Id: I331d900eed0a73fd483ae25fd6a2f6d36f57c48a
-rw-r--r-- | libs/input/InputTransport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/input/InputTransport.cpp b/libs/input/InputTransport.cpp index 6a55726db1..56ccaab9ad 100644 --- a/libs/input/InputTransport.cpp +++ b/libs/input/InputTransport.cpp @@ -327,8 +327,8 @@ std::unique_ptr<InputChannel> InputChannel::create(const std::string& name, android::base::unique_fd fd, sp<IBinder> token) { const int result = fcntl(fd, F_SETFL, O_NONBLOCK); if (result != 0) { - LOG_ALWAYS_FATAL("channel '%s' ~ Could not make socket non-blocking: %s", name.c_str(), - strerror(errno)); + LOG_ALWAYS_FATAL("channel '%s' ~ Could not make socket (%d) non-blocking: %s", name.c_str(), + fd.get(), strerror(errno)); return nullptr; } // using 'new' to access a non-public constructor |