am 27bd326d: Merge "[MIPS] Allow errno safe logging"
* commit '27bd326dc3a90736d342267011127cdc3961174f': [MIPS] Allow errno safe logging
This commit is contained in:
@@ -70,6 +70,17 @@ static inline char *portable_tag() {
|
||||
#define LOG_TAG PORTABLE_TAG
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Override LOG_PRI() defined in ${AOSP}/system/core/include/cutils/log.h
|
||||
* to preserve the value of errno while logging.
|
||||
*/
|
||||
#define LOG_PRI(priority, tag, ...) ({ \
|
||||
int _errno = errno; \
|
||||
int _rv = android_printLog(priority, tag, __VA_ARGS__); \
|
||||
errno = _errno; \
|
||||
_rv; /* Returned to caller */ \
|
||||
})
|
||||
|
||||
# include <cutils/log.h>
|
||||
|
||||
# define PERROR(str) { \
|
||||
|
||||
Reference in New Issue
Block a user