aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2011-05-11 14:58:24 -0700
committerNick Kralevich <nnk@google.com>2011-05-11 14:58:24 -0700
commit57de8b8f27f887ca8084671df777a4ac199ba647 (patch)
treed9930fdd0e8eee5ce0060f9949bb67645a7e3841
parent9b7ee137e097c97c1c324f994eb2f03f900121b8 (diff)
downloadsystem_core-57de8b8f27f887ca8084671df777a4ac199ba647.tar.gz
system_core-57de8b8f27f887ca8084671df777a4ac199ba647.tar.bz2
system_core-57de8b8f27f887ca8084671df777a4ac199ba647.zip
rename uevent_checked_recv to uevent_kernel_multicast_recv
Change-Id: I1839627490080efcbb7269699709064856312f8b
-rw-r--r--include/cutils/uevent.h2
-rw-r--r--init/devices.c2
-rw-r--r--libcutils/uevent.c2
-rw-r--r--libsysutils/src/NetlinkListener.cpp2
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;