diff options
author | Mark Salyzyn <salyzyn@google.com> | 2015-01-26 10:46:44 -0800 |
---|---|---|
committer | Mark Salyzyn <salyzyn@google.com> | 2015-02-25 17:44:18 +0000 |
commit | 2d3f38a6b8e724749b59d201a01b35fa0951141e (patch) | |
tree | 99855d3dd759307ced68e36ad7206747e55bf51d /liblog/README | |
parent | 72bf2a710089b5fff42059d5946fe7bdd6b12480 (diff) | |
download | system_core-2d3f38a6b8e724749b59d201a01b35fa0951141e.zip system_core-2d3f38a6b8e724749b59d201a01b35fa0951141e.tar.gz system_core-2d3f38a6b8e724749b59d201a01b35fa0951141e.tar.bz2 |
liblog: introduce ANDROID_LOG_* flags
Move away from using POSIX open(2) flags and introduce ANDROID_LOG_* flags to
replace them. Add security by preventing random mode flags from getting into
underlying POSIX calls. ANDROID_LOG_* flags overlap POSIX O_* flag definitions.
Change-Id: Ib32bb64c287e8bf150be62242e1ba46bb37839fc
Diffstat (limited to 'liblog/README')
-rw-r--r-- | liblog/README | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/liblog/README b/liblog/README index d7472e4..0676aec 100644 --- a/liblog/README +++ b/liblog/README @@ -111,20 +111,21 @@ DESCRIPTION ger_list_alloc, calling in turn the android_logger_open for each log id. Each entry can be retrieved with android_logger_list_read. The log(s) can be closed with android_logger_list_free. The logs should be - opened with an O_RDONLY mode. O_NDELAY mode will report when the log - reading is done with an EAGAIN error return code, otherwise the - android_logger_list_read call will block for new entries. + opened with an ANDROID_LOG_RDONLY mode. ANDROID_LOG_NONBLOCK mode + will report when the log reading is done with an EAGAIN error return + code, otherwise the android_logger_list_read call will block for new + entries. The value returned by android_logger_open can be used as a parameter to the android_logger_clear function to empty the sub-log. It is recom‐ - mended to only open log O_WRONLY. + mended to only open log ANDROID_LOG_WRONLY in that case. The value returned by android_logger_open can be used as a parameter to the android_logger_get_log_(size|readable_size|version) to retrieve the sub-log maximum size, readable size and log buffer format protocol ver‐ sion respectively. android_logger_get_id returns the id that was used - when opening the sub-log. It is recommended to open the log O_RDONLY - in these cases. + when opening the sub-log. It is recommended to open the log + ANDROID_LOG_RDONLY in these cases. SEE ALSO syslogd(8) |