Loading libcutils/klog.c +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ void klog_init(void) if (mknod(name, S_IFCHR | 0600, (1 << 8) | 11) == 0) { klog_fd = open(name, O_WRONLY); if (klog_fd < 0) return; fcntl(klog_fd, F_SETFD, FD_CLOEXEC); unlink(name); } Loading @@ -54,6 +56,7 @@ void klog_write(int level, const char *fmt, ...) if (level > klog_level) return; if (klog_fd < 0) klog_init(); if (klog_fd < 0) return; va_start(ap, fmt); vsnprintf(buf, LOG_BUF_MAX, fmt, ap); Loading Loading
libcutils/klog.c +3 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,8 @@ void klog_init(void) if (mknod(name, S_IFCHR | 0600, (1 << 8) | 11) == 0) { klog_fd = open(name, O_WRONLY); if (klog_fd < 0) return; fcntl(klog_fd, F_SETFD, FD_CLOEXEC); unlink(name); } Loading @@ -54,6 +56,7 @@ void klog_write(int level, const char *fmt, ...) if (level > klog_level) return; if (klog_fd < 0) klog_init(); if (klog_fd < 0) return; va_start(ap, fmt); vsnprintf(buf, LOG_BUF_MAX, fmt, ap); Loading