Skip to content

Commit de71c6f

Browse files
author
Steven Moreland
committed
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
1 parent b2361af commit de71c6f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libs/input/InputTransport.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ std::unique_ptr<InputChannel> InputChannel::create(const std::string& name,
327327
android::base::unique_fd fd, sp<IBinder> token) {
328328
const int result = fcntl(fd, F_SETFL, O_NONBLOCK);
329329
if (result != 0) {
330-
LOG_ALWAYS_FATAL("channel '%s' ~ Could not make socket non-blocking: %s", name.c_str(),
331-
strerror(errno));
330+
LOG_ALWAYS_FATAL("channel '%s' ~ Could not make socket (%d) non-blocking: %s", name.c_str(),
331+
fd.get(), strerror(errno));
332332
return nullptr;
333333
}
334334
// using 'new' to access a non-public constructor

0 commit comments

Comments
 (0)