Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d08d9dea authored by Devin Moore's avatar Devin Moore
Browse files

Add some error logs for FdTrigger errors

Test: m && launch_cvd && check logs to make sure no errors
Bug: none
Change-Id: I5355179c9c3480071b5cc419dd195b7af6509b70
parent 9f408681
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -82,7 +82,9 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd,

    int ret = TEMP_FAILURE_RETRY(poll(pfd, countof(pfd), -1));
    if (ret < 0) {
        return -errno;
        int saved_errno = errno;
        ALOGE("FdTrigger poll returned error: %d, with error: %s", ret, strerror(saved_errno));
        return -saved_errno;
    }
    LOG_ALWAYS_FATAL_IF(ret == 0, "poll(%d) returns 0 with infinite timeout", transportFd.fd.get());

@@ -106,6 +108,7 @@ status_t FdTrigger::triggerablePoll(const android::RpcTransportFd& transportFd,

    // POLLNVAL: invalid FD number, e.g. not opened.
    if (pfd[0].revents & POLLNVAL) {
        ALOGE("Invalid FD number (%d) in FdTrigger (POLLNVAL)", pfd[0].fd);
        return BAD_VALUE;
    }