Merge "liblog: Add BM_is_loggable benchmark"
diff --git a/fs_mgr/fs_mgr.c b/fs_mgr/fs_mgr.c
index 273a2ec..47ea9aa 100644
--- a/fs_mgr/fs_mgr.c
+++ b/fs_mgr/fs_mgr.c
@@ -117,8 +117,10 @@
* filesytsem due to an error, e2fsck is still run to do a full check
* fix the filesystem.
*/
+ errno = 0;
ret = mount(blk_device, target, fs_type, tmpmnt_flags, tmpmnt_opts);
- INFO("%s(): mount(%s,%s,%s)=%d\n", __func__, blk_device, target, fs_type, ret);
+ INFO("%s(): mount(%s,%s,%s)=%d: %s\n",
+ __func__, blk_device, target, fs_type, ret, strerror(errno));
if (!ret) {
int i;
for (i = 0; i < 5; i++) {
@@ -126,6 +128,7 @@
// Should we try rebooting if all attempts fail?
int result = umount(target);
if (result == 0) {
+ INFO("%s(): unmount(%s) succeeded\n", __func__, target);
break;
}
ERROR("%s(): umount(%s)=%d: %s\n", __func__, target, result, strerror(errno));
diff --git a/init/devices.cpp b/init/devices.cpp
index 96b1696..2c7f5a9 100644
--- a/init/devices.cpp
+++ b/init/devices.cpp
@@ -266,7 +266,6 @@
static void add_platform_device(const char *path)
{
int path_len = strlen(path);
- struct listnode *node;
struct platform_node *bus;
const char *name = path;
@@ -276,15 +275,6 @@
name += 9;
}
- list_for_each_reverse(node, &platform_names) {
- bus = node_to_item(node, struct platform_node, list);
- if ((bus->path_len < path_len) &&
- (path[bus->path_len] == '/') &&
- !strncmp(path, bus->path, bus->path_len))
- /* subdevice of an existing platform, ignore it */
- return;
- }
-
INFO("adding platform device %s (%s)\n", name, path);
bus = (platform_node*) calloc(1, sizeof(struct platform_node));
diff --git a/init/init.cpp b/init/init.cpp
index ed20661..661ee2f 100644
--- a/init/init.cpp
+++ b/init/init.cpp
@@ -1020,7 +1020,7 @@
klog_init();
klog_set_level(KLOG_NOTICE_LEVEL);
- bool is_first_stage = (argc == 1);
+ bool is_first_stage = (argc == 1) || (strcmp(argv[1], "--second-stage") != 0);
NOTICE("init%s started!\n", is_first_stage ? "" : " second stage");
property_init();