summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn2015-01-26 12:46:44 -0600
committerMark Salyzyn2015-02-25 11:44:18 -0600
commit2d3f38a6b8e724749b59d201a01b35fa0951141e (patch)
tree99855d3dd759307ced68e36ad7206747e55bf51d /liblog/README
parent72bf2a710089b5fff42059d5946fe7bdd6b12480 (diff)
downloadplatform-system-core-2d3f38a6b8e724749b59d201a01b35fa0951141e.tar.gz
platform-system-core-2d3f38a6b8e724749b59d201a01b35fa0951141e.tar.xz
platform-system-core-2d3f38a6b8e724749b59d201a01b35fa0951141e.zip
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/README13
1 files changed, 7 insertions, 6 deletions
diff --git a/liblog/README b/liblog/README
index d7472e4a1..0676aecb8 100644
--- a/liblog/README
+++ b/liblog/README
@@ -111,20 +111,21 @@ DESCRIPTION
111 ger_list_alloc, calling in turn the android_logger_open for each log 111 ger_list_alloc, calling in turn the android_logger_open for each log
112 id. Each entry can be retrieved with android_logger_list_read. The 112 id. Each entry can be retrieved with android_logger_list_read. The
113 log(s) can be closed with android_logger_list_free. The logs should be 113 log(s) can be closed with android_logger_list_free. The logs should be
114 opened with an O_RDONLY mode. O_NDELAY mode will report when the log 114 opened with an ANDROID_LOG_RDONLY mode. ANDROID_LOG_NONBLOCK mode
115 reading is done with an EAGAIN error return code, otherwise the 115 will report when the log reading is done with an EAGAIN error return
116 android_logger_list_read call will block for new entries. 116 code, otherwise the android_logger_list_read call will block for new
117 entries.
117 118
118 The value returned by android_logger_open can be used as a parameter to 119 The value returned by android_logger_open can be used as a parameter to
119 the android_logger_clear function to empty the sub-log. It is recom‐ 120 the android_logger_clear function to empty the sub-log. It is recom‐
120 mended to only open log O_WRONLY. 121 mended to only open log ANDROID_LOG_WRONLY in that case.
121 122
122 The value returned by android_logger_open can be used as a parameter to 123 The value returned by android_logger_open can be used as a parameter to
123 the android_logger_get_log_(size|readable_size|version) to retrieve the 124 the android_logger_get_log_(size|readable_size|version) to retrieve the
124 sub-log maximum size, readable size and log buffer format protocol ver‐ 125 sub-log maximum size, readable size and log buffer format protocol ver‐
125 sion respectively. android_logger_get_id returns the id that was used 126 sion respectively. android_logger_get_id returns the id that was used
126 when opening the sub-log. It is recommended to open the log O_RDONLY 127 when opening the sub-log. It is recommended to open the log
127 in these cases. 128 ANDROID_LOG_RDONLY in these cases.
128 129
129SEE ALSO 130SEE ALSO
130 syslogd(8) 131 syslogd(8)