Loading include/log/logger.h +2 −6 Original line number Diff line number Diff line Loading @@ -79,14 +79,10 @@ struct logger_entry_v3 { struct log_msg { union { unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1]; struct logger_entry_v2 entry; struct logger_entry_v3 entry; struct logger_entry_v3 entry_v3; struct logger_entry_v2 entry_v2; struct logger_entry entry_v1; struct { unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1]; log_id_t id; } extra; } __attribute__((aligned(4))); #ifdef __cplusplus /* Matching log_time operators */ Loading Loading @@ -126,7 +122,7 @@ struct log_msg { /* packet methods */ log_id_t id() { return extra.id; return (log_id_t) entry.lid; } char *msg() { Loading init/devices.c +10 −2 Original line number Diff line number Diff line /* * Copyright (C) 2007 The Android Open Source Project * Copyright (C) 2007-2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -47,6 +47,8 @@ #include "util.h" #include "log.h" #define UNUSED __attribute__((__unused__)) #define SYSFS_PREFIX "/sys" #define FIRMWARE_DIR1 "/etc/firmware" #define FIRMWARE_DIR2 "/vendor/firmware" Loading Loading @@ -193,7 +195,7 @@ static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) } static void make_device(const char *path, const char *upath, const char *upath UNUSED, int block, int major, int minor) { unsigned uid; Loading Loading @@ -589,6 +591,11 @@ static void mkdir_recursive_for_devpath(const char *devpath) mkdir_recursive(dir, 0755); } static inline void __attribute__((__deprecated__)) kernel_logger() { INFO("kernel logger is deprecated\n"); } static void handle_generic_device_event(struct uevent *uevent) { char *base; Loading Loading @@ -675,6 +682,7 @@ static void handle_generic_device_event(struct uevent *uevent) make_dir(base, 0755); } else if(!strncmp(uevent->subsystem, "misc", 4) && !strncmp(name, "log_", 4)) { kernel_logger(); base = "/dev/log/"; make_dir(base, 0755); name += 4; Loading liblog/Android.mk +8 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,11 @@ LOCAL_PATH := $(my-dir) include $(CLEAR_VARS) ifeq ($(TARGET_USES_LOGD),true) liblog_sources := logd_write.c else liblog_sources := logd_write_kern.c endif # some files must not be compiled when building against Mingw # they correspond to features not used by our host development tools Loading @@ -42,7 +46,11 @@ else endif liblog_host_sources := $(liblog_sources) fake_log_device.c ifeq ($(TARGET_USES_LOGD),true) liblog_target_sources = $(liblog_sources) log_read.c else liblog_target_sources = $(liblog_sources) log_read_kern.c endif # Shared and static library for host # ======================================================== Loading Loading
include/log/logger.h +2 −6 Original line number Diff line number Diff line Loading @@ -79,14 +79,10 @@ struct logger_entry_v3 { struct log_msg { union { unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1]; struct logger_entry_v2 entry; struct logger_entry_v3 entry; struct logger_entry_v3 entry_v3; struct logger_entry_v2 entry_v2; struct logger_entry entry_v1; struct { unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1]; log_id_t id; } extra; } __attribute__((aligned(4))); #ifdef __cplusplus /* Matching log_time operators */ Loading Loading @@ -126,7 +122,7 @@ struct log_msg { /* packet methods */ log_id_t id() { return extra.id; return (log_id_t) entry.lid; } char *msg() { Loading
init/devices.c +10 −2 Original line number Diff line number Diff line /* * Copyright (C) 2007 The Android Open Source Project * Copyright (C) 2007-2014 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. Loading Loading @@ -47,6 +47,8 @@ #include "util.h" #include "log.h" #define UNUSED __attribute__((__unused__)) #define SYSFS_PREFIX "/sys" #define FIRMWARE_DIR1 "/etc/firmware" #define FIRMWARE_DIR2 "/vendor/firmware" Loading Loading @@ -193,7 +195,7 @@ static mode_t get_device_perm(const char *path, unsigned *uid, unsigned *gid) } static void make_device(const char *path, const char *upath, const char *upath UNUSED, int block, int major, int minor) { unsigned uid; Loading Loading @@ -589,6 +591,11 @@ static void mkdir_recursive_for_devpath(const char *devpath) mkdir_recursive(dir, 0755); } static inline void __attribute__((__deprecated__)) kernel_logger() { INFO("kernel logger is deprecated\n"); } static void handle_generic_device_event(struct uevent *uevent) { char *base; Loading Loading @@ -675,6 +682,7 @@ static void handle_generic_device_event(struct uevent *uevent) make_dir(base, 0755); } else if(!strncmp(uevent->subsystem, "misc", 4) && !strncmp(name, "log_", 4)) { kernel_logger(); base = "/dev/log/"; make_dir(base, 0755); name += 4; Loading
liblog/Android.mk +8 −0 Original line number Diff line number Diff line Loading @@ -16,7 +16,11 @@ LOCAL_PATH := $(my-dir) include $(CLEAR_VARS) ifeq ($(TARGET_USES_LOGD),true) liblog_sources := logd_write.c else liblog_sources := logd_write_kern.c endif # some files must not be compiled when building against Mingw # they correspond to features not used by our host development tools Loading @@ -42,7 +46,11 @@ else endif liblog_host_sources := $(liblog_sources) fake_log_device.c ifeq ($(TARGET_USES_LOGD),true) liblog_target_sources = $(liblog_sources) log_read.c else liblog_target_sources = $(liblog_sources) log_read_kern.c endif # Shared and static library for host # ======================================================== Loading