From c22da7ed32f8b537b8e4653fd777056e8315ebdf Mon Sep 17 00:00:00 2001 From: Alexey Tarasov Date: Thu, 3 Dec 2009 11:26:22 +1000 Subject: [PATCH] Fix log channel initialization at bionic/logd_write.c. log_channel_t contains fd member, which is file descriptor for exact logging channel. change cc05d1271680d6a7804bc89d3b1fe14c40b32396 lacks initialization of this member in __write_to_log_init(), thus logging code is not working, although not crashable. Additional details may be found in comments here: http://review.source.android.com/5617 --- libc/bionic/logd_write.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/bionic/logd_write.c b/libc/bionic/logd_write.c index 333642875..39f02588e 100644 --- a/libc/bionic/logd_write.c +++ b/libc/bionic/logd_write.c @@ -113,6 +113,8 @@ static int __write_to_log_init(log_id_t log_id, struct iovec *vec) log_channels[log_id].logger = (fd < 0) ? __write_to_log_null : __write_to_log_kernel; + log_channels[log_id].fd = fd; + pthread_mutex_unlock(&log_init_lock); return log_channels[log_id].logger(log_id, vec); -- 2.11.0