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 /include | |
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 'include')
-rw-r--r-- | include/log/logger.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/log/logger.h b/include/log/logger.h index 53be1d3..570f02b 100644 --- a/include/log/logger.h +++ b/include/log/logger.h @@ -154,6 +154,12 @@ ssize_t android_logger_get_prune_list(struct logger_list *logger_list, int android_logger_set_prune_list(struct logger_list *logger_list, char *buf, size_t len); +#define ANDROID_LOG_RDONLY O_RDONLY +#define ANDROID_LOG_WRONLY O_WRONLY +#define ANDROID_LOG_RDWR O_RDWR +#define ANDROID_LOG_ACCMODE O_ACCMODE +#define ANDROID_LOG_NONBLOCK O_NONBLOCK + struct logger_list *android_logger_list_alloc(int mode, unsigned int tail, pid_t pid); |