Merge "Make "adb logcat" pass $ANDROID_LOG_TAGS through again."
diff --git a/fs_mgr/fs_mgr_verity.cpp b/fs_mgr/fs_mgr_verity.cpp
index 767b3b3..67104cc 100644
--- a/fs_mgr/fs_mgr_verity.cpp
+++ b/fs_mgr/fs_mgr_verity.cpp
@@ -341,6 +341,17 @@
return 0;
}
+static int test_access(char *device) {
+ int tries = 25;
+ while (tries--) {
+ if (!access(device, F_OK) || errno != ENOENT) {
+ return 0;
+ }
+ usleep(40 * 1000);
+ }
+ return -1;
+}
+
static int check_verity_restart(const char *fname)
{
char buffer[VERITY_KMSG_BUFSIZE + 1];
@@ -1020,6 +1031,11 @@
fstab->blk_device = verity_blk_name;
verity_blk_name = 0;
+ // make sure we've set everything up properly
+ if (test_access(fstab->blk_device) < 0) {
+ goto out;
+ }
+
retval = FS_MGR_SETUP_VERITY_SUCCESS;
out:
diff --git a/liblog/log_is_loggable.c b/liblog/log_is_loggable.c
index 132d96f..dda09e0 100644
--- a/liblog/log_is_loggable.c
+++ b/liblog/log_is_loggable.c
@@ -23,8 +23,6 @@
#include <sys/_system_properties.h>
#include <unistd.h>
-#include <android/log.h>
-#include <log/logger.h>
#include <private/android_logger.h>
#include "log_portability.h"