Merge changes I3c284860,I06dc35ff,Iedda6c90,I933e5bba,I9205d7d7,Iae9ed109
* changes:
init: use init's property expansion code for setprop/write
init: delay importing files until after parsing the current file
init: export all androidboot cmd line values as ro.boot.xx props
init: import the hardware specific init file in init.rc
init: allow init file imports to use properties in names
init: initialize property area early at boot
diff --git a/include/cutils/log.h b/include/cutils/log.h
index 0e63809..fe0eb02 100644
--- a/include/cutils/log.h
+++ b/include/cutils/log.h
@@ -97,12 +97,12 @@
/*
* Simplified macro to send a debug log message using the current LOG_TAG.
*/
-#ifndef LOGD
-#define LOGD(...) ((void)ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
+#ifndef ALOGD
+#define ALOGD(...) ((void)ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
#endif
-#ifndef LOGD_IF
-#define LOGD_IF(cond, ...) \
+#ifndef ALOGD_IF
+#define ALOGD_IF(cond, ...) \
( (CONDITION(cond)) \
? ((void)ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
@@ -111,12 +111,12 @@
/*
* Simplified macro to send an info log message using the current LOG_TAG.
*/
-#ifndef LOGI
-#define LOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
+#ifndef ALOGI
+#define ALOGI(...) ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
#endif
-#ifndef LOGI_IF
-#define LOGI_IF(cond, ...) \
+#ifndef ALOGI_IF
+#define ALOGI_IF(cond, ...) \
( (CONDITION(cond)) \
? ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
@@ -125,12 +125,12 @@
/*
* Simplified macro to send a warning log message using the current LOG_TAG.
*/
-#ifndef LOGW
-#define LOGW(...) ((void)ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__))
+#ifndef ALOGW
+#define ALOGW(...) ((void)ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__))
#endif
-#ifndef LOGW_IF
-#define LOGW_IF(cond, ...) \
+#ifndef ALOGW_IF
+#define ALOGW_IF(cond, ...) \
( (CONDITION(cond)) \
? ((void)ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
@@ -168,24 +168,24 @@
* Conditional based on whether the current LOG_TAG is enabled at
* debug priority.
*/
-#ifndef IF_LOGD
-#define IF_LOGD() IF_ALOG(LOG_DEBUG, LOG_TAG)
+#ifndef IF_ALOGD
+#define IF_ALOGD() IF_ALOG(LOG_DEBUG, LOG_TAG)
#endif
/*
* Conditional based on whether the current LOG_TAG is enabled at
* info priority.
*/
-#ifndef IF_LOGI
-#define IF_LOGI() IF_ALOG(LOG_INFO, LOG_TAG)
+#ifndef IF_ALOGI
+#define IF_ALOGI() IF_ALOG(LOG_INFO, LOG_TAG)
#endif
/*
* Conditional based on whether the current LOG_TAG is enabled at
* warn priority.
*/
-#ifndef IF_LOGW
-#define IF_LOGW() IF_ALOG(LOG_WARN, LOG_TAG)
+#ifndef IF_ALOGW
+#define IF_ALOGW() IF_ALOG(LOG_WARN, LOG_TAG)
#endif
/*
diff --git a/libcutils/buffer.c b/libcutils/buffer.c
index f34b8f8..af99bd7 100644
--- a/libcutils/buffer.c
+++ b/libcutils/buffer.c
@@ -104,9 +104,9 @@
if (bytesWritten >= 0) {
buffer->remaining -= bytesWritten;
- LOGD("Buffer bytes written: %d", (int) bytesWritten);
- LOGD("Buffer size: %d", (int) buffer->size);
- LOGD("Buffer remaining: %d", (int) buffer->remaining);
+ ALOGD("Buffer bytes written: %d", (int) bytesWritten);
+ ALOGD("Buffer size: %d", (int) buffer->size);
+ ALOGD("Buffer remaining: %d", (int) buffer->remaining);
return buffer->remaining;
}
diff --git a/libcutils/loghack.h b/libcutils/loghack.h
index 52dfc8c..330e1ee 100644
--- a/libcutils/loghack.h
+++ b/libcutils/loghack.h
@@ -28,9 +28,9 @@
#define ALOG(level, ...) \
((void)printf("cutils:" level "/" LOG_TAG ": " __VA_ARGS__))
#define ALOGV(...) ALOG("V", __VA_ARGS__)
-#define LOGD(...) ALOG("D", __VA_ARGS__)
-#define LOGI(...) ALOG("I", __VA_ARGS__)
-#define LOGW(...) ALOG("W", __VA_ARGS__)
+#define ALOGD(...) ALOG("D", __VA_ARGS__)
+#define ALOGI(...) ALOG("I", __VA_ARGS__)
+#define ALOGW(...) ALOG("W", __VA_ARGS__)
#define LOGE(...) ALOG("E", __VA_ARGS__)
#define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0)
#endif
diff --git a/libcutils/mq.c b/libcutils/mq.c
index 3b65f1f..6f6740e 100644
--- a/libcutils/mq.c
+++ b/libcutils/mq.c
@@ -222,7 +222,7 @@
static void closeWithWarning(int fd) {
int result = close(fd);
if (result == -1) {
- LOGW("close() error: %s", strerror(errno));
+ ALOGW("close() error: %s", strerror(errno));
}
}
@@ -263,7 +263,7 @@
/** Frees a simple, i.e. header-only, outgoing packet. */
static void outgoingPacketFree(OutgoingPacket* packet) {
- LOGD("Freeing outgoing packet.");
+ ALOGD("Freeing outgoing packet.");
free(packet);
}
@@ -374,10 +374,10 @@
*/
static void peerProxyKill(PeerProxy* peerProxy, bool errnoIsSet) {
if (errnoIsSet) {
- LOGI("Peer %d died. errno: %s", peerProxy->credentials.pid,
+ ALOGI("Peer %d died. errno: %s", peerProxy->credentials.pid,
strerror(errno));
} else {
- LOGI("Peer %d died.", peerProxy->credentials.pid);
+ ALOGI("Peer %d died.", peerProxy->credentials.pid);
}
// If we lost the master, we're up a creek. We can't let this happen.
@@ -433,12 +433,12 @@
static void peerProxyHandleError(PeerProxy* peerProxy, char* functionName) {
if (errno == EINTR) {
// Log interruptions but otherwise ignore them.
- LOGW("%s() interrupted.", functionName);
+ ALOGW("%s() interrupted.", functionName);
} else if (errno == EAGAIN) {
- LOGD("EWOULDBLOCK");
+ ALOGD("EWOULDBLOCK");
// Ignore.
} else {
- LOGW("Error returned by %s().", functionName);
+ ALOGW("Error returned by %s().", functionName);
peerProxyKill(peerProxy, true);
}
}
@@ -461,7 +461,7 @@
static void peerProxyWriteBytes(PeerProxy* peerProxy) {
Buffer* buffer = peerProxy->currentPacket->bytes;
if (peerProxyWriteFromBuffer(peerProxy, buffer)) {
- LOGD("Bytes written.");
+ ALOGD("Bytes written.");
peerProxyNextPacket(peerProxy);
}
}
@@ -527,10 +527,10 @@
Buffer* outgoingHeader = &peerProxy->outgoingHeader;
bool headerWritten = bufferWriteComplete(outgoingHeader);
if (!headerWritten) {
- LOGD("Writing header...");
+ ALOGD("Writing header...");
headerWritten = peerProxyWriteFromBuffer(peerProxy, outgoingHeader);
if (headerWritten) {
- LOGD("Header written.");
+ ALOGD("Header written.");
}
}
@@ -559,7 +559,7 @@
* Sets up a peer proxy's fd before we try to select() it.
*/
static void peerProxyBeforeSelect(SelectableFd* fd) {
- LOGD("Before select...");
+ ALOGD("Before select...");
PeerProxy* peerProxy = (PeerProxy*) fd->data;
@@ -568,7 +568,7 @@
peerUnlock(peerProxy->peer);
if (hasPackets) {
- LOGD("Packets found. Setting onWritable().");
+ ALOGD("Packets found. Setting onWritable().");
fd->onWritable = &peerProxyWrite;
} else {
@@ -579,11 +579,11 @@
/** Prepare to read bytes from the peer. */
static void peerProxyExpectBytes(PeerProxy* peerProxy, Header* header) {
- LOGD("Expecting %d bytes.", header->size);
-
- peerProxy->inputState = READING_BYTES;
+ ALOGD("Expecting %d bytes.", header->size);
+
+ peerProxy->inputState = READING_BYTES;
if (bufferPrepareForRead(peerProxy->inputBuffer, header->size) == -1) {
- LOGW("Couldn't allocate memory for incoming data. Size: %u",
+ ALOGW("Couldn't allocate memory for incoming data. Size: %u",
(unsigned int) header->size);
// TODO: Ignore the packet and log a warning?
@@ -670,7 +670,7 @@
// TODO: Restructure things so we don't need this check.
// Verify that this really is the master.
if (!masterProxy->master) {
- LOGW("Non-master process %d tried to send us a connection.",
+ ALOGW("Non-master process %d tried to send us a connection.",
masterProxy->credentials.pid);
// Kill off the evil peer.
peerProxyKill(masterProxy, false);
@@ -686,7 +686,7 @@
peerLock(localPeer);
PeerProxy* peerProxy = peerProxyGetOrCreate(localPeer, pid, false);
if (peerProxy == NULL) {
- LOGW("Peer proxy creation failed: %s", strerror(errno));
+ ALOGW("Peer proxy creation failed: %s", strerror(errno));
} else {
// Fill in full credentials.
peerProxy->credentials = header->credentials;
@@ -746,7 +746,7 @@
if (size < 0) {
if (errno == EINTR) {
// Log interruptions but otherwise ignore them.
- LOGW("recvmsg() interrupted.");
+ ALOGW("recvmsg() interrupted.");
return;
} else if (errno == EAGAIN) {
// Keep waiting for the connection.
@@ -777,14 +777,14 @@
// The peer proxy this connection is for.
PeerProxy* peerProxy = masterProxy->connecting;
if (peerProxy == NULL) {
- LOGW("Received connection for unknown peer.");
+ ALOGW("Received connection for unknown peer.");
closeWithWarning(incomingFd);
} else {
Peer* peer = masterProxy->peer;
SelectableFd* selectableFd = selectorAdd(peer->selector, incomingFd);
if (selectableFd == NULL) {
- LOGW("Error adding fd to selector for %d.",
+ ALOGW("Error adding fd to selector for %d.",
peerProxy->credentials.pid);
closeWithWarning(incomingFd);
peerProxyKill(peerProxy, false);
@@ -811,7 +811,7 @@
int sockets[2];
int result = socketpair(AF_LOCAL, SOCK_STREAM, 0, sockets);
if (result == -1) {
- LOGW("socketpair() error: %s", strerror(errno));
+ ALOGW("socketpair() error: %s", strerror(errno));
// TODO: Send CONNECTION_FAILED packets to peers.
return;
}
@@ -821,7 +821,7 @@
if (packetA == NULL || packetB == NULL) {
free(packetA);
free(packetB);
- LOGW("malloc() error. Failed to tell process %d that process %d is"
+ ALOGW("malloc() error. Failed to tell process %d that process %d is"
" dead.", peerA->credentials.pid, peerB->credentials.pid);
return;
}
@@ -852,7 +852,7 @@
Credentials credentials) {
OutgoingPacket* packet = calloc(1, sizeof(OutgoingPacket));
if (packet == NULL) {
- LOGW("malloc() error. Failed to tell process %d that process %d is"
+ ALOGW("malloc() error. Failed to tell process %d that process %d is"
" dead.", peerProxy->credentials.pid, credentials.pid);
return;
}
@@ -902,10 +902,10 @@
peerUnlock(peer);
if (peerProxy != NULL) {
- LOGI("Couldn't connect to %d.", pid);
+ ALOGI("Couldn't connect to %d.", pid);
peerProxyKill(peerProxy, false);
} else {
- LOGW("Peer proxy for %d not found. This shouldn't happen.", pid);
+ ALOGW("Peer proxy for %d not found. This shouldn't happen.", pid);
}
peerProxyExpectHeader(masterProxy);
@@ -929,7 +929,7 @@
peerProxyExpectBytes(peerProxy, header);
break;
default:
- LOGW("Invalid packet type from %d: %d", peerProxy->credentials.pid,
+ ALOGW("Invalid packet type from %d: %d", peerProxy->credentials.pid,
header->type);
peerProxyKill(peerProxy, false);
}
@@ -947,7 +947,7 @@
return false;
} else if (size == 0) {
// EOF.
- LOGI("EOF");
+ ALOGI("EOF");
peerProxyKill(peerProxy, false);
return false;
} else if (bufferReadComplete(in)) {
@@ -963,23 +963,23 @@
* Reads input from a peer process.
*/
static void peerProxyRead(SelectableFd* fd) {
- LOGD("Reading...");
+ ALOGD("Reading...");
PeerProxy* peerProxy = (PeerProxy*) fd->data;
int state = peerProxy->inputState;
Buffer* in = peerProxy->inputBuffer;
switch (state) {
case READING_HEADER:
if (peerProxyBufferInput(peerProxy)) {
- LOGD("Header read.");
+ ALOGD("Header read.");
// We've read the complete header.
Header* header = (Header*) in->data;
peerProxyHandleHeader(peerProxy, header);
}
break;
case READING_BYTES:
- LOGD("Reading bytes...");
+ ALOGD("Reading bytes...");
if (peerProxyBufferInput(peerProxy)) {
- LOGD("Bytes read.");
+ ALOGD("Bytes read.");
// We have the complete packet. Notify bytes listener.
peerProxy->peer->onBytes(peerProxy->credentials,
in->data, in->size);
@@ -1026,11 +1026,11 @@
// Accept connection.
int socket = accept(listenerFd->fd, NULL, NULL);
if (socket == -1) {
- LOGW("accept() error: %s", strerror(errno));
+ ALOGW("accept() error: %s", strerror(errno));
return;
}
- LOGD("Accepted connection as fd %d.", socket);
+ ALOGD("Accepted connection as fd %d.", socket);
// Get credentials.
Credentials credentials;
@@ -1040,7 +1040,7 @@
&ucredentials, &credentialsSize);
// We might want to verify credentialsSize.
if (result == -1) {
- LOGW("getsockopt() error: %s", strerror(errno));
+ ALOGW("getsockopt() error: %s", strerror(errno));
closeWithWarning(socket);
return;
}
@@ -1050,7 +1050,7 @@
credentials.uid = ucredentials.uid;
credentials.gid = ucredentials.gid;
- LOGI("Accepted connection from process %d.", credentials.pid);
+ ALOGI("Accepted connection from process %d.", credentials.pid);
Peer* masterPeer = (Peer*) listenerFd->data;
@@ -1061,7 +1061,7 @@
= hashmapGet(masterPeer->peerProxies, &credentials.pid);
if (peerProxy != NULL) {
peerUnlock(masterPeer);
- LOGW("Alread connected to process %d.", credentials.pid);
+ ALOGW("Alread connected to process %d.", credentials.pid);
closeWithWarning(socket);
return;
}
@@ -1070,7 +1070,7 @@
SelectableFd* socketFd = selectorAdd(masterPeer->selector, socket);
if (socketFd == NULL) {
peerUnlock(masterPeer);
- LOGW("malloc() failed.");
+ ALOGW("malloc() failed.");
closeWithWarning(socket);
return;
}
@@ -1079,7 +1079,7 @@
peerProxy = peerProxyCreate(masterPeer, credentials);
peerUnlock(masterPeer);
if (peerProxy == NULL) {
- LOGW("malloc() failed.");
+ ALOGW("malloc() failed.");
socketFd->remove = true;
closeWithWarning(socket);
}
@@ -1118,7 +1118,7 @@
/** Frees a packet of bytes. */
static void outgoingPacketFreeBytes(OutgoingPacket* packet) {
- LOGD("Freeing outgoing packet.");
+ ALOGD("Freeing outgoing packet.");
bufferFree(packet->bytes);
free(packet);
}
@@ -1270,7 +1270,7 @@
LOG_ALWAYS_FATAL("bind() error: %s", strerror(errno));
}
- LOGD("Listener socket: %d", listenerSocket);
+ ALOGD("Listener socket: %d", listenerSocket);
// Queue up to 16 connections.
result = listen(listenerSocket, 16);
diff --git a/libcutils/properties.c b/libcutils/properties.c
index 98dbf50..e29d261 100644
--- a/libcutils/properties.c
+++ b/libcutils/properties.c
@@ -99,7 +99,7 @@
sock = socket(AF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
- LOGW("UNIX domain socket create failed (errno=%d)\n", errno);
+ ALOGW("UNIX domain socket create failed (errno=%d)\n", errno);
return -1;
}
@@ -110,7 +110,7 @@
if (cc < 0) {
// ENOENT means socket file doesn't exist
// ECONNREFUSED means socket exists but nobody is listening
- //LOGW("AF_UNIX connect failed for '%s': %s\n",
+ //ALOGW("AF_UNIX connect failed for '%s': %s\n",
// fileName, strerror(errno));
close(sock);
return -1;
@@ -128,7 +128,7 @@
gPropFd = connectToServer(SYSTEM_PROPERTY_PIPE_NAME);
if (gPropFd < 0) {
- //LOGW("not connected to system property server\n");
+ //ALOGW("not connected to system property server\n");
} else {
//ALOGV("Connected to system property server\n");
}
diff --git a/libcutils/qtaguid.c b/libcutils/qtaguid.c
index fee67fd..1c57774 100644
--- a/libcutils/qtaguid.c
+++ b/libcutils/qtaguid.c
@@ -74,7 +74,7 @@
savedErrno = 0;
}
if (res < 0) {
- LOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno);
+ ALOGI("Failed write_ctrl(%s) res=%d errno=%d", cmd, res, savedErrno);
}
close(fd);
return -savedErrno;
@@ -111,7 +111,7 @@
res = write_ctrl(lineBuf);
if (res < 0) {
- LOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d",
+ ALOGI("Tagging socket %d with tag %llx(%d) for uid %d failed errno=%d",
sockfd, kTag, tag, uid, res);
}
@@ -127,7 +127,7 @@
snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd);
res = write_ctrl(lineBuf);
if (res < 0) {
- LOGI("Untagging socket %d failed errno=%d", sockfd, res);
+ ALOGI("Untagging socket %d failed errno=%d", sockfd, res);
}
return res;
@@ -156,7 +156,7 @@
snprintf(lineBuf, sizeof(lineBuf), "d %llu %d", kTag, uid);
res = write_ctrl(lineBuf);
if (res < 0) {
- LOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d",
+ ALOGI("Deleteing tag data with tag %llx/%d for uid %d failed with cnt=%d errno=%d",
kTag, tag, uid, cnt, errno);
}
diff --git a/libcutils/selector.c b/libcutils/selector.c
index 9436393..3776bbb 100644
--- a/libcutils/selector.c
+++ b/libcutils/selector.c
@@ -48,7 +48,7 @@
static char garbage[64];
if (read(wakeupFd->fd, garbage, sizeof(garbage)) < 0) {
if (errno == EINTR) {
- LOGI("read() interrupted.");
+ ALOGI("read() interrupted.");
} else {
LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno));
}
@@ -77,7 +77,7 @@
static char garbage[1];
if (write(selector->wakeupPipe[1], garbage, sizeof(garbage)) < 0) {
if (errno == EINTR) {
- LOGI("read() interrupted.");
+ ALOGI("read() interrupted.");
} else {
LOG_ALWAYS_FATAL("This should never happen: %s", strerror(errno));
}
@@ -96,7 +96,7 @@
LOG_ALWAYS_FATAL("pipe() error: %s", strerror(errno));
}
- LOGD("Wakeup fd: %d", selector->wakeupPipe[0]);
+ ALOGD("Wakeup fd: %d", selector->wakeupPipe[0]);
SelectableFd* wakeupFd = selectorAdd(selector, selector->wakeupPipe[0]);
if (wakeupFd == NULL) {
@@ -169,11 +169,11 @@
bool inSet = false;
if (maybeAdd(selectableFd, selectableFd->onExcept, exceptFds)) {
- LOGD("Selecting fd %d for writing...", selectableFd->fd);
+ ALOGD("Selecting fd %d for writing...", selectableFd->fd);
inSet = true;
}
if (maybeAdd(selectableFd, selectableFd->onReadable, readFds)) {
- LOGD("Selecting fd %d for reading...", selectableFd->fd);
+ ALOGD("Selecting fd %d for reading...", selectableFd->fd);
inSet = true;
}
if (maybeAdd(selectableFd, selectableFd->onWritable, writeFds)) {
@@ -200,9 +200,9 @@
*/
static inline void maybeInvoke(SelectableFd* selectableFd,
void (*callback)(SelectableFd*), fd_set* fdSet) {
- if (callback != NULL && !selectableFd->remove &&
+ if (callback != NULL && !selectableFd->remove &&
FD_ISSET(selectableFd->fd, fdSet)) {
- LOGD("Selected fd %d.", selectableFd->fd);
+ ALOGD("Selected fd %d.", selectableFd->fd);
callback(selectableFd);
}
}
@@ -238,20 +238,20 @@
prepareForSelect(selector);
- LOGD("Entering select().");
+ ALOGD("Entering select().");
// Select file descriptors.
int result = select(selector->maxFd + 1, &selector->readFds,
&selector->writeFds, &selector->exceptFds, NULL);
- LOGD("Exiting select().");
+ ALOGD("Exiting select().");
setInSelect(selector, false);
if (result == -1) {
// Abort on everything except EINTR.
if (errno == EINTR) {
- LOGI("select() interrupted.");
+ ALOGI("select() interrupted.");
} else {
LOG_ALWAYS_FATAL("select() error: %s",
strerror(errno));
diff --git a/libcutils/str_parms.c b/libcutils/str_parms.c
index 7ea65ce..14fecec 100644
--- a/libcutils/str_parms.c
+++ b/libcutils/str_parms.c
@@ -281,7 +281,7 @@
static bool dump_entry(void *key, void *value, void *context)
{
- LOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value);
+ ALOGI("key: '%s' value: '%s'\n", (char *)key, (char *)value);
return true;
}
@@ -301,7 +301,7 @@
str_parms_dump(str_parms);
out_str = str_parms_to_str(str_parms);
str_parms_destroy(str_parms);
- LOGI("%s: '%s' stringified is '%s'", __func__, str, out_str);
+ ALOGI("%s: '%s' stringified is '%s'", __func__, str, out_str);
free(out_str);
}
diff --git a/libdiskconfig/config_mbr.c b/libdiskconfig/config_mbr.c
index 825ba60..07bd6a7 100644
--- a/libdiskconfig/config_mbr.c
+++ b/libdiskconfig/config_mbr.c
@@ -47,7 +47,7 @@
pentry->start_lba = start;
pentry->len_lba = len;
- LOGI("Configuring pentry. status=0x%x type=0x%x start_lba=%u len_lba=%u",
+ ALOGI("Configuring pentry. status=0x%x type=0x%x start_lba=%u len_lba=%u",
pentry->status, pentry->type, pentry->start_lba, pentry->len_lba);
}
diff --git a/libdiskconfig/diskconfig.c b/libdiskconfig/diskconfig.c
index aac3e69..66bd0c3 100644
--- a/libdiskconfig/diskconfig.c
+++ b/libdiskconfig/diskconfig.c
@@ -319,7 +319,7 @@
} else
disk_size = (uint64_t)dinfo->num_lba * (uint64_t)dinfo->sect_size;
} else if (S_ISREG(stat.st_mode)) {
- LOGI("Requesting operation on a regular file, not block device.");
+ ALOGI("Requesting operation on a regular file, not block device.");
if (!dinfo->sect_size) {
LOGE("Sector size for regular file images cannot be zero");
goto fail;
diff --git a/libdiskconfig/diskutils.c b/libdiskconfig/diskutils.c
index 22767c0..be35763 100644
--- a/libdiskconfig/diskutils.c
+++ b/libdiskconfig/diskutils.c
@@ -40,7 +40,7 @@
int done = 0;
uint64_t total = 0;
- LOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, offset);
+ ALOGI("Writing RAW image '%s' to '%s' (offset=%llu)", src, dst, offset);
if ((src_fd = open(src, O_RDONLY)) < 0) {
LOGE("Could not open %s for reading (errno=%d).", src, errno);
goto fail;
@@ -101,7 +101,7 @@
if (dst_fd >= 0)
fsync(dst_fd);
- LOGI("Wrote %llu bytes to %s @ %lld", total, dst, offset);
+ ALOGI("Wrote %llu bytes to %s @ %lld", total, dst, offset);
close(src_fd);
if (dst_fd >= 0)
diff --git a/libdiskconfig/write_lst.c b/libdiskconfig/write_lst.c
index 12b7cd7..d99a807 100644
--- a/libdiskconfig/write_lst.c
+++ b/libdiskconfig/write_lst.c
@@ -82,7 +82,7 @@
goto fail;
}
} else
- LOGI("Would write %d bytes @ offset %lld.", lst->len, lst->offset);
+ ALOGI("Would write %d bytes @ offset %lld.", lst->len, lst->offset);
}
return 0;
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c
index 4f2d1c1..b38e258 100644
--- a/libnetutils/dhcpclient.c
+++ b/libnetutils/dhcpclient.c
@@ -70,7 +70,7 @@
vsnprintf(errmsg, sizeof(errmsg), fmt, ap);
va_end(ap);
- LOGD("%s", errmsg);
+ ALOGD("%s", errmsg);
}
const char *dhcp_lasterror()
@@ -151,14 +151,14 @@
void dump_dhcp_info(dhcp_info *info)
{
char addr[20], gway[20], mask[20];
- LOGD("--- dhcp %s (%d) ---",
+ ALOGD("--- dhcp %s (%d) ---",
dhcp_type_to_name(info->type), info->type);
strcpy(addr, ipaddr(info->ipaddr));
strcpy(gway, ipaddr(info->gateway));
- LOGD("ip %s gw %s prefixLength %d", addr, gway, info->prefixLength);
- if (info->dns1) LOGD("dns1: %s", ipaddr(info->dns1));
- if (info->dns2) LOGD("dns2: %s", ipaddr(info->dns2));
- LOGD("server %s, lease %d seconds",
+ ALOGD("ip %s gw %s prefixLength %d", addr, gway, info->prefixLength);
+ if (info->dns1) ALOGD("dns1: %s", ipaddr(info->dns1));
+ if (info->dns2) ALOGD("dns2: %s", ipaddr(info->dns2));
+ ALOGD("server %s, lease %d seconds",
ipaddr(info->serveraddr), info->lease);
}
@@ -250,9 +250,9 @@
const char *name;
char buf[2048];
- LOGD("===== DHCP message:");
+ ALOGD("===== DHCP message:");
if (len < DHCP_MSG_FIXED_SIZE) {
- LOGD("Invalid length %d, should be %d", len, DHCP_MSG_FIXED_SIZE);
+ ALOGD("Invalid length %d, should be %d", len, DHCP_MSG_FIXED_SIZE);
return;
}
@@ -264,18 +264,18 @@
name = "BOOTREPLY";
else
name = "????";
- LOGD("op = %s (%d), htype = %d, hlen = %d, hops = %d",
+ ALOGD("op = %s (%d), htype = %d, hlen = %d, hops = %d",
name, msg->op, msg->htype, msg->hlen, msg->hops);
- LOGD("xid = 0x%08x secs = %d, flags = 0x%04x optlen = %d",
+ ALOGD("xid = 0x%08x secs = %d, flags = 0x%04x optlen = %d",
ntohl(msg->xid), ntohs(msg->secs), ntohs(msg->flags), len);
- LOGD("ciaddr = %s", ipaddr(msg->ciaddr));
- LOGD("yiaddr = %s", ipaddr(msg->yiaddr));
- LOGD("siaddr = %s", ipaddr(msg->siaddr));
- LOGD("giaddr = %s", ipaddr(msg->giaddr));
+ ALOGD("ciaddr = %s", ipaddr(msg->ciaddr));
+ ALOGD("yiaddr = %s", ipaddr(msg->yiaddr));
+ ALOGD("siaddr = %s", ipaddr(msg->siaddr));
+ ALOGD("giaddr = %s", ipaddr(msg->giaddr));
c = msg->hlen > 16 ? 16 : msg->hlen;
hex2str(buf, msg->chaddr, c);
- LOGD("chaddr = {%s}", buf);
+ ALOGD("chaddr = {%s}", buf);
for (n = 0; n < 64; n++) {
if ((msg->sname[n] < ' ') || (msg->sname[n] > 127)) {
@@ -293,8 +293,8 @@
}
msg->file[127] = 0;
- LOGD("sname = '%s'", msg->sname);
- LOGD("file = '%s'", msg->file);
+ ALOGD("sname = '%s'", msg->sname);
+ ALOGD("file = '%s'", msg->file);
if (len < 4) return;
len -= 4;
@@ -327,7 +327,7 @@
name = dhcp_type_to_name(x[2]);
else
name = NULL;
- LOGD("op %d len %d {%s} %s", x[0], optsz, buf, name == NULL ? "" : name);
+ ALOGD("op %d len %d {%s} %s", x[0], optsz, buf, name == NULL ? "" : name);
len -= optsz;
x = x + optsz + 2;
}
@@ -347,28 +347,28 @@
static int is_valid_reply(dhcp_msg *msg, dhcp_msg *reply, int sz)
{
if (sz < DHCP_MSG_FIXED_SIZE) {
- if (verbose) LOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE);
+ if (verbose) ALOGD("netcfg: Wrong size %d != %d\n", sz, DHCP_MSG_FIXED_SIZE);
return 0;
}
if (reply->op != OP_BOOTREPLY) {
- if (verbose) LOGD("netcfg: Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY);
+ if (verbose) ALOGD("netcfg: Wrong Op %d != %d\n", reply->op, OP_BOOTREPLY);
return 0;
}
if (reply->xid != msg->xid) {
- if (verbose) LOGD("netcfg: Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid),
+ if (verbose) ALOGD("netcfg: Wrong Xid 0x%x != 0x%x\n", ntohl(reply->xid),
ntohl(msg->xid));
return 0;
}
if (reply->htype != msg->htype) {
- if (verbose) LOGD("netcfg: Wrong Htype %d != %d\n", reply->htype, msg->htype);
+ if (verbose) ALOGD("netcfg: Wrong Htype %d != %d\n", reply->htype, msg->htype);
return 0;
}
if (reply->hlen != msg->hlen) {
- if (verbose) LOGD("netcfg: Wrong Hlen %d != %d\n", reply->hlen, msg->hlen);
+ if (verbose) ALOGD("netcfg: Wrong Hlen %d != %d\n", reply->hlen, msg->hlen);
return 0;
}
if (memcmp(msg->chaddr, reply->chaddr, msg->hlen)) {
- if (verbose) LOGD("netcfg: Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr));
+ if (verbose) ALOGD("netcfg: Wrong chaddr %x != %x\n", *(reply->chaddr),*(msg->chaddr));
return 0;
}
return 1;
@@ -469,7 +469,7 @@
r = receive_packet(s, &reply);
if (r < 0) {
if (errno != 0) {
- LOGD("receive_packet failed (%d): %s", r, strerror(errno));
+ ALOGD("receive_packet failed (%d): %s", r, strerror(errno));
if (errno == ENETDOWN || errno == ENXIO) {
return -1;
}
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c
index 0a2f760..8564ed9 100644
--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -46,8 +46,8 @@
#else
#include <stdio.h>
#include <string.h>
-#define LOGD printf
-#define LOGW printf
+#define ALOGD printf
+#define ALOGW printf
#endif
static int ifc_ctl_sock = -1;
@@ -686,7 +686,7 @@
init_sockaddr_in(&rt.rt_genmask, mask);
addr.s_addr = dest;
if (ioctl(ifc_ctl_sock, SIOCDELRT, &rt) < 0) {
- LOGD("failed to remove route for %s to %s: %s",
+ ALOGD("failed to remove route for %s to %s: %s",
ifname, inet_ntoa(addr), strerror(errno));
}
}
@@ -752,7 +752,7 @@
ifc_init();
addr.s_addr = gateway;
if ((result = ifc_create_default_route(ifname, gateway)) < 0) {
- LOGD("failed to add %s as default route for %s: %s",
+ ALOGD("failed to add %s as default route for %s: %s",
inet_ntoa(addr), ifname, strerror(errno));
}
ifc_close();
@@ -773,7 +773,7 @@
rt.rt_flags = RTF_UP|RTF_GATEWAY;
init_sockaddr_in(&rt.rt_dst, 0);
if ((result = ioctl(ifc_ctl_sock, SIOCDELRT, &rt)) < 0) {
- LOGD("failed to remove default route for %s: %s", ifname, strerror(errno));
+ ALOGD("failed to remove default route for %s: %s", ifname, strerror(errno));
}
ifc_close();
return result;
diff --git a/libnetutils/packet.c b/libnetutils/packet.c
index 9388345..3ec83fe 100644
--- a/libnetutils/packet.c
+++ b/libnetutils/packet.c
@@ -31,8 +31,8 @@
#else
#include <stdio.h>
#include <string.h>
-#define LOGD printf
-#define LOGW printf
+#define ALOGD printf
+#define ALOGW printf
#endif
#include "dhcpmsg.h"
@@ -179,23 +179,23 @@
is_valid = 0;
if (nread < (int)(sizeof(struct iphdr) + sizeof(struct udphdr))) {
#if VERBOSE
- LOGD("Packet is too small (%d) to be a UDP datagram", nread);
+ ALOGD("Packet is too small (%d) to be a UDP datagram", nread);
#endif
} else if (packet.ip.version != IPVERSION || packet.ip.ihl != (sizeof(packet.ip) >> 2)) {
#if VERBOSE
- LOGD("Not a valid IP packet");
+ ALOGD("Not a valid IP packet");
#endif
} else if (nread < ntohs(packet.ip.tot_len)) {
#if VERBOSE
- LOGD("Packet was truncated (read %d, needed %d)", nread, ntohs(packet.ip.tot_len));
+ ALOGD("Packet was truncated (read %d, needed %d)", nread, ntohs(packet.ip.tot_len));
#endif
} else if (packet.ip.protocol != IPPROTO_UDP) {
#if VERBOSE
- LOGD("IP protocol (%d) is not UDP", packet.ip.protocol);
+ ALOGD("IP protocol (%d) is not UDP", packet.ip.protocol);
#endif
} else if (packet.udp.dest != htons(PORT_BOOTP_CLIENT)) {
#if VERBOSE
- LOGD("UDP dest port (%d) is not DHCP client", ntohs(packet.udp.dest));
+ ALOGD("UDP dest port (%d) is not DHCP client", ntohs(packet.udp.dest));
#endif
} else {
is_valid = 1;
@@ -209,7 +209,7 @@
/* validate IP header checksum */
sum = finish_sum(checksum(&packet.ip, sizeof(packet.ip), 0));
if (sum != 0) {
- LOGW("IP header checksum failure (0x%x)", packet.ip.check);
+ ALOGW("IP header checksum failure (0x%x)", packet.ip.check);
return -1;
}
/*
@@ -231,7 +231,7 @@
sum = finish_sum(checksum(&packet, nread, 0));
packet.udp.check = temp;
if (temp != sum) {
- LOGW("UDP header checksum failure (0x%x should be 0x%x)", sum, temp);
+ ALOGW("UDP header checksum failure (0x%x should be 0x%x)", sum, temp);
return -1;
}
memcpy(msg, &packet.dhcp, dhcp_size);
diff --git a/libpixelflinger/codeflinger/ARMAssembler.cpp b/libpixelflinger/codeflinger/ARMAssembler.cpp
index 4726a08..0dc5037 100644
--- a/libpixelflinger/codeflinger/ARMAssembler.cpp
+++ b/libpixelflinger/codeflinger/ARMAssembler.cpp
@@ -177,7 +177,7 @@
// the instruction cache is flushed by CodeCache
const int64_t duration = ggl_system_time() - mDuration;
const char * const format = "generated %s (%d ins) at [%p:%p] in %lld ns\n";
- LOGI(format, name, int(pc()-base()), base(), pc(), duration);
+ ALOGI(format, name, int(pc()-base()), base(), pc(), duration);
#if defined(WITH_LIB_HARDWARE)
if (__builtin_expect(mQemuTracing, 0)) {
diff --git a/libpixelflinger/scanline.cpp b/libpixelflinger/scanline.cpp
index a37b47e..6c55379 100644
--- a/libpixelflinger/scanline.cpp
+++ b/libpixelflinger/scanline.cpp
@@ -351,7 +351,7 @@
}
#if DEBUG_NEEDS
- LOGI("Needs: n=0x%08x p=0x%08x t0=0x%08x t1=0x%08x",
+ ALOGI("Needs: n=0x%08x p=0x%08x t0=0x%08x t1=0x%08x",
c->state.needs.n, c->state.needs.p,
c->state.needs.t[0], c->state.needs.t[1]);
#endif
@@ -395,12 +395,12 @@
c->scanline_as->decStrong(c);
}
- //LOGI("using generated pixel-pipeline");
+ //ALOGI("using generated pixel-pipeline");
c->scanline_as = assembly.get();
c->scanline_as->incStrong(c); // hold on to assembly
c->scanline = (void(*)(context_t* c))assembly->base();
#else
-// LOGW("using generic (slow) pixel-pipeline");
+// ALOGW("using generic (slow) pixel-pipeline");
c->scanline = scanline;
#endif
}
diff --git a/libpixelflinger/trap.cpp b/libpixelflinger/trap.cpp
index 30b633f..80efeff 100644
--- a/libpixelflinger/trap.cpp
+++ b/libpixelflinger/trap.cpp
@@ -94,15 +94,15 @@
static void
triangle_dump_points( const GGLcoord* v0,
const GGLcoord* v1,
- const GGLcoord* v2 )
+ const GGLcoord* v2 )
{
float tri = 1.0f / TRI_ONE;
- LOGD( " P0=(%.3f, %.3f) [%08x, %08x]\n"
- " P1=(%.3f, %.3f) [%08x, %08x]\n"
- " P2=(%.3f, %.3f) [%08x, %08x]\n",
- v0[0]*tri, v0[1]*tri, v0[0], v0[1],
- v1[0]*tri, v1[1]*tri, v1[0], v1[1],
- v2[0]*tri, v2[1]*tri, v2[0], v2[1] );
+ ALOGD(" P0=(%.3f, %.3f) [%08x, %08x]\n"
+ " P1=(%.3f, %.3f) [%08x, %08x]\n"
+ " P2=(%.3f, %.3f) [%08x, %08x]\n",
+ v0[0]*tri, v0[1]*tri, v0[0], v0[1],
+ v1[0]*tri, v1[1]*tri, v1[0], v1[1],
+ v2[0]*tri, v2[1]*tri, v2[0], v2[1] );
}
// ----------------------------------------------------------------------------
@@ -639,7 +639,7 @@
static void
edge_dump( Edge* edge )
{
- LOGI( " top=%d (%.3f) bot=%d (%.3f) x=%d (%.3f) ix=%d (%.3f)",
+ ALOGI( " top=%d (%.3f) bot=%d (%.3f) x=%d (%.3f) ix=%d (%.3f)",
edge->y_top, edge->y_top/float(TRI_ONE),
edge->y_bot, edge->y_bot/float(TRI_ONE),
edge->x, edge->x/float(FIXED_ONE),
@@ -650,7 +650,7 @@
triangle_dump_edges( Edge* edges,
int count )
{
- LOGI( "%d edge%s:\n", count, count == 1 ? "" : "s" );
+ ALOGI( "%d edge%s:\n", count, count == 1 ? "" : "s" );
for ( ; count > 0; count--, edges++ )
edge_dump( edges );
}
@@ -835,7 +835,7 @@
float tri = 1.0f / TRI_ONE;
float iter = 1.0f / (1<<TRI_ITERATORS_BITS);
float fix = 1.0f / FIXED_ONE;
- LOGD( "x=%08x (%.3f), "
+ ALOGD( "x=%08x (%.3f), "
"x_incr=%08x (%.3f), y_incr=%08x (%.3f), "
"y_top=%08x (%.3f), y_bot=%08x (%.3f) ",
x, x*fix,
diff --git a/libusbhost/usbhost.c b/libusbhost/usbhost.c
index b1c967d..5d261cd 100644
--- a/libusbhost/usbhost.c
+++ b/libusbhost/usbhost.c
@@ -20,7 +20,7 @@
#ifdef USE_LIBLOG
#define LOG_TAG "usbhost"
#include "utils/Log.h"
-#define D LOGD
+#define D ALOGD
#else
#define D printf
#endif
diff --git a/nexus/CommandListener.cpp b/nexus/CommandListener.cpp
index 5973ff5..5c50acc 100644
--- a/nexus/CommandListener.cpp
+++ b/nexus/CommandListener.cpp
@@ -213,7 +213,7 @@
if (!NetworkManager::Instance()->getPropMngr()->get((*it),
p_v,
sizeof(p_v))) {
- LOGW("Failed to get %s (%s)", (*it), strerror(errno));
+ ALOGW("Failed to get %s (%s)", (*it), strerror(errno));
}
char *buf;
diff --git a/nexus/Controller.cpp b/nexus/Controller.cpp
index f6a2436..4f4c473 100644
--- a/nexus/Controller.cpp
+++ b/nexus/Controller.cpp
@@ -86,7 +86,7 @@
}
if (rc != 0) {
- LOGW("Unable to unload kernel driver '%s' (%s)", modtag,
+ ALOGW("Unable to unload kernel driver '%s' (%s)", modtag,
strerror(errno));
}
return rc;
@@ -105,7 +105,7 @@
char *endTag = strchr(line, ' ');
if (!endTag) {
- LOGW("Unable to find tag for line '%s'", line);
+ ALOGW("Unable to find tag for line '%s'", line);
continue;
}
if (!strncmp(line, modtag, (endTag - line))) {
diff --git a/nexus/DhcpClient.cpp b/nexus/DhcpClient.cpp
index 713059d..02adf91 100644
--- a/nexus/DhcpClient.cpp
+++ b/nexus/DhcpClient.cpp
@@ -53,7 +53,7 @@
}
int DhcpClient::start(Controller *c) {
- LOGD("Starting DHCP service (arp probe = %d)", mDoArpProbe);
+ ALOGD("Starting DHCP service (arp probe = %d)", mDoArpProbe);
char svc[PROPERTY_VALUE_MAX];
snprintf(svc,
sizeof(svc),
@@ -126,7 +126,7 @@
close(mListenerSocket);
if (mServiceManager->stop("dhcpcd")) {
- LOGW("Failed to stop DHCP service (%s)", strerror(errno));
+ ALOGW("Failed to stop DHCP service (%s)", strerror(errno));
// XXX: Kill it the hard way.. but its gotta go!
}
diff --git a/nexus/DhcpEvent.cpp b/nexus/DhcpEvent.cpp
index 58893f4..2f1ce6f 100644
--- a/nexus/DhcpEvent.cpp
+++ b/nexus/DhcpEvent.cpp
@@ -50,7 +50,7 @@
else if (!strcasecmp(buffer, "TIMEOUT"))
return DhcpEvent::TIMEOUT;
else {
- LOGW("Bad event '%s'", buffer);
+ ALOGW("Bad event '%s'", buffer);
return -1;
}
}
diff --git a/nexus/DhcpListener.cpp b/nexus/DhcpListener.cpp
index afa68eb..16c369b 100644
--- a/nexus/DhcpListener.cpp
+++ b/nexus/DhcpListener.cpp
@@ -42,7 +42,7 @@
int rc;
if ((rc = read(cli->getSocket(), buffer, sizeof(buffer))) < 0) {
- LOGW("Error reading dhcp status msg (%s)", strerror(errno));
+ ALOGW("Error reading dhcp status msg (%s)", strerror(errno));
return true;
}
@@ -53,7 +53,7 @@
for (i = 0; i < 2; i++) {
if (!(tmp = strsep(&next, ":"))) {
- LOGW("Error parsing state '%s'", buffer);
+ ALOGW("Error parsing state '%s'", buffer);
return true;
}
}
@@ -65,22 +65,22 @@
struct in_addr ipaddr, netmask, gateway, broadcast, dns1, dns2;
if (!inet_aton(strsep(&next, ":"), &ipaddr)) {
- LOGW("Malformatted IP specified");
+ ALOGW("Malformatted IP specified");
}
if (!inet_aton(strsep(&next, ":"), &netmask)) {
- LOGW("Malformatted netmask specified");
+ ALOGW("Malformatted netmask specified");
}
if (!inet_aton(strsep(&next, ":"), &broadcast)) {
- LOGW("Malformatted broadcast specified");
+ ALOGW("Malformatted broadcast specified");
}
if (!inet_aton(strsep(&next, ":"), &gateway)) {
- LOGW("Malformatted gateway specified");
+ ALOGW("Malformatted gateway specified");
}
if (!inet_aton(strsep(&next, ":"), &dns1)) {
- LOGW("Malformatted dns1 specified");
+ ALOGW("Malformatted dns1 specified");
}
if (!inet_aton(strsep(&next, ":"), &dns2)) {
- LOGW("Malformatted dns2 specified");
+ ALOGW("Malformatted dns2 specified");
}
mHandlers->onDhcpLeaseUpdated(mController, &ipaddr, &netmask,
&broadcast, &gateway, &dns1, &dns2);
@@ -92,7 +92,7 @@
for (i = 0; i < 2; i++) {
if (!(tmp = strsep(&next, ":"))) {
- LOGW("Error parsing event '%s'", buffer);
+ ALOGW("Error parsing event '%s'", buffer);
return true;
}
}
@@ -101,7 +101,7 @@
mHandlers->onDhcpEvent(mController, ev);
} else {
- LOGW("Unknown DHCP monitor msg '%s'", buffer);
+ ALOGW("Unknown DHCP monitor msg '%s'", buffer);
}
return true;
diff --git a/nexus/DhcpState.cpp b/nexus/DhcpState.cpp
index c9d5135..b86c186 100644
--- a/nexus/DhcpState.cpp
+++ b/nexus/DhcpState.cpp
@@ -74,7 +74,7 @@
else if (!strcasecmp(buffer, "ANNOUNCING"))
return DhcpState::ANNOUNCING;
else {
- LOGW("Bad state '%s'", buffer);
+ ALOGW("Bad state '%s'", buffer);
return -1;
}
}
diff --git a/nexus/NetworkManager.cpp b/nexus/NetworkManager.cpp
index e0df409..78ccbd8 100644
--- a/nexus/NetworkManager.cpp
+++ b/nexus/NetworkManager.cpp
@@ -49,7 +49,7 @@
int NetworkManager::run() {
if (startControllers()) {
- LOGW("Unable to start all controllers (%s)", strerror(errno));
+ ALOGW("Unable to start all controllers (%s)", strerror(errno));
}
return 0;
}
@@ -107,7 +107,7 @@
}
void NetworkManager::onInterfaceConnected(Controller *c) {
- LOGD("Controller %s interface %s connected", c->getName(), c->getBoundInterface());
+ ALOGD("Controller %s interface %s connected", c->getName(), c->getBoundInterface());
if (mDhcp->start(c)) {
LOGE("Failed to start DHCP (%s)", strerror(errno));
@@ -116,20 +116,20 @@
}
void NetworkManager::onInterfaceDisconnected(Controller *c) {
- LOGD("Controller %s interface %s disconnected", c->getName(),
+ ALOGD("Controller %s interface %s disconnected", c->getName(),
c->getBoundInterface());
mDhcp->stop();
}
void NetworkManager::onControllerSuspending(Controller *c) {
- LOGD("Controller %s interface %s suspending", c->getName(),
+ ALOGD("Controller %s interface %s suspending", c->getName(),
c->getBoundInterface());
mDhcp->stop();
}
void NetworkManager::onControllerResumed(Controller *c) {
- LOGD("Controller %s interface %s resumed", c->getName(),
+ ALOGD("Controller %s interface %s resumed", c->getName(),
c->getBoundInterface());
}
@@ -137,7 +137,7 @@
char tmp[255];
char tmp2[255];
- LOGD("onDhcpStateChanged(%s -> %s)",
+ ALOGD("onDhcpStateChanged(%s -> %s)",
DhcpState::toString(mLastDhcpState, tmp, sizeof(tmp)),
DhcpState::toString(state, tmp2, sizeof(tmp2)));
@@ -169,7 +169,7 @@
void NetworkManager::onDhcpEvent(Controller *c, int evt) {
char tmp[64];
- LOGD("onDhcpEvent(%s)", DhcpEvent::toString(evt, tmp, sizeof(tmp)));
+ ALOGD("onDhcpEvent(%s)", DhcpEvent::toString(evt, tmp, sizeof(tmp)));
}
void NetworkManager::onDhcpLeaseUpdated(Controller *c, struct in_addr *addr,
diff --git a/nexus/Property.cpp b/nexus/Property.cpp
index d02769d..821d22f 100644
--- a/nexus/Property.cpp
+++ b/nexus/Property.cpp
@@ -30,7 +30,7 @@
mName(name), mReadOnly(readOnly), mType(type),
mNumElements(numElements) {
if (index(name, '.')) {
- LOGW("Property name %s violates namespace rules", name);
+ ALOGW("Property name %s violates namespace rules", name);
}
}
@@ -67,7 +67,7 @@
int StringPropertyHelper::set(int idx, const char *value) {
if (idx != 0) {
- LOGW("Attempt to use array index on StringPropertyHelper::set");
+ ALOGW("Attempt to use array index on StringPropertyHelper::set");
errno = EINVAL;
return -1;
}
@@ -77,7 +77,7 @@
int StringPropertyHelper::get(int idx, char *buffer, size_t max) {
if (idx != 0) {
- LOGW("Attempt to use array index on StringPropertyHelper::get");
+ ALOGW("Attempt to use array index on StringPropertyHelper::get");
errno = EINVAL;
return -1;
}
@@ -118,7 +118,7 @@
int IntegerPropertyHelper::set(int idx, int value) {
if (idx != 0) {
- LOGW("Attempt to use array index on IntegerPropertyHelper::set");
+ ALOGW("Attempt to use array index on IntegerPropertyHelper::set");
errno = EINVAL;
return -1;
}
@@ -128,7 +128,7 @@
int IntegerPropertyHelper::get(int idx, int *buffer) {
if (idx != 0) {
- LOGW("Attempt to use array index on IntegerPropertyHelper::get");
+ ALOGW("Attempt to use array index on IntegerPropertyHelper::get");
errno = EINVAL;
return -1;
}
@@ -169,7 +169,7 @@
int IPV4AddressPropertyHelper::set(int idx, struct in_addr *value) {
if (idx != 0) {
- LOGW("Attempt to use array index on IPV4AddressPropertyHelper::set");
+ ALOGW("Attempt to use array index on IPV4AddressPropertyHelper::set");
errno = EINVAL;
return -1;
}
@@ -179,7 +179,7 @@
int IPV4AddressPropertyHelper::get(int idx, struct in_addr *buffer) {
if (idx != 0) {
- LOGW("Attempt to use array index on IPV4AddressPropertyHelper::get");
+ ALOGW("Attempt to use array index on IPV4AddressPropertyHelper::get");
errno = EINVAL;
return -1;
}
diff --git a/nexus/PropertyManager.cpp b/nexus/PropertyManager.cpp
index 704b223..1caaba6 100644
--- a/nexus/PropertyManager.cpp
+++ b/nexus/PropertyManager.cpp
@@ -66,10 +66,10 @@
int PropertyManager::attachProperty(const char *ns_name, Property *p) {
PropertyNamespace *ns;
- LOGD("Attaching property %s to namespace %s", p->getName(), ns_name);
+ ALOGD("Attaching property %s to namespace %s", p->getName(), ns_name);
pthread_mutex_lock(&mLock);
if (!(ns = lookupNamespace_UNLOCKED(ns_name))) {
- LOGD("Creating namespace %s", ns_name);
+ ALOGD("Creating namespace %s", ns_name);
ns = new PropertyNamespace(ns_name);
mNamespaces->push_back(ns);
}
@@ -90,7 +90,7 @@
int PropertyManager::detachProperty(const char *ns_name, Property *p) {
PropertyNamespace *ns;
- LOGD("Detaching property %s from namespace %s", p->getName(), ns_name);
+ ALOGD("Detaching property %s from namespace %s", p->getName(), ns_name);
pthread_mutex_lock(&mLock);
if (!(ns = lookupNamespace_UNLOCKED(ns_name))) {
pthread_mutex_unlock(&mLock);
@@ -157,7 +157,7 @@
if (p->getType() == Property::Type_STRING) {
if (p->get(idx, buffer, max)) {
- LOGW("String property %s get failed (%s)", p->getName(),
+ ALOGW("String property %s get failed (%s)", p->getName(),
strerror(errno));
return -1;
}
@@ -165,7 +165,7 @@
else if (p->getType() == Property::Type_INTEGER) {
int tmp;
if (p->get(idx, &tmp)) {
- LOGW("Integer property %s get failed (%s)", p->getName(),
+ ALOGW("Integer property %s get failed (%s)", p->getName(),
strerror(errno));
return -1;
}
@@ -173,7 +173,7 @@
} else if (p->getType() == Property::Type_IPV4) {
struct in_addr tmp;
if (p->get(idx, &tmp)) {
- LOGW("IPV4 property %s get failed (%s)", p->getName(),
+ ALOGW("IPV4 property %s get failed (%s)", p->getName(),
strerror(errno));
return -1;
}
@@ -193,7 +193,7 @@
int PropertyManager::set(const char *name, const char *value) {
- LOGD("set %s = '%s'", name, value);
+ ALOGD("set %s = '%s'", name, value);
pthread_mutex_lock(&mLock);
PropertyNamespaceCollection::iterator ns_it;
for (ns_it = mNamespaces->begin(); ns_it != mNamespaces->end(); ++ns_it) {
diff --git a/nexus/ScanResult.cpp b/nexus/ScanResult.cpp
index e9a286c..72cb164 100644
--- a/nexus/ScanResult.cpp
+++ b/nexus/ScanResult.cpp
@@ -74,7 +74,7 @@
return;
out_bad:
- LOGW("Malformatted scan result (%s)", rawResult);
+ ALOGW("Malformatted scan result (%s)", rawResult);
}
ScanResult::~ScanResult() {
diff --git a/nexus/Supplicant.cpp b/nexus/Supplicant.cpp
index 6aa36e8..f5298f7 100644
--- a/nexus/Supplicant.cpp
+++ b/nexus/Supplicant.cpp
@@ -64,7 +64,7 @@
int Supplicant::start() {
if (setupConfig()) {
- LOGW("Unable to setup supplicant.conf");
+ ALOGW("Unable to setup supplicant.conf");
}
if (mServiceManager->start(SUPPLICANT_SERVICE_NAME)) {
@@ -89,12 +89,12 @@
int Supplicant::stop() {
if (mListener->stopListener()) {
- LOGW("Unable to stop supplicant listener (%s)", strerror(errno));
+ ALOGW("Unable to stop supplicant listener (%s)", strerror(errno));
return -1;
}
if (mServiceManager->stop(SUPPLICANT_SERVICE_NAME)) {
- LOGW("Error stopping supplicant (%s)", strerror(errno));
+ ALOGW("Error stopping supplicant (%s)", strerror(errno));
}
if (mCtrl) {
@@ -120,7 +120,7 @@
return -1;
}
-// LOGD("sendCommand(): -> '%s'", cmd);
+// ALOGD("sendCommand(): -> '%s'", cmd);
int rc;
memset(reply, 0, *reply_len);
@@ -133,7 +133,7 @@
return -1;
}
- // LOGD("sendCommand(): <- '%s'", reply);
+ // ALOGD("sendCommand(): <- '%s'", reply);
return 0;
}
SupplicantStatus *Supplicant::getStatus() {
@@ -178,7 +178,7 @@
char *linep_next = NULL;
if (!strtok_r(reply, "\n", &linep_next)) {
- LOGW("Malformatted network list\n");
+ ALOGW("Malformatted network list\n");
free(reply);
errno = EIO;
return -1;
@@ -199,7 +199,7 @@
if ((merge_wn = this->lookupNetwork_UNLOCKED(new_wn->getNetworkId()))) {
num_refreshed++;
if (merge_wn->refresh()) {
- LOGW("Error refreshing network %d (%s)",
+ ALOGW("Error refreshing network %d (%s)",
merge_wn->getNetworkId(), strerror(errno));
}
delete new_wn;
@@ -210,7 +210,7 @@
new_wn->attachProperties(pm, new_ns);
mNetworks->push_back(new_wn);
if (new_wn->refresh()) {
- LOGW("Unable to refresh network id %d (%s)",
+ ALOGW("Unable to refresh network id %d (%s)",
new_wn->getNetworkId(), strerror(errno));
}
}
@@ -233,7 +233,7 @@
}
- LOGD("Networks added %d, refreshed %d, removed %d\n",
+ ALOGD("Networks added %d, refreshed %d, removed %d\n",
num_added, num_refreshed, num_removed);
pthread_mutex_unlock(&mNetworksLock);
@@ -243,7 +243,7 @@
int Supplicant::connectToSupplicant() {
if (!isStarted())
- LOGW("Supplicant service not running");
+ ALOGW("Supplicant service not running");
mCtrl = wpa_ctrl_open("tiwlan0"); // XXX:
if (mCtrl == NULL) {
@@ -280,7 +280,7 @@
if (sendCommand((active ? "DRIVER SCAN-ACTIVE" : "DRIVER SCAN-PASSIVE"),
reply, &len)) {
- LOGW("triggerScan(%d): Error setting scan mode (%s)", active,
+ ALOGW("triggerScan(%d): Error setting scan mode (%s)", active,
strerror(errno));
return -1;
}
@@ -292,7 +292,7 @@
size_t len = sizeof(reply);
if (sendCommand("SCAN", reply, &len)) {
- LOGW("triggerScan(): Error initiating scan");
+ ALOGW("triggerScan(): Error initiating scan");
return -1;
}
return 0;
@@ -303,7 +303,7 @@
size_t len = sizeof(reply);
if (sendCommand("DRIVER RSSI", reply, &len)) {
- LOGW("Failed to get RSSI (%s)", strerror(errno));
+ ALOGW("Failed to get RSSI (%s)", strerror(errno));
return -1;
}
@@ -325,7 +325,7 @@
size_t len = sizeof(reply);
if (sendCommand("DRIVER LINKSPEED", reply, &len)) {
- LOGW("Failed to get LINKSPEED (%s)", strerror(errno));
+ ALOGW("Failed to get LINKSPEED (%s)", strerror(errno));
return -1;
}
@@ -350,10 +350,10 @@
char reply[64];
size_t len = sizeof(reply);
- LOGD("stopDriver()");
+ ALOGD("stopDriver()");
if (sendCommand("DRIVER STOP", reply, &len)) {
- LOGW("Failed to stop driver (%s)", strerror(errno));
+ ALOGW("Failed to stop driver (%s)", strerror(errno));
return -1;
}
return 0;
@@ -363,9 +363,9 @@
char reply[64];
size_t len = sizeof(reply);
- LOGD("startDriver()");
+ ALOGD("startDriver()");
if (sendCommand("DRIVER START", reply, &len)) {
- LOGW("Failed to start driver (%s)", strerror(errno));
+ ALOGW("Failed to start driver (%s)", strerror(errno));
return -1;
}
return 0;
@@ -496,7 +496,7 @@
char reply[255];
size_t len = sizeof(reply) -1;
- LOGD("netid %d, var '%s' = '%s'", networkId, var, val);
+ ALOGD("netid %d, var '%s' = '%s'", networkId, var, val);
char *tmp;
asprintf(&tmp, "SET_NETWORK %d %s %s", networkId, var, val);
if (sendCommand(tmp, reply, &len)) {
@@ -621,7 +621,7 @@
int Supplicant::setApScanMode(int mode) {
char req[64];
-// LOGD("setApScanMode(%d)", mode);
+// ALOGD("setApScanMode(%d)", mode);
sprintf(req, "AP_SCAN %d", mode);
char reply[16];
diff --git a/nexus/SupplicantEventFactory.cpp b/nexus/SupplicantEventFactory.cpp
index 8695aca..f91db15 100644
--- a/nexus/SupplicantEventFactory.cpp
+++ b/nexus/SupplicantEventFactory.cpp
@@ -57,9 +57,9 @@
level = atoi(tmp);
event += (match - event) + 1;
} else
- LOGW("Unclosed level brace in event");
+ ALOGW("Unclosed level brace in event");
} else
- LOGW("No level specified in event");
+ ALOGW("No level specified in event");
/*
* <N>CTRL-EVENT-XXX
diff --git a/nexus/SupplicantListener.cpp b/nexus/SupplicantListener.cpp
index b91fc02..b59a7a8 100644
--- a/nexus/SupplicantListener.cpp
+++ b/nexus/SupplicantListener.cpp
@@ -54,7 +54,7 @@
buf[nread] = '\0';
if (!rc && !nread) {
- LOGD("Received EOF on supplicant socket\n");
+ ALOGD("Received EOF on supplicant socket\n");
strncpy(buf, WPA_EVENT_TERMINATING " - signal 0 received", buflen-1);
buf[buflen-1] = '\0';
return false;
@@ -63,7 +63,7 @@
SupplicantEvent *evt = mFactory->createEvent(buf, nread);
if (!evt) {
- LOGW("Dropping unknown supplicant event '%s'", buf);
+ ALOGW("Dropping unknown supplicant event '%s'", buf);
return true;
}
@@ -83,7 +83,7 @@
else if (evt->getType() == SupplicantEvent::EVENT_DISCONNECTED)
mHandlers->onDisconnectedEvent((SupplicantDisconnectedEvent *) evt);
else
- LOGW("Whoops - no handler available for event '%s'\n", buf);
+ ALOGW("Whoops - no handler available for event '%s'\n", buf);
#if 0
else if (evt->getType() == SupplicantEvent::EVENT_TERMINATING)
mHandlers->onTerminatingEvent(evt);
diff --git a/nexus/SupplicantStateChangeEvent.cpp b/nexus/SupplicantStateChangeEvent.cpp
index cf0b9da..fd9233a 100644
--- a/nexus/SupplicantStateChangeEvent.cpp
+++ b/nexus/SupplicantStateChangeEvent.cpp
@@ -28,7 +28,7 @@
// XXX: move this stuff into a static creation method
char *p = index(event, ' ');
if (!p) {
- LOGW("Bad event '%s'\n", event);
+ ALOGW("Bad event '%s'\n", event);
return;
}
diff --git a/nexus/SupplicantStatus.cpp b/nexus/SupplicantStatus.cpp
index b3c560a..7868264 100644
--- a/nexus/SupplicantStatus.cpp
+++ b/nexus/SupplicantStatus.cpp
@@ -83,7 +83,7 @@
else
LOGE("Unknown supplicant state '%s'", value);
} else
- LOGD("Ignoring unsupported status token '%s'", token);
+ ALOGD("Ignoring unsupported status token '%s'", token);
}
return new SupplicantStatus(state, id, bssid, ssid);
diff --git a/nexus/TiwlanEventListener.cpp b/nexus/TiwlanEventListener.cpp
index 15e6930..4851e28 100644
--- a/nexus/TiwlanEventListener.cpp
+++ b/nexus/TiwlanEventListener.cpp
@@ -45,13 +45,13 @@
if (data->event_type == IPC_EVENT_LINK_SPEED) {
uint32_t *spd = (uint32_t *) data->buffer;
*spd /= 2;
-// LOGD("Link speed = %u MB/s", *spd);
+// ALOGD("Link speed = %u MB/s", *spd);
} else if (data->event_type == IPC_EVENT_LOW_SNR) {
- LOGW("Low signal/noise ratio");
+ ALOGW("Low signal/noise ratio");
} else if (data->event_type == IPC_EVENT_LOW_RSSI) {
- LOGW("Low RSSI");
+ ALOGW("Low RSSI");
} else {
-// LOGD("Dropping unhandled driver event %d", data->event_type);
+// ALOGD("Dropping unhandled driver event %d", data->event_type);
}
// TODO: Tell WifiController about the event
diff --git a/nexus/TiwlanWifiController.cpp b/nexus/TiwlanWifiController.cpp
index 016c790..311bf16 100644
--- a/nexus/TiwlanWifiController.cpp
+++ b/nexus/TiwlanWifiController.cpp
@@ -75,10 +75,10 @@
while (count-- > 0) {
if (property_get(DRIVER_PROP_NAME, driver_status, NULL)) {
if (!strcmp(driver_status, "ok")) {
- LOGD("Firmware loaded OK");
+ ALOGD("Firmware loaded OK");
if (startDriverEventListener()) {
- LOGW("Failed to start driver event listener (%s)",
+ ALOGW("Failed to start driver event listener (%s)",
strerror(errno));
}
diff --git a/nexus/WifiController.cpp b/nexus/WifiController.cpp
index c218c30..e11f668 100644
--- a/nexus/WifiController.cpp
+++ b/nexus/WifiController.cpp
@@ -108,7 +108,7 @@
int WifiController::enable() {
if (!isPoweredUp()) {
- LOGI("Powering up");
+ ALOGI("Powering up");
sendStatusBroadcast("Powering up WiFi hardware");
if (powerUp()) {
LOGE("Powerup failed (%s)", strerror(errno));
@@ -117,7 +117,7 @@
}
if (mModuleName[0] != '\0' && !isKernelModuleLoaded(mModuleName)) {
- LOGI("Loading driver");
+ ALOGI("Loading driver");
sendStatusBroadcast("Loading WiFi driver");
if (loadKernelModule(mModulePath, mModuleArgs)) {
LOGE("Kernel module load failed (%s)", strerror(errno));
@@ -126,7 +126,7 @@
}
if (!isFirmwareLoaded()) {
- LOGI("Loading firmware");
+ ALOGI("Loading firmware");
sendStatusBroadcast("Loading WiFI firmware");
if (loadFirmware()) {
LOGE("Firmware load failed (%s)", strerror(errno));
@@ -135,7 +135,7 @@
}
if (!mSupplicant->isStarted()) {
- LOGI("Starting WPA Supplicant");
+ ALOGI("Starting WPA Supplicant");
sendStatusBroadcast("Starting WPA Supplicant");
if (mSupplicant->start()) {
LOGE("Supplicant start failed (%s)", strerror(errno));
@@ -149,9 +149,9 @@
}
if (mSupplicant->refreshNetworkList())
- LOGW("Error getting list of networks (%s)", strerror(errno));
+ ALOGW("Error getting list of networks (%s)", strerror(errno));
- LOGW("TODO: Set # of allowed regulatory channels!");
+ ALOGW("TODO: Set # of allowed regulatory channels!");
mPropMngr->attachProperty("wifi", mDynamicProperties.propSupplicantState);
mPropMngr->attachProperty("wifi", mDynamicProperties.propActiveScan);
@@ -167,7 +167,7 @@
mPropMngr->attachProperty("wifi", mDynamicProperties.propNetCount);
mPropMngr->attachProperty("wifi", mDynamicProperties.propTriggerScan);
- LOGI("Enabled successfully");
+ ALOGI("Enabled successfully");
return 0;
out_unloadmodule:
@@ -195,7 +195,7 @@
pthread_mutex_lock(&mLock);
if (suspend == mSuspended) {
- LOGW("Suspended state already = %d", suspend);
+ ALOGW("Suspended state already = %d", suspend);
pthread_mutex_unlock(&mLock);
return 0;
}
@@ -204,26 +204,26 @@
mHandlers->onControllerSuspending(this);
char tmp[80];
- LOGD("Suspending from supplicant state %s",
+ ALOGD("Suspending from supplicant state %s",
SupplicantState::toString(mSupplicantState,
tmp,
sizeof(tmp)));
if (mSupplicantState != SupplicantState::IDLE) {
- LOGD("Forcing Supplicant disconnect");
+ ALOGD("Forcing Supplicant disconnect");
if (mSupplicant->disconnect()) {
- LOGW("Error disconnecting (%s)", strerror(errno));
+ ALOGW("Error disconnecting (%s)", strerror(errno));
}
}
- LOGD("Stopping Supplicant driver");
+ ALOGD("Stopping Supplicant driver");
if (mSupplicant->stopDriver()) {
LOGE("Error stopping driver (%s)", strerror(errno));
pthread_mutex_unlock(&mLock);
return -1;
}
} else {
- LOGD("Resuming");
+ ALOGD("Resuming");
if (mSupplicant->startDriver()) {
LOGE("Error resuming driver (%s)", strerror(errno));
@@ -241,7 +241,7 @@
mSuspended = suspend;
pthread_mutex_unlock(&mLock);
- LOGD("Suspend / Resume completed");
+ ALOGD("Suspend / Resume completed");
return 0;
}
@@ -273,7 +273,7 @@
return -1;
}
} else
- LOGW("disable(): Supplicant not running?");
+ ALOGW("disable(): Supplicant not running?");
if (mModuleName[0] != '\0' && isKernelModuleLoaded(mModuleName)) {
sendStatusBroadcast("Unloading WiFi driver");
@@ -426,38 +426,38 @@
}
void WifiController::onAssociatingEvent(SupplicantAssociatingEvent *evt) {
- LOGD("onAssociatingEvent(%s, %s, %d)",
+ ALOGD("onAssociatingEvent(%s, %s, %d)",
(evt->getBssid() ? evt->getBssid() : "n/a"),
(evt->getSsid() ? evt->getSsid() : "n/a"),
evt->getFreq());
}
void WifiController::onAssociatedEvent(SupplicantAssociatedEvent *evt) {
- LOGD("onAssociatedEvent(%s)", evt->getBssid());
+ ALOGD("onAssociatedEvent(%s)", evt->getBssid());
}
void WifiController::onConnectedEvent(SupplicantConnectedEvent *evt) {
- LOGD("onConnectedEvent(%s, %d)", evt->getBssid(), evt->getReassociated());
+ ALOGD("onConnectedEvent(%s, %d)", evt->getBssid(), evt->getReassociated());
SupplicantStatus *ss = mSupplicant->getStatus();
WifiNetwork *wn;
if (ss->getWpaState() != SupplicantState::COMPLETED) {
char tmp[32];
- LOGW("onConnected() with SupplicantState = %s!",
+ ALOGW("onConnected() with SupplicantState = %s!",
SupplicantState::toString(ss->getWpaState(), tmp,
sizeof(tmp)));
return;
}
if (ss->getId() == -1) {
- LOGW("onConnected() with id = -1!");
+ ALOGW("onConnected() with id = -1!");
return;
}
mCurrentlyConnectedNetworkId = ss->getId();
if (!(wn = mSupplicant->lookupNetwork(ss->getId()))) {
- LOGW("Error looking up connected network id %d (%s)",
+ ALOGW("Error looking up connected network id %d (%s)",
ss->getId(), strerror(errno));
return;
}
@@ -481,7 +481,7 @@
size_t len = 4096;
if (mSupplicant->sendCommand("SCAN_RESULTS", reply, &len)) {
- LOGW("onScanResultsEvent: Error getting scan results (%s)",
+ ALOGW("onScanResultsEvent: Error getting scan results (%s)",
strerror(errno));
free(reply);
return;
@@ -530,7 +530,7 @@
if (evt->getState() == mSupplicantState)
return;
- LOGD("onStateChangeEvent(%s -> %s)",
+ ALOGD("onStateChangeEvent(%s -> %s)",
SupplicantState::toString(mSupplicantState, tmp, sizeof(tmp)),
SupplicantState::toString(evt->getState(), tmp2, sizeof(tmp2)));
@@ -559,7 +559,7 @@
}
void WifiController::onConnectionTimeoutEvent(SupplicantConnectionTimeoutEvent *evt) {
- LOGD("onConnectionTimeoutEvent(%s)", evt->getBssid());
+ ALOGD("onConnectionTimeoutEvent(%s)", evt->getBssid());
}
void WifiController::onDisconnectedEvent(SupplicantDisconnectedEvent *evt) {
@@ -569,39 +569,39 @@
#if 0
void WifiController::onTerminatingEvent(SupplicantEvent *evt) {
- LOGD("onTerminatingEvent(%s)", evt->getEvent());
+ ALOGD("onTerminatingEvent(%s)", evt->getEvent());
}
void WifiController::onPasswordChangedEvent(SupplicantEvent *evt) {
- LOGD("onPasswordChangedEvent(%s)", evt->getEvent());
+ ALOGD("onPasswordChangedEvent(%s)", evt->getEvent());
}
void WifiController::onEapNotificationEvent(SupplicantEvent *evt) {
- LOGD("onEapNotificationEvent(%s)", evt->getEvent());
+ ALOGD("onEapNotificationEvent(%s)", evt->getEvent());
}
void WifiController::onEapStartedEvent(SupplicantEvent *evt) {
- LOGD("onEapStartedEvent(%s)", evt->getEvent());
+ ALOGD("onEapStartedEvent(%s)", evt->getEvent());
}
void WifiController::onEapMethodEvent(SupplicantEvent *evt) {
- LOGD("onEapMethodEvent(%s)", evt->getEvent());
+ ALOGD("onEapMethodEvent(%s)", evt->getEvent());
}
void WifiController::onEapSuccessEvent(SupplicantEvent *evt) {
- LOGD("onEapSuccessEvent(%s)", evt->getEvent());
+ ALOGD("onEapSuccessEvent(%s)", evt->getEvent());
}
void WifiController::onEapFailureEvent(SupplicantEvent *evt) {
- LOGD("onEapFailureEvent(%s)", evt->getEvent());
+ ALOGD("onEapFailureEvent(%s)", evt->getEvent());
}
void WifiController::onLinkSpeedEvent(SupplicantEvent *evt) {
- LOGD("onLinkSpeedEvent(%s)", evt->getEvent());
+ ALOGD("onLinkSpeedEvent(%s)", evt->getEvent());
}
void WifiController::onDriverStateEvent(SupplicantEvent *evt) {
- LOGD("onDriverStateEvent(%s)", evt->getEvent());
+ ALOGD("onDriverStateEvent(%s)", evt->getEvent());
}
#endif
diff --git a/nexus/WifiNetwork.cpp b/nexus/WifiNetwork.cpp
index 6a0f684..346c7c2 100644
--- a/nexus/WifiNetwork.cpp
+++ b/nexus/WifiNetwork.cpp
@@ -51,7 +51,7 @@
if (!(flags = strsep(&next, "\t")))
LOGE("Failed to extract flags");
- // LOGD("id '%s', ssid '%s', bssid '%s', flags '%s'", id, ssid, bssid,
+ // ALOGD("id '%s', ssid '%s', bssid '%s', flags '%s'", id, ssid, bssid,
// flags ? flags :"null");
if (id)
@@ -77,7 +77,7 @@
if (!strcmp(flags, "[DISABLED]"))
mEnabled = false;
else
- LOGW("Unsupported flags '%s'", flags);
+ ALOGW("Unsupported flags '%s'", flags);
}
free(tmp);
@@ -511,7 +511,7 @@
char *v_next = v_tmp;
char *v_token;
-// LOGD("parseKeyManagementMask(%s)", buffer);
+// ALOGD("parseKeyManagementMask(%s)", buffer);
*mask = 0;
while((v_token = strsep(&v_next, " "))) {
@@ -526,13 +526,13 @@
else if (!strcasecmp(v_token, "IEEE8021X"))
*mask |= KeyManagementMask::IEEE8021X;
else {
- LOGW("Invalid KeyManagementMask value '%s'", v_token);
+ ALOGW("Invalid KeyManagementMask value '%s'", v_token);
errno = EINVAL;
free(v_tmp);
return -1;
}
} else {
- LOGW("KeyManagementMask value '%s' when NONE", v_token);
+ ALOGW("KeyManagementMask value '%s' when NONE", v_token);
errno = EINVAL;
free(v_tmp);
return -1;
@@ -548,7 +548,7 @@
char *v_next = v_tmp;
char *v_token;
-// LOGD("parseProtocolsMask(%s)", buffer);
+// ALOGD("parseProtocolsMask(%s)", buffer);
*mask = 0;
while((v_token = strsep(&v_next, " "))) {
if (!strcasecmp(v_token, "WPA"))
@@ -556,7 +556,7 @@
else if (!strcasecmp(v_token, "RSN"))
*mask |= SecurityProtocolMask::RSN;
else {
- LOGW("Invalid ProtocolsMask value '%s'", v_token);
+ ALOGW("Invalid ProtocolsMask value '%s'", v_token);
errno = EINVAL;
free(v_tmp);
return -1;
@@ -573,7 +573,7 @@
char *v_next = v_tmp;
char *v_token;
-// LOGD("parseAuthAlgorithmsMask(%s)", buffer);
+// ALOGD("parseAuthAlgorithmsMask(%s)", buffer);
*mask = 0;
if (buffer[0] == '\0')
@@ -587,7 +587,7 @@
else if (!strcasecmp(v_token, "LEAP"))
*mask |= AuthenticationAlgorithmMask::LEAP;
else {
- LOGW("Invalid AuthAlgorithmsMask value '%s'", v_token);
+ ALOGW("Invalid AuthAlgorithmsMask value '%s'", v_token);
errno = EINVAL;
free(v_tmp);
return -1;
@@ -603,7 +603,7 @@
char *v_next = v_tmp;
char *v_token;
-// LOGD("parsePairwiseCiphersMask(%s)", buffer);
+// ALOGD("parsePairwiseCiphersMask(%s)", buffer);
*mask = 0;
while((v_token = strsep(&v_next, " "))) {
@@ -616,13 +616,13 @@
else if (!strcasecmp(v_token, "CCMP"))
*mask |= PairwiseCiphersMask::CCMP;
else {
- LOGW("PairwiseCiphersMask value '%s' when NONE", v_token);
+ ALOGW("PairwiseCiphersMask value '%s' when NONE", v_token);
errno = EINVAL;
free(v_tmp);
return -1;
}
} else {
- LOGW("Invalid PairwiseCiphersMask value '%s'", v_token);
+ ALOGW("Invalid PairwiseCiphersMask value '%s'", v_token);
errno = EINVAL;
free(v_tmp);
return -1;
@@ -638,7 +638,7 @@
char *v_next = v_tmp;
char *v_token;
-// LOGD("parseGroupCiphersMask(%s)", buffer);
+// ALOGD("parseGroupCiphersMask(%s)", buffer);
*mask = 0;
while((v_token = strsep(&v_next, " "))) {
@@ -651,7 +651,7 @@
else if (!strcasecmp(v_token, "CCMP"))
*mask |= GroupCiphersMask::CCMP;
else {
- LOGW("Invalid GroupCiphersMask value '%s'", v_token);
+ ALOGW("Invalid GroupCiphersMask value '%s'", v_token);
errno = EINVAL;
free(v_tmp);
return -1;
diff --git a/nexus/WifiScanner.cpp b/nexus/WifiScanner.cpp
index bdfa497..9854ddc 100644
--- a/nexus/WifiScanner.cpp
+++ b/nexus/WifiScanner.cpp
@@ -74,7 +74,7 @@
}
void WifiScanner::run() {
- LOGD("Starting wifi scanner (active = %d)", mActive);
+ ALOGD("Starting wifi scanner (active = %d)", mActive);
while(1) {
fd_set read_fds;
@@ -88,7 +88,7 @@
FD_SET(mCtrlPipe[0], &read_fds);
if (mSuppl->triggerScan(mActive)) {
- LOGW("Error triggering scan (%s)", strerror(errno));
+ ALOGW("Error triggering scan (%s)", strerror(errno));
}
if ((rc = select(mCtrlPipe[0] + 1, &read_fds, NULL, NULL, &to)) < 0) {
@@ -99,5 +99,5 @@
} else if (FD_ISSET(mCtrlPipe[0], &read_fds))
break;
} // while
- LOGD("Stopping wifi scanner");
+ ALOGD("Stopping wifi scanner");
}
diff --git a/nexus/WifiStatusPoller.cpp b/nexus/WifiStatusPoller.cpp
index cf71733..e938fd0 100644
--- a/nexus/WifiStatusPoller.cpp
+++ b/nexus/WifiStatusPoller.cpp
@@ -68,10 +68,10 @@
WifiStatusPoller *me = reinterpret_cast<WifiStatusPoller *>(obj);
me->mStarted = true;
- LOGD("Starting");
+ ALOGD("Starting");
me->run();
me->mStarted = false;
- LOGD("Stopping");
+ ALOGD("Stopping");
pthread_exit(NULL);
return NULL;
}
diff --git a/nexus/main.cpp b/nexus/main.cpp
index 936d33f..5d21067 100644
--- a/nexus/main.cpp
+++ b/nexus/main.cpp
@@ -28,7 +28,7 @@
#include "TiwlanWifiController.h"
int main() {
- LOGI("Nexus version 0.1 firing up");
+ ALOGI("Nexus version 0.1 firing up");
CommandListener *cl = new CommandListener();
@@ -62,6 +62,6 @@
sleep(1000);
}
- LOGI("Nexus exiting");
+ ALOGI("Nexus exiting");
exit(0);
}