summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-02-28 22:41:29 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-02-28 22:41:29 +0000
commit7be31bbf67e9b8b7e53948472535b54b3d27a693 (patch)
treee8e9f75b68f7c69a693e9daac9597f416672691c /init
parentda13962c2ed1503512f4407c5d9a5d15a5af5e27 (diff)
parentb0eaeb42cea7e3ee36e03ef461532b5b8556a26e (diff)
downloadsystem_core-7be31bbf67e9b8b7e53948472535b54b3d27a693.zip
system_core-7be31bbf67e9b8b7e53948472535b54b3d27a693.tar.gz
system_core-7be31bbf67e9b8b7e53948472535b54b3d27a693.tar.bz2
am b0eaeb42: am a69270db: Merge "liblog: enable logging to logd."
* commit 'b0eaeb42cea7e3ee36e03ef461532b5b8556a26e': liblog: enable logging to logd.
Diffstat (limited to 'init')
-rw-r--r--init/devices.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/init/devices.c b/init/devices.c
index a70c61d..80c6d75 100644
--- a/init/devices.c
+++ b/init/devices.c
@@ -1,5 +1,5 @@
/*
- * 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.
@@ -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"
@@ -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;
@@ -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;
@@ -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;