Loading liblog/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -108,7 +108,9 @@ cc_library { }, cflags: [ "-Wall", "-Werror", "-Wextra", // This is what we want to do: // liblog_cflags := $(shell \ // sed -n \ Loading liblog/log_event_list.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ android_log_context create_android_logger(uint32_t tag) { android_log_context create_android_log_parser(const char* msg, size_t len) { android_log_context_internal* context; size_t i; context = static_cast<android_log_context_internal*>(calloc(1, sizeof(android_log_context_internal))); Loading liblog/logger_write.cpp +1 −31 Original line number Diff line number Diff line Loading @@ -39,13 +39,6 @@ static int __write_to_log_init(log_id_t, struct iovec* vec, size_t nr); static int (*write_to_log)(log_id_t, struct iovec* vec, size_t nr) = __write_to_log_init; /* * This is used by the C++ code to decide if it should write logs through * the C code. Basically, if /dev/socket/logd is available, we're running in * the simulator rather than a desktop tool and want to use the device. */ static enum { kLogUninitialized, kLogNotAvailable, kLogAvailable } g_log_status = kLogUninitialized; static int check_log_uid_permissions() { #if defined(__ANDROID__) uid_t uid = __android_log_uid(); Loading Loading @@ -104,22 +97,6 @@ static void __android_log_cache_available(struct android_log_transport_write* no } } extern "C" int __android_log_dev_available() { struct android_log_transport_write* node; if (list_empty(&__android_log_transport_write)) { return kLogUninitialized; } write_transport_for_each(node, &__android_log_transport_write) { __android_log_cache_available(node); if (node->logMask) { return kLogAvailable; } } return kLogNotAvailable; } #if defined(__ANDROID__) static atomic_uintptr_t tagMap; #endif Loading Loading @@ -228,13 +205,6 @@ static int __write_to_log_initialize() { return ret; } /* * Extract a 4-byte value from a byte stream. le32toh open coded */ static inline uint32_t get4LE(const uint8_t* src) { return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24); } static int __write_to_log_daemon(log_id_t log_id, struct iovec* vec, size_t nr) { struct android_log_transport_write* node; int ret, save_errno; Loading Loading @@ -302,7 +272,7 @@ static int __write_to_log_daemon(log_id_t log_id, struct iovec* vec, size_t nr) } } if (m && (m != (EventTagMap*)(uintptr_t)-1LL)) { tag = android_lookupEventTag_len(m, &len, get4LE(static_cast<uint8_t*>(vec[0].iov_base))); tag = android_lookupEventTag_len(m, &len, *static_cast<uint32_t*>(vec[0].iov_base)); } ret = __android_log_is_loggable_len(ANDROID_LOG_INFO, tag, len, ANDROID_LOG_VERBOSE); if (f) { /* local copy marked for close */ Loading liblog/logprint.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -291,8 +291,10 @@ int android_log_setPrintFormat(AndroidLogFormat* p_format, AndroidLogPrintFormat return 1; } #ifndef __MINGW32__ static const char tz[] = "TZ"; static const char utc[] = "UTC"; #endif /** * Returns FORMAT_OFF on invalid string Loading Loading @@ -1189,6 +1191,7 @@ size_t convertPrintable(char* p, const char* message, size_t messageLen) { return p - begin; } #ifdef __ANDROID__ static char* readSeconds(char* e, struct timespec* t) { unsigned long multiplier; char* p; Loading Loading @@ -1229,7 +1232,6 @@ static long long nsecTimespec(struct timespec* now) { return (long long)now->tv_sec * NS_PER_SEC + now->tv_nsec; } #ifdef __ANDROID__ static void convertMonotonic(struct timespec* result, const AndroidLogEntry* entry) { struct listnode* node; struct conversionList { Loading liblog/pmsg_reader.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,6 @@ static int pmsgRead(struct android_log_logger_list* logger_list, ssize_t ret; off_t current, next; uid_t uid; struct android_log_logger* logger; struct __attribute__((__packed__)) { android_pmsg_log_header_t p; android_log_header_t l; Loading Loading
liblog/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -108,7 +108,9 @@ cc_library { }, cflags: [ "-Wall", "-Werror", "-Wextra", // This is what we want to do: // liblog_cflags := $(shell \ // sed -n \ Loading
liblog/log_event_list.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -88,7 +88,6 @@ android_log_context create_android_logger(uint32_t tag) { android_log_context create_android_log_parser(const char* msg, size_t len) { android_log_context_internal* context; size_t i; context = static_cast<android_log_context_internal*>(calloc(1, sizeof(android_log_context_internal))); Loading
liblog/logger_write.cpp +1 −31 Original line number Diff line number Diff line Loading @@ -39,13 +39,6 @@ static int __write_to_log_init(log_id_t, struct iovec* vec, size_t nr); static int (*write_to_log)(log_id_t, struct iovec* vec, size_t nr) = __write_to_log_init; /* * This is used by the C++ code to decide if it should write logs through * the C code. Basically, if /dev/socket/logd is available, we're running in * the simulator rather than a desktop tool and want to use the device. */ static enum { kLogUninitialized, kLogNotAvailable, kLogAvailable } g_log_status = kLogUninitialized; static int check_log_uid_permissions() { #if defined(__ANDROID__) uid_t uid = __android_log_uid(); Loading Loading @@ -104,22 +97,6 @@ static void __android_log_cache_available(struct android_log_transport_write* no } } extern "C" int __android_log_dev_available() { struct android_log_transport_write* node; if (list_empty(&__android_log_transport_write)) { return kLogUninitialized; } write_transport_for_each(node, &__android_log_transport_write) { __android_log_cache_available(node); if (node->logMask) { return kLogAvailable; } } return kLogNotAvailable; } #if defined(__ANDROID__) static atomic_uintptr_t tagMap; #endif Loading Loading @@ -228,13 +205,6 @@ static int __write_to_log_initialize() { return ret; } /* * Extract a 4-byte value from a byte stream. le32toh open coded */ static inline uint32_t get4LE(const uint8_t* src) { return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24); } static int __write_to_log_daemon(log_id_t log_id, struct iovec* vec, size_t nr) { struct android_log_transport_write* node; int ret, save_errno; Loading Loading @@ -302,7 +272,7 @@ static int __write_to_log_daemon(log_id_t log_id, struct iovec* vec, size_t nr) } } if (m && (m != (EventTagMap*)(uintptr_t)-1LL)) { tag = android_lookupEventTag_len(m, &len, get4LE(static_cast<uint8_t*>(vec[0].iov_base))); tag = android_lookupEventTag_len(m, &len, *static_cast<uint32_t*>(vec[0].iov_base)); } ret = __android_log_is_loggable_len(ANDROID_LOG_INFO, tag, len, ANDROID_LOG_VERBOSE); if (f) { /* local copy marked for close */ Loading
liblog/logprint.cpp +3 −1 Original line number Diff line number Diff line Loading @@ -291,8 +291,10 @@ int android_log_setPrintFormat(AndroidLogFormat* p_format, AndroidLogPrintFormat return 1; } #ifndef __MINGW32__ static const char tz[] = "TZ"; static const char utc[] = "UTC"; #endif /** * Returns FORMAT_OFF on invalid string Loading Loading @@ -1189,6 +1191,7 @@ size_t convertPrintable(char* p, const char* message, size_t messageLen) { return p - begin; } #ifdef __ANDROID__ static char* readSeconds(char* e, struct timespec* t) { unsigned long multiplier; char* p; Loading Loading @@ -1229,7 +1232,6 @@ static long long nsecTimespec(struct timespec* now) { return (long long)now->tv_sec * NS_PER_SEC + now->tv_nsec; } #ifdef __ANDROID__ static void convertMonotonic(struct timespec* result, const AndroidLogEntry* entry) { struct listnode* node; struct conversionList { Loading
liblog/pmsg_reader.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -130,7 +130,6 @@ static int pmsgRead(struct android_log_logger_list* logger_list, ssize_t ret; off_t current, next; uid_t uid; struct android_log_logger* logger; struct __attribute__((__packed__)) { android_pmsg_log_header_t p; android_log_header_t l; Loading