From 57de8b8f27f887ca8084671df777a4ac199ba647 Mon Sep 17 00:00:00 2001 From: Nick Kralevich Date: Wed, 11 May 2011 14:58:24 -0700 Subject: rename uevent_checked_recv to uevent_kernel_multicast_recv Change-Id: I1839627490080efcbb7269699709064856312f8b --- include/cutils/uevent.h | 2 +- init/devices.c | 2 +- libcutils/uevent.c | 2 +- libsysutils/src/NetlinkListener.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/cutils/uevent.h b/include/cutils/uevent.h index 587149c7..5f5e6ca6 100644 --- a/include/cutils/uevent.h +++ b/include/cutils/uevent.h @@ -23,7 +23,7 @@ extern "C" { #endif -ssize_t uevent_checked_recv(int socket, void *buffer, size_t length); +ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length); #ifdef __cplusplus } diff --git a/init/devices.c b/init/devices.c index a200c95e..60659ced 100644 --- a/init/devices.c +++ b/init/devices.c @@ -774,7 +774,7 @@ void handle_device_fd() { char msg[UEVENT_MSG_LEN+2]; int n; - while ((n = uevent_checked_recv(device_fd, msg, UEVENT_MSG_LEN)) > 0) { + while ((n = uevent_kernel_multicast_recv(device_fd, msg, UEVENT_MSG_LEN)) > 0) { if(n >= UEVENT_MSG_LEN) /* overflow -- discard */ continue; diff --git a/libcutils/uevent.c b/libcutils/uevent.c index 3533c00f..320f8d1a 100644 --- a/libcutils/uevent.c +++ b/libcutils/uevent.c @@ -24,7 +24,7 @@ /** * Like recv(), but checks that messages actually originate from the kernel. */ -ssize_t uevent_checked_recv(int socket, void *buffer, size_t length) { +ssize_t uevent_kernel_multicast_recv(int socket, void *buffer, size_t length) { struct iovec iov = { buffer, length }; struct sockaddr_nl addr; char control[CMSG_SPACE(sizeof(struct ucred))]; diff --git a/libsysutils/src/NetlinkListener.cpp b/libsysutils/src/NetlinkListener.cpp index b24a45ec..adea077e 100644 --- a/libsysutils/src/NetlinkListener.cpp +++ b/libsysutils/src/NetlinkListener.cpp @@ -36,7 +36,7 @@ bool NetlinkListener::onDataAvailable(SocketClient *cli) int socket = cli->getSocket(); ssize_t count; - count = TEMP_FAILURE_RETRY(uevent_checked_recv(socket, mBuffer, sizeof(mBuffer))); + count = TEMP_FAILURE_RETRY(uevent_kernel_multicast_recv(socket, mBuffer, sizeof(mBuffer))); if (count < 0) { SLOGE("recvmsg failed (%s)", strerror(errno)); return false; -- cgit v1.2.3