diff --git a/libcutils/trace-dev.inc b/libcutils/trace-dev.inc index e3da77bec..fc7a870f7 100644 --- a/libcutils/trace-dev.inc +++ b/libcutils/trace-dev.inc @@ -32,7 +32,6 @@ #include #include #include -#include /** * Maximum size of a message that can be logged to the trace buffer. diff --git a/liblog/include_vndk/log/log.h b/liblog/include_vndk/log/log.h index a79beecd4..393b48060 100644 --- a/liblog/include_vndk/log/log.h +++ b/liblog/include_vndk/log/log.h @@ -1,13 +1,11 @@ /*Special log.h file for VNDK linking modules*/ -#ifndef _LIBS_LOG_LOG_H -#define _LIBS_LOG_LOG_H +#pragma once #include #include #include #include -#include #include #include #include @@ -22,4 +20,16 @@ #define LOG_TAG NULL #endif -#endif /*_LIBS_LOG_LOG_H*/ +// Legacy dependencies... +/* deal with possible sys/cdefs.h conflict with fcntl.h */ +#ifdef __unused +#define __unused_defined __unused +#undef __unused +#endif + +#include /* Pick up O_* macros */ + +/* restore definitions from above */ +#ifdef __unused_defined +#define __unused __attribute__((__unused__)) +#endif diff --git a/liblog/include_vndk/log/log_event_list.h b/liblog/include_vndk/log/log_event_list.h index 1f3dd377b..81c879f54 100644 --- a/liblog/include_vndk/log/log_event_list.h +++ b/liblog/include_vndk/log/log_event_list.h @@ -16,8 +16,7 @@ /* Special log_event_list.h file for VNDK linking modules */ -#ifndef _LIBS_LOG_EVENT_LIST_H -#define _LIBS_LOG_EVENT_LIST_H +#pragma once #include @@ -30,10 +29,7 @@ extern "C" { /* * The opaque context used to manipulate lists of events. */ -#ifndef __android_log_context_defined -#define __android_log_context_defined typedef struct android_log_context_internal* android_log_context; -#endif /* * Creates a context associated with an event tag to write elements to @@ -61,18 +57,9 @@ int android_log_write_float32(android_log_context ctx, float value); /* NB: LOG_ID_EVENTS and LOG_ID_SECURITY only valid binary buffers */ int android_log_write_list(android_log_context ctx, log_id_t id); -/* Reset writer context */ -int android_log_reset(android_log_context ctx); - -/* Reset reader context */ -int android_log_parser_reset(android_log_context ctx, - const char* msg, size_t len); - /* Finished with reader or writer context */ int android_log_destroy(android_log_context* ctx); #ifdef __cplusplus } #endif - -#endif /* _LIBS_LOG_EVENT_LIST_H */ diff --git a/liblog/include_vndk/log/log_id.h b/liblog/include_vndk/log/log_id.h deleted file mode 120000 index dce92b991..000000000 --- a/liblog/include_vndk/log/log_id.h +++ /dev/null @@ -1 +0,0 @@ -../../include/log/log_id.h \ No newline at end of file diff --git a/liblog/include_vndk/log/log_id.h b/liblog/include_vndk/log/log_id.h new file mode 100644 index 000000000..3c6df8b72 --- /dev/null +++ b/liblog/include_vndk/log/log_id.h @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2005-2017 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Send a simple string to the log. + */ +int __android_log_buf_write(int bufID, int prio, const char* tag, const char* text); +int __android_log_buf_print(int bufID, int prio, const char* tag, const char* fmt, ...) + __attribute__((__format__(printf, 4, 5))); + +#ifdef __cplusplus +} +#endif diff --git a/liblog/include_vndk/log/log_properties.h b/liblog/include_vndk/log/log_properties.h deleted file mode 120000 index bbec42614..000000000 --- a/liblog/include_vndk/log/log_properties.h +++ /dev/null @@ -1 +0,0 @@ -../../include/log/log_properties.h \ No newline at end of file diff --git a/liblog/include_vndk/log/log_read.h b/liblog/include_vndk/log/log_read.h deleted file mode 120000 index 01de8b9ec..000000000 --- a/liblog/include_vndk/log/log_read.h +++ /dev/null @@ -1 +0,0 @@ -../../include/log/log_read.h \ No newline at end of file diff --git a/liblog/include_vndk/log/log_time.h b/liblog/include_vndk/log/log_time.h index 5a09959a7..014af0897 100644 --- a/liblog/include_vndk/log/log_time.h +++ b/liblog/include_vndk/log/log_time.h @@ -14,8 +14,7 @@ * limitations under the License. */ -#ifndef _LIBS_LOG_LOG_TIME_H -#define _LIBS_LOG_LOG_TIME_H +#pragma once #include @@ -30,9 +29,6 @@ #define MS_PER_SEC 1000ULL #endif -#ifndef __struct_log_time_defined -#define __struct_log_time_defined - #define LOG_TIME_SEC(t) ((t)->tv_sec) /* next power of two after NS_PER_SEC */ #define LOG_TIME_NSEC(t) ((t)->tv_nsec & (UINT32_MAX >> 2)) @@ -41,7 +37,3 @@ typedef struct log_time { uint32_t tv_sec; uint32_t tv_nsec; } __attribute__((__packed__)) log_time; - -#endif - -#endif /* _LIBS_LOG_LOG_TIME_H */ diff --git a/liblog/liblog.map.txt b/liblog/liblog.map.txt index ce4c53c82..ece8b7563 100644 --- a/liblog/liblog.map.txt +++ b/liblog/liblog.map.txt @@ -1,7 +1,5 @@ LIBLOG { global: - android_name_to_log_id; # vndk - android_log_id_to_name; # vndk __android_log_assert; __android_log_buf_print; __android_log_buf_write; @@ -14,25 +12,15 @@ LIBLOG { LIBLOG_L { global: - android_logger_clear; # vndk - android_logger_get_id; # vndk - android_logger_get_log_readable_size; # vndk - android_logger_get_log_version; # vndk - android_logger_get_log_size; # vndk - android_logger_list_alloc; # apex vndk - android_logger_list_alloc_time; # apex vndk - android_logger_list_free; # apex vndk - android_logger_list_open; # vndk - android_logger_list_read; # apex vndk - android_logger_open; # apex vndk - android_logger_set_log_size; # vndk + android_logger_list_alloc; # apex + android_logger_list_alloc_time; # apex + android_logger_list_free; # apex + android_logger_list_read; # apex + android_logger_open; # apex }; LIBLOG_M { global: - android_logger_get_prune_list; # vndk - android_logger_set_prune_list; # vndk - android_logger_get_statistics; # vndk __android_log_error_write; # apex vndk __android_log_is_loggable; create_android_logger; # apex vndk @@ -51,7 +39,6 @@ LIBLOG_M { LIBLOG_O { global: __android_log_is_loggable_len; - __android_log_is_debuggable; # vndk }; LIBLOG_Q { @@ -61,21 +48,24 @@ LIBLOG_Q { __android_log_bwrite; # apex __android_log_close; # apex __android_log_security; # apex - android_log_reset; #vndk - android_log_parser_reset; #vndk }; LIBLOG_PRIVATE { global: + __android_log_is_debuggable; __android_log_pmsg_file_read; __android_log_pmsg_file_write; __android_log_security_bswrite; __android_logger_get_buffer_size; __android_logger_property_get_bool; + android_name_to_log_id; android_openEventTagMap; + android_logger_list_open; + android_log_id_to_name; android_log_processBinaryLogBuffer; android_log_processLogBuffer; android_log_read_next; + android_log_reset; android_log_write_list_buffer; android_lookupEventTagNum; create_android_log_parser;