Merge "liblogcat: redirect logcat output correctly for -Q"
diff --git a/init/README.md b/init/README.md
index c76a33b..d3dd73a 100644
--- a/init/README.md
+++ b/init/README.md
@@ -26,7 +26,7 @@
Init .rc Files
--------------
The init language is used in plain text files that take the .rc file
-extension. These are typically multiple of these in multiple
+extension. There are typically multiple of these in multiple
locations on the system, described below.
/init.rc is the primary .rc file and is loaded by the init executable
diff --git a/liblog/logd_reader.c b/liblog/logd_reader.c
index ccc7da8..a6c3f7a 100644
--- a/liblog/logd_reader.c
+++ b/liblog/logd_reader.c
@@ -91,7 +91,7 @@
static int logdAvailable(log_id_t logId)
{
- if (logId > LOG_ID_KERNEL) {
+ if (logId >= LOG_ID_MAX) {
return -EINVAL;
}
if (logId == LOG_ID_SECURITY) {
diff --git a/liblog/logd_writer.c b/liblog/logd_writer.c
index 2bab92e..12b797d 100644
--- a/liblog/logd_writer.c
+++ b/liblog/logd_writer.c
@@ -117,7 +117,7 @@
static int logdAvailable(log_id_t logId)
{
- if (logId > LOG_ID_SECURITY) {
+ if (logId >= LOG_ID_MAX || logId == LOG_ID_KERNEL) {
return -EINVAL;
}
if (atomic_load(&logdLoggerWrite.context.sock) < 0) {