Merge "libcutils: Split uevent_open_socket()" into main
diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp
index 710eb18..3e70f79 100644
--- a/fs_mgr/fs_mgr.cpp
+++ b/fs_mgr/fs_mgr.cpp
@@ -216,10 +216,6 @@
*/
if (!(*fs_stat & FS_STAT_FULL_MOUNT_FAILED)) { // already tried if full mount failed
errno = 0;
- if (fs_type == "ext4") {
- // This option is only valid with ext4
- tmpmnt_opts += ",nomblk_io_submit";
- }
ret = mount(blk_device.c_str(), target.c_str(), fs_type.c_str(), tmpmnt_flags,
tmpmnt_opts.c_str());
PINFO << __FUNCTION__ << "(): mount(" << blk_device << "," << target << "," << fs_type
diff --git a/init/first_stage_mount.cpp b/init/first_stage_mount.cpp
index 55cce6e..927b45f 100644
--- a/init/first_stage_mount.cpp
+++ b/init/first_stage_mount.cpp
@@ -305,6 +305,11 @@
return false;
}
}
+
+ if (IsArcvm() && !block_dev_init_.InitHvcDevice("hvc1")) {
+ return false;
+ }
+
return true;
}
diff --git a/init/selinux.cpp b/init/selinux.cpp
index c2d9b8d..01af2b6 100644
--- a/init/selinux.cpp
+++ b/init/selinux.cpp
@@ -474,6 +474,8 @@
RestoreconIfExists(SnapshotManager::GetGlobalRollbackIndicatorPath().c_str(), 0);
RestoreconIfExists("/metadata/gsi",
SELINUX_ANDROID_RESTORECON_RECURSE | SELINUX_ANDROID_RESTORECON_SKIP_SEHASH);
+
+ RestoreconIfExists("/dev/hvc1", 0);
}
int SelinuxKlogCallback(int type, const char* fmt, ...) {
diff --git a/init/util.h b/init/util.h
index aa24123..0565391 100644
--- a/init/util.h
+++ b/init/util.h
@@ -18,6 +18,7 @@
#include <sys/stat.h>
#include <sys/types.h>
+#include <sys/unistd.h>
#include <chrono>
#include <functional>
@@ -108,6 +109,10 @@
#endif
}
+inline bool IsArcvm() {
+ return !access("/is_arcvm", F_OK);
+}
+
bool Has32BitAbi();
std::string GetApexNameFromFileName(const std::string& path);