Skip to content

Commit

Permalink
libsysutils: Hide NetlinkListener error in recovery
Browse files Browse the repository at this point in the history
* Prevents users from seeing this message in recovery:
  `E:recvmsg failed (No buffer space available)`

* This is caused by volume_manager (our addition in recovery) and
  hiding this error does not seem to have any negative side effect.

Change-Id: I860ecd71a4462462607e1138e4134cac82943ecd
  • Loading branch information
mikeNG authored and Maitreya25 committed Dec 15, 2023
1 parent acd5571 commit 201a01a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libsysutils/src/NetlinkListener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ bool NetlinkListener::onDataAvailable(SocketClient *cli)
count = TEMP_FAILURE_RETRY(uevent_kernel_recv(socket,
mBuffer, sizeof(mBuffer), require_group, &uid));
if (count < 0) {
#ifdef __ANDROID_RECOVERY__
SLOGW("recvmsg failed (%s)", strerror(errno));
#else
SLOGE("recvmsg failed (%s)", strerror(errno));
#endif
return false;
}

Expand Down

0 comments on commit 201a01a

Please sign in to comment.