libsysutils: Hide NetlinkListener error in recovery
* 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: I0d65796961c3036289ed13c0b8949a27b5b97ad6
diff --git a/libsysutils/src/NetlinkListener.cpp b/libsysutils/src/NetlinkListener.cpp
index aad0394..3dc2e43 100644
--- a/libsysutils/src/NetlinkListener.cpp
+++ b/libsysutils/src/NetlinkListener.cpp
@@ -57,7 +57,11 @@
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;
}