Loading liblog/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ liblog_sources = [ "logger_read.cpp", "logger_write.cpp", "logprint.cpp", "stderr_write.cpp", ] liblog_host_sources = [ "fake_log_device.cpp", Loading Loading @@ -108,7 +107,9 @@ cc_library { }, cflags: [ "-Wall", "-Werror", "-Wextra", // This is what we want to do: // liblog_cflags := $(shell \ // sed -n \ Loading liblog/config_write.cpp +0 −21 Original line number Diff line number Diff line Loading @@ -66,27 +66,6 @@ void __android_log_config_write() { __android_log_add_transport(&__android_log_transport_write, &fakeLoggerWrite); #endif } if (__android_log_transport & LOGGER_STDERR) { extern struct android_log_transport_write stderrLoggerWrite; /* * stderr logger should be primary if we can be the only one, or if * already in the primary list. Otherwise land in the persist list. * Remember we can be called here if we are already initialized. */ if (list_empty(&__android_log_transport_write)) { __android_log_add_transport(&__android_log_transport_write, &stderrLoggerWrite); } else { struct android_log_transport_write* transp; write_transport_for_each(transp, &__android_log_transport_write) { if (transp == &stderrLoggerWrite) { return; } } __android_log_add_transport(&__android_log_persist_write, &stderrLoggerWrite); } } } void __android_log_config_write_close() { Loading liblog/include/log/log_transport.h +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ extern "C" { #define LOGGER_KERNEL 0x02 /* Reserved/Deprecated */ #define LOGGER_NULL 0x04 /* Does not release resources of other selections */ #define LOGGER_RESERVED 0x08 /* Reserved, previously for logging to local memory */ #define LOGGER_STDERR 0x10 /* logs sent to stderr */ #define LOGGER_RESERVED2 0x10 /* Reserved, previously for logs sent to stderr */ /* clang-format on */ /* Both return the selected transport flag mask, or negative errno */ Loading liblog/log_event_list.cpp +3 −20 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 Loading @@ -400,22 +399,6 @@ int android_log_write_list_buffer(android_log_context ctx, const char** buffer) return len; } /* * Extract a 4-byte value from a byte stream. */ static inline uint32_t get4LE(const uint8_t* src) { return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24); } /* * Extract an 8-byte value from a byte stream. */ static inline uint64_t get8LE(const uint8_t* src) { uint32_t low = src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24); uint32_t high = src[4] | (src[5] << 8) | (src[6] << 16) | (src[7] << 24); return ((uint64_t)high << 32) | (uint64_t)low; } /* * Gets the next element. Parsing errors result in an EVENT_TYPE_UNKNOWN type. * If there is nothing to process, the complete field is set to non-zero. If Loading Loading @@ -489,7 +472,7 @@ static android_log_list_element android_log_read_next_internal(android_log_conte elem.type = EVENT_TYPE_UNKNOWN; return elem; } elem.data.int32 = get4LE(&context->storage[pos]); elem.data.int32 = *reinterpret_cast<int32_t*>(&context->storage[pos]); /* common tangeable object suffix */ pos += elem.len; elem.complete = !context->list_nest_depth && !context->count[0]; Loading @@ -508,7 +491,7 @@ static android_log_list_element android_log_read_next_internal(android_log_conte elem.type = EVENT_TYPE_UNKNOWN; return elem; } elem.data.int64 = get8LE(&context->storage[pos]); elem.data.int64 = *reinterpret_cast<int64_t*>(&context->storage[pos]); /* common tangeable object suffix */ pos += elem.len; elem.complete = !context->list_nest_depth && !context->count[0]; Loading @@ -527,7 +510,7 @@ static android_log_list_element android_log_read_next_internal(android_log_conte elem.complete = true; return elem; } elem.len = get4LE(&context->storage[pos]); elem.len = *reinterpret_cast<int32_t*>(&context->storage[pos]); pos += sizeof(int32_t); if ((pos + elem.len) > context->len) { elem.len = context->len - pos; /* truncate string */ Loading liblog/logd_reader.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ * limitations under the License. */ #include <endian.h> #include <errno.h> #include <fcntl.h> #include <inttypes.h> Loading Loading
liblog/Android.bp +2 −1 Original line number Diff line number Diff line Loading @@ -23,7 +23,6 @@ liblog_sources = [ "logger_read.cpp", "logger_write.cpp", "logprint.cpp", "stderr_write.cpp", ] liblog_host_sources = [ "fake_log_device.cpp", Loading Loading @@ -108,7 +107,9 @@ cc_library { }, cflags: [ "-Wall", "-Werror", "-Wextra", // This is what we want to do: // liblog_cflags := $(shell \ // sed -n \ Loading
liblog/config_write.cpp +0 −21 Original line number Diff line number Diff line Loading @@ -66,27 +66,6 @@ void __android_log_config_write() { __android_log_add_transport(&__android_log_transport_write, &fakeLoggerWrite); #endif } if (__android_log_transport & LOGGER_STDERR) { extern struct android_log_transport_write stderrLoggerWrite; /* * stderr logger should be primary if we can be the only one, or if * already in the primary list. Otherwise land in the persist list. * Remember we can be called here if we are already initialized. */ if (list_empty(&__android_log_transport_write)) { __android_log_add_transport(&__android_log_transport_write, &stderrLoggerWrite); } else { struct android_log_transport_write* transp; write_transport_for_each(transp, &__android_log_transport_write) { if (transp == &stderrLoggerWrite) { return; } } __android_log_add_transport(&__android_log_persist_write, &stderrLoggerWrite); } } } void __android_log_config_write_close() { Loading
liblog/include/log/log_transport.h +1 −1 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ extern "C" { #define LOGGER_KERNEL 0x02 /* Reserved/Deprecated */ #define LOGGER_NULL 0x04 /* Does not release resources of other selections */ #define LOGGER_RESERVED 0x08 /* Reserved, previously for logging to local memory */ #define LOGGER_STDERR 0x10 /* logs sent to stderr */ #define LOGGER_RESERVED2 0x10 /* Reserved, previously for logs sent to stderr */ /* clang-format on */ /* Both return the selected transport flag mask, or negative errno */ Loading
liblog/log_event_list.cpp +3 −20 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 Loading @@ -400,22 +399,6 @@ int android_log_write_list_buffer(android_log_context ctx, const char** buffer) return len; } /* * Extract a 4-byte value from a byte stream. */ static inline uint32_t get4LE(const uint8_t* src) { return src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24); } /* * Extract an 8-byte value from a byte stream. */ static inline uint64_t get8LE(const uint8_t* src) { uint32_t low = src[0] | (src[1] << 8) | (src[2] << 16) | (src[3] << 24); uint32_t high = src[4] | (src[5] << 8) | (src[6] << 16) | (src[7] << 24); return ((uint64_t)high << 32) | (uint64_t)low; } /* * Gets the next element. Parsing errors result in an EVENT_TYPE_UNKNOWN type. * If there is nothing to process, the complete field is set to non-zero. If Loading Loading @@ -489,7 +472,7 @@ static android_log_list_element android_log_read_next_internal(android_log_conte elem.type = EVENT_TYPE_UNKNOWN; return elem; } elem.data.int32 = get4LE(&context->storage[pos]); elem.data.int32 = *reinterpret_cast<int32_t*>(&context->storage[pos]); /* common tangeable object suffix */ pos += elem.len; elem.complete = !context->list_nest_depth && !context->count[0]; Loading @@ -508,7 +491,7 @@ static android_log_list_element android_log_read_next_internal(android_log_conte elem.type = EVENT_TYPE_UNKNOWN; return elem; } elem.data.int64 = get8LE(&context->storage[pos]); elem.data.int64 = *reinterpret_cast<int64_t*>(&context->storage[pos]); /* common tangeable object suffix */ pos += elem.len; elem.complete = !context->list_nest_depth && !context->count[0]; Loading @@ -527,7 +510,7 @@ static android_log_list_element android_log_read_next_internal(android_log_conte elem.complete = true; return elem; } elem.len = get4LE(&context->storage[pos]); elem.len = *reinterpret_cast<int32_t*>(&context->storage[pos]); pos += sizeof(int32_t); if ((pos + elem.len) > context->len) { elem.len = context->len - pos; /* truncate string */ Loading
liblog/logd_reader.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ * limitations under the License. */ #include <endian.h> #include <errno.h> #include <fcntl.h> #include <inttypes.h> Loading