am 69f4cd7f: (-s ours) Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
* commit '69f4cd7f5add7a7c7f5915e5292aab7eb2a42e9f':
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
diff --git a/include/cutils/log.h b/include/cutils/log.h
index 0e63809..42d7382 100644
--- a/include/cutils/log.h
+++ b/include/cutils/log.h
@@ -47,7 +47,7 @@
// ---------------------------------------------------------------------
/*
- * Normally we strip ALOGV (VERBOSE messages) from release builds.
+ * Normally we strip LOGV (VERBOSE messages) from release builds.
* You can modify this (for example with "#define LOG_NDEBUG 0"
* at the top of your source file) to change that behavior.
*/
@@ -73,23 +73,23 @@
/*
* Simplified macro to send a verbose log message using the current LOG_TAG.
*/
-#ifndef ALOGV
+#ifndef LOGV
#if LOG_NDEBUG
-#define ALOGV(...) ((void)0)
+#define LOGV(...) ((void)0)
#else
-#define ALOGV(...) ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
+#define LOGV(...) ((void)LOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__))
#endif
#endif
#define CONDITION(cond) (__builtin_expect((cond)!=0, 0))
-#ifndef ALOGV_IF
+#ifndef LOGV_IF
#if LOG_NDEBUG
-#define ALOGV_IF(cond, ...) ((void)0)
+#define LOGV_IF(cond, ...) ((void)0)
#else
-#define ALOGV_IF(cond, ...) \
+#define LOGV_IF(cond, ...) \
( (CONDITION(cond)) \
- ? ((void)ALOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)LOG(LOG_VERBOSE, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
#endif
@@ -98,13 +98,13 @@
* 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__))
+#define LOGD(...) ((void)LOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__))
#endif
#ifndef LOGD_IF
#define LOGD_IF(cond, ...) \
( (CONDITION(cond)) \
- ? ((void)ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)LOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
@@ -112,13 +112,13 @@
* 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__))
+#define LOGI(...) ((void)LOG(LOG_INFO, LOG_TAG, __VA_ARGS__))
#endif
#ifndef LOGI_IF
#define LOGI_IF(cond, ...) \
( (CONDITION(cond)) \
- ? ((void)ALOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)LOG(LOG_INFO, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
@@ -126,13 +126,13 @@
* 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__))
+#define LOGW(...) ((void)LOG(LOG_WARN, LOG_TAG, __VA_ARGS__))
#endif
#ifndef LOGW_IF
#define LOGW_IF(cond, ...) \
( (CONDITION(cond)) \
- ? ((void)ALOG(LOG_WARN, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)LOG(LOG_WARN, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
@@ -140,13 +140,13 @@
* Simplified macro to send an error log message using the current LOG_TAG.
*/
#ifndef LOGE
-#define LOGE(...) ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
+#define LOGE(...) ((void)LOG(LOG_ERROR, LOG_TAG, __VA_ARGS__))
#endif
#ifndef LOGE_IF
#define LOGE_IF(cond, ...) \
( (CONDITION(cond)) \
- ? ((void)ALOG(LOG_ERROR, LOG_TAG, __VA_ARGS__)) \
+ ? ((void)LOG(LOG_ERROR, LOG_TAG, __VA_ARGS__)) \
: (void)0 )
#endif
@@ -156,11 +156,11 @@
* Conditional based on whether the current LOG_TAG is enabled at
* verbose priority.
*/
-#ifndef IF_ALOGV
+#ifndef IF_LOGV
#if LOG_NDEBUG
-#define IF_ALOGV() if (false)
+#define IF_LOGV() if (false)
#else
-#define IF_ALOGV() IF_ALOG(LOG_VERBOSE, LOG_TAG)
+#define IF_LOGV() IF_LOG(LOG_VERBOSE, LOG_TAG)
#endif
#endif
@@ -169,7 +169,7 @@
* debug priority.
*/
#ifndef IF_LOGD
-#define IF_LOGD() IF_ALOG(LOG_DEBUG, LOG_TAG)
+#define IF_LOGD() IF_LOG(LOG_DEBUG, LOG_TAG)
#endif
/*
@@ -177,7 +177,7 @@
* info priority.
*/
#ifndef IF_LOGI
-#define IF_LOGI() IF_ALOG(LOG_INFO, LOG_TAG)
+#define IF_LOGI() IF_LOG(LOG_INFO, LOG_TAG)
#endif
/*
@@ -185,7 +185,7 @@
* warn priority.
*/
#ifndef IF_LOGW
-#define IF_LOGW() IF_ALOG(LOG_WARN, LOG_TAG)
+#define IF_LOGW() IF_LOG(LOG_WARN, LOG_TAG)
#endif
/*
@@ -193,7 +193,7 @@
* error priority.
*/
#ifndef IF_LOGE
-#define IF_LOGE() IF_ALOG(LOG_ERROR, LOG_TAG)
+#define IF_LOGE() IF_LOG(LOG_ERROR, LOG_TAG)
#endif
@@ -340,12 +340,12 @@
* Basic log message macro.
*
* Example:
- * ALOG(LOG_WARN, NULL, "Failed with error %d", errno);
+ * LOG(LOG_WARN, NULL, "Failed with error %d", errno);
*
* The second argument may be NULL or "" to indicate the "global" tag.
*/
-#ifndef ALOG
-#define ALOG(priority, tag, ...) \
+#ifndef LOG
+#define LOG(priority, tag, ...) \
LOG_PRI(ANDROID_##priority, tag, __VA_ARGS__)
#endif
@@ -368,8 +368,8 @@
/*
* Conditional given a desired logging priority and tag.
*/
-#ifndef IF_ALOG
-#define IF_ALOG(priority, tag) \
+#ifndef IF_LOG
+#define IF_LOG(priority, tag) \
if (android_testLog(ANDROID_##priority, tag))
#endif
diff --git a/init/init.c b/init/init.c
index 7b4a963..95ae0bf 100755
--- a/init/init.c
+++ b/init/init.c
@@ -59,12 +59,12 @@
#endif
static char console[32];
-static char serialno[32];
-static char bootmode[32];
-static char baseband[32];
-static char carrier[32];
-static char bootloader[32];
-static char hardware[32];
+static char serialno[PROP_VALUE_MAX];
+static char bootmode[PROP_VALUE_MAX];
+static char baseband[PROP_VALUE_MAX];
+static char carrier[PROP_VALUE_MAX];
+static char bootloader[PROP_VALUE_MAX];
+static char hardware[PROP_VALUE_MAX];
static unsigned revision = 0;
static char qemu[32];
diff --git a/libcorkscrew/arch-arm/backtrace-arm.c b/libcorkscrew/arch-arm/backtrace-arm.c
index 6bed2ae..597662e 100644
--- a/libcorkscrew/arch-arm/backtrace-arm.c
+++ b/libcorkscrew/arch-arm/backtrace-arm.c
@@ -191,7 +191,7 @@
break;
}
}
- ALOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, "
+ LOGV("get_exception_handler: pc=0x%08x, module='%s', module_start=0x%08x, "
"exidx_start=0x%08x, exidx_size=%d, handler=0x%08x",
pc, mi ? mi->name : "<unknown>", mi ? mi->start : 0,
exidx_start, exidx_size, handler);
@@ -227,13 +227,13 @@
break;
}
- ALOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value);
+ LOGV("next_byte: ptr=0x%08x, value=0x%02x", stream->ptr, *out_value);
stream->ptr += 1;
return true;
}
static void set_reg(unwind_state_t* state, uint32_t reg, uint32_t value) {
- ALOGV("set_reg: reg=%d, value=0x%08x", reg, value);
+ LOGV("set_reg: reg=%d, value=0x%08x", reg, value);
state->gregs[reg] = value;
}
diff --git a/libcorkscrew/ptrace.c b/libcorkscrew/ptrace.c
index a308bb5..6ed77c4 100644
--- a/libcorkscrew/ptrace.c
+++ b/libcorkscrew/ptrace.c
@@ -36,7 +36,7 @@
bool try_get_word(pid_t tid, uintptr_t ptr, uint32_t* out_value) {
if (ptr & 3) {
- ALOGV("try_get_word: invalid pointer 0x%08x", ptr);
+ LOGV("try_get_word: invalid pointer 0x%08x", ptr);
*out_value = 0;
return false;
}
@@ -46,7 +46,7 @@
unsigned char vec[1];
while (mincore((void*)(ptr & PAGE_MASK), sizeof(uint32_t), vec)) {
if (errno != EAGAIN && errno != EINTR) {
- ALOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno);
+ LOGV("try_get_word: invalid pointer 0x%08x, mincore() errno=%d", ptr, errno);
*out_value = 0;
return false;
}
@@ -60,7 +60,7 @@
errno = 0;
*out_value = ptrace(PTRACE_PEEKTEXT, tid, (void*)ptr, NULL);
if (*out_value == 0xffffffffL && errno) {
- ALOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno);
+ LOGV("try_get_word: invalid pointer 0x%08x, ptrace() errno=%d", ptr, errno);
*out_value = 0;
return false;
}
diff --git a/libcutils/loghack.h b/libcutils/loghack.h
index 52dfc8c..2bfffe4 100644
--- a/libcutils/loghack.h
+++ b/libcutils/loghack.h
@@ -25,13 +25,13 @@
#include <cutils/log.h>
#else
#include <stdio.h>
-#define ALOG(level, ...) \
+#define LOG(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 LOGE(...) ALOG("E", __VA_ARGS__)
+#define LOGV(...) LOG("V", __VA_ARGS__)
+#define LOGD(...) LOG("D", __VA_ARGS__)
+#define LOGI(...) LOG("I", __VA_ARGS__)
+#define LOGW(...) LOG("W", __VA_ARGS__)
+#define LOGE(...) LOG("E", __VA_ARGS__)
#define LOG_ALWAYS_FATAL(...) do { LOGE(__VA_ARGS__); exit(1); } while (0)
#endif
diff --git a/libcutils/properties.c b/libcutils/properties.c
index 98dbf50..98f356b 100644
--- a/libcutils/properties.c
+++ b/libcutils/properties.c
@@ -130,7 +130,7 @@
if (gPropFd < 0) {
//LOGW("not connected to system property server\n");
} else {
- //ALOGV("Connected to system property server\n");
+ //LOGV("Connected to system property server\n");
}
}
@@ -140,7 +140,7 @@
char recvBuf[1+PROPERTY_VALUE_MAX];
int len = -1;
- //ALOGV("PROPERTY GET [%s]\n", key);
+ //LOGV("PROPERTY GET [%s]\n", key);
pthread_once(&gInitOnce, init);
if (gPropFd < 0) {
@@ -194,7 +194,7 @@
assert(0);
return -1;
}
- //ALOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n",
+ //LOGV("PROP [found=%d def='%s'] (%d) [%s]: [%s]\n",
// recvBuf[0], default_value, len, key, value);
return len;
@@ -207,7 +207,7 @@
char recvBuf[1];
int result = -1;
- //ALOGV("PROPERTY SET [%s]: [%s]\n", key, value);
+ //LOGV("PROPERTY SET [%s]: [%s]\n", key, value);
pthread_once(&gInitOnce, init);
if (gPropFd < 0)
@@ -241,7 +241,7 @@
int property_list(void (*propfn)(const char *key, const char *value, void *cookie),
void *cookie)
{
- //ALOGV("PROPERTY LIST\n");
+ //LOGV("PROPERTY LIST\n");
pthread_once(&gInitOnce, init);
if (gPropFd < 0)
return -1;
diff --git a/libcutils/qtaguid.c b/libcutils/qtaguid.c
index fee67fd..994ad32 100644
--- a/libcutils/qtaguid.c
+++ b/libcutils/qtaguid.c
@@ -60,7 +60,7 @@
static int write_ctrl(const char *cmd) {
int fd, res, savedErrno;
- ALOGV("write_ctrl(%s)", cmd);
+ LOGV("write_ctrl(%s)", cmd);
fd = TEMP_FAILURE_RETRY(open(CTRL_PROCPATH, O_WRONLY));
if (fd < 0) {
@@ -107,7 +107,7 @@
snprintf(lineBuf, sizeof(lineBuf), "t %d %llu %d", sockfd, kTag, uid);
- ALOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
+ LOGV("Tagging socket %d with tag %llx{%u,0} for uid %d", sockfd, kTag, tag, uid);
res = write_ctrl(lineBuf);
if (res < 0) {
@@ -122,7 +122,7 @@
char lineBuf[CTRL_MAX_INPUT_LEN];
int res;
- ALOGV("Untagging socket %d", sockfd);
+ LOGV("Untagging socket %d", sockfd);
snprintf(lineBuf, sizeof(lineBuf), "u %d", sockfd);
res = write_ctrl(lineBuf);
@@ -137,7 +137,7 @@
char lineBuf[CTRL_MAX_INPUT_LEN];
int res;
- ALOGV("Setting counters to set %d for uid %d", counterSetNum, uid);
+ LOGV("Setting counters to set %d for uid %d", counterSetNum, uid);
snprintf(lineBuf, sizeof(lineBuf), "s %d %d", counterSetNum, uid);
res = write_ctrl(lineBuf);
@@ -149,7 +149,7 @@
int fd, cnt = 0, res = 0;
uint64_t kTag = (uint64_t)tag << 32;
- ALOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid);
+ LOGV("Deleting tag data with tag %llx{%d,0} for uid %d", kTag, tag, uid);
pthread_once(&resTrackInitDone, qtaguid_resTrack);
diff --git a/libcutils/str_parms.c b/libcutils/str_parms.c
index 7ea65ce..dfa1f73 100644
--- a/libcutils/str_parms.c
+++ b/libcutils/str_parms.c
@@ -103,7 +103,7 @@
if (!str)
goto err_strdup;
- ALOGV("%s: source string == '%s'\n", __func__, _string);
+ LOGV("%s: source string == '%s'\n", __func__, _string);
kvpair = strtok_r(str, ";", &tmpstr);
while (kvpair && *kvpair) {
@@ -137,7 +137,7 @@
}
if (!items)
- ALOGV("%s: no items found in string\n", __func__);
+ LOGV("%s: no items found in string\n", __func__);
free(str);
diff --git a/libdiskconfig/diskconfig.c b/libdiskconfig/diskconfig.c
index aac3e69..4dd8c52 100644
--- a/libdiskconfig/diskconfig.c
+++ b/libdiskconfig/diskconfig.c
@@ -336,7 +336,7 @@
}
#if 1
- ALOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d",
+ LOGV("Device/file %s: size=%llu bytes, num_lba=%u, sect_size=%d",
dinfo->device, disk_size, dinfo->num_lba, dinfo->sect_size);
#endif
diff --git a/libpixelflinger/tinyutils/VectorImpl.cpp b/libpixelflinger/tinyutils/VectorImpl.cpp
index be3d270..a049706 100644
--- a/libpixelflinger/tinyutils/VectorImpl.cpp
+++ b/libpixelflinger/tinyutils/VectorImpl.cpp
@@ -272,7 +272,7 @@
void* VectorImpl::_grow(size_t where, size_t amount)
{
-// ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
+// LOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
if (where > mCount)
@@ -281,7 +281,7 @@
const size_t new_size = mCount + amount;
if (capacity() < new_size) {
const size_t new_capacity = max(kMinVectorCapacity, ((new_size*3)+1)/2);
-// ALOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
+// LOGV("grow vector %p, new_capacity=%d", this, (int)new_capacity);
if ((mStorage) &&
(mCount==where) &&
(mFlags & HAS_TRIVIAL_COPY) &&
@@ -325,7 +325,7 @@
if (!mStorage)
return;
-// ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
+// LOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
// this, (int)where, (int)amount, (int)mCount, (int)capacity());
if (where >= mCount)
@@ -334,7 +334,7 @@
const size_t new_size = mCount - amount;
if (new_size*3 < capacity()) {
const size_t new_capacity = max(kMinVectorCapacity, new_size*2);
-// ALOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity);
+// LOGV("shrink vector %p, new_capacity=%d", this, (int)new_capacity);
if ((where == mCount-amount) &&
(mFlags & HAS_TRIVIAL_COPY) &&
(mFlags & HAS_TRIVIAL_DTOR))
diff --git a/logwrapper/logwrapper.c b/logwrapper/logwrapper.c
index 6a80560..bdf53e8 100644
--- a/logwrapper/logwrapper.c
+++ b/logwrapper/logwrapper.c
@@ -28,7 +28,7 @@
void fatal(const char *msg) {
fprintf(stderr, "%s", msg);
- ALOG(LOG_ERROR, "logwrapper", "%s", msg);
+ LOG(LOG_ERROR, "logwrapper", "%s", msg);
exit(-1);
}
@@ -60,7 +60,7 @@
buffer[b] = '\0';
} else if (buffer[b] == '\n') {
buffer[b] = '\0';
- ALOG(LOG_INFO, tag, "%s", &buffer[a]);
+ LOG(LOG_INFO, tag, "%s", &buffer[a]);
a = b + 1;
}
}
@@ -68,7 +68,7 @@
if (a == 0 && b == sizeof(buffer) - 1) {
// buffer is full, flush
buffer[b] = '\0';
- ALOG(LOG_INFO, tag, "%s", &buffer[a]);
+ LOG(LOG_INFO, tag, "%s", &buffer[a]);
b = 0;
} else if (a != b) {
// Keep left-overs
@@ -84,21 +84,21 @@
// Flush remaining data
if (a != b) {
buffer[b] = '\0';
- ALOG(LOG_INFO, tag, "%s", &buffer[a]);
+ LOG(LOG_INFO, tag, "%s", &buffer[a]);
}
status = 0xAAAA;
if (wait(&status) != -1) { // Wait for child
if (WIFEXITED(status))
- ALOG(LOG_INFO, "logwrapper", "%s terminated by exit(%d)", tag,
+ LOG(LOG_INFO, "logwrapper", "%s terminated by exit(%d)", tag,
WEXITSTATUS(status));
else if (WIFSIGNALED(status))
- ALOG(LOG_INFO, "logwrapper", "%s terminated by signal %d", tag,
+ LOG(LOG_INFO, "logwrapper", "%s terminated by signal %d", tag,
WTERMSIG(status));
else if (WIFSTOPPED(status))
- ALOG(LOG_INFO, "logwrapper", "%s stopped by signal %d", tag,
+ LOG(LOG_INFO, "logwrapper", "%s stopped by signal %d", tag,
WSTOPSIG(status));
} else
- ALOG(LOG_INFO, "logwrapper", "%s wait() failed: %s (%d)", tag,
+ LOG(LOG_INFO, "logwrapper", "%s wait() failed: %s (%d)", tag,
strerror(errno), errno);
if (seg_fault_on_exit)
*(int *)status = 0; // causes SIGSEGV with fault_address = status
@@ -111,7 +111,7 @@
argv_child[argc] = NULL;
if (execvp(argv_child[0], argv_child)) {
- ALOG(LOG_ERROR, "logwrapper",
+ LOG(LOG_ERROR, "logwrapper",
"executing %s failed: %s\n", argv_child[0], strerror(errno));
exit(-1);
}