diff options
Diffstat (limited to 'liblog/log_read.c')
-rw-r--r-- | liblog/log_read.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/liblog/log_read.c b/liblog/log_read.c index dbed886..0b126cf 100644 --- a/liblog/log_read.c +++ b/liblog/log_read.c @@ -582,7 +582,7 @@ int android_logger_list_read(struct logger_list *logger_list, return -EINVAL; } - if (logger_list->mode & O_NONBLOCK) { + if (logger_list->mode & ANDROID_LOG_NONBLOCK) { memset(&ignore, 0, sizeof(ignore)); ignore.sa_handler = caught_signal; sigemptyset(&ignore.sa_mask); @@ -602,7 +602,7 @@ int android_logger_list_read(struct logger_list *logger_list, } strcpy(buffer, - (logger_list->mode & O_NONBLOCK) ? "dumpAndClose" : "stream"); + (logger_list->mode & ANDROID_LOG_NONBLOCK) ? "dumpAndClose" : "stream"); cp = buffer + strlen(buffer); strcpy(cp, " lids"); @@ -640,14 +640,14 @@ int android_logger_list_read(struct logger_list *logger_list, cp += ret; } - if (logger_list->mode & O_NONBLOCK) { + if (logger_list->mode & ANDROID_LOG_NONBLOCK) { /* Deal with an unresponsive logd */ sigaction(SIGALRM, &ignore, &old_sigaction); old_alarm = alarm(30); } ret = write(sock, buffer, cp - buffer); e = errno; - if (logger_list->mode & O_NONBLOCK) { + if (logger_list->mode & ANDROID_LOG_NONBLOCK) { if (e == EINTR) { e = ETIMEDOUT; } @@ -673,7 +673,7 @@ int android_logger_list_read(struct logger_list *logger_list, while(1) { memset(log_msg, 0, sizeof(*log_msg)); - if (logger_list->mode & O_NONBLOCK) { + if (logger_list->mode & ANDROID_LOG_NONBLOCK) { /* particularily useful if tombstone is reporting for logd */ sigaction(SIGALRM, &ignore, &old_sigaction); old_alarm = alarm(30); @@ -681,7 +681,7 @@ int android_logger_list_read(struct logger_list *logger_list, /* NOTE: SOCK_SEQPACKET guarantees we read exactly one full entry */ ret = recv(logger_list->sock, log_msg, LOGGER_ENTRY_MAX_LEN, 0); e = errno; - if (logger_list->mode & O_NONBLOCK) { + if (logger_list->mode & ANDROID_LOG_NONBLOCK) { if ((ret == 0) || (e == EINTR)) { e = EAGAIN; ret = -1; |