Reland "Create new mount directory /mnt/runtime/full."
This will be used for system internals to access
secondary volumes without having to bypass sdcardfs.
This reverts commit 54b8844b1307ce64069861f8213c8bfed34b69d7
Bug: 121277410
Test: manual
Change-Id: Id5b995dc5899b5999f1dea662ba1c3ee475a0e46
diff --git a/sdcard/sdcard.cpp b/sdcard/sdcard.cpp
index dc36596..e1de130 100644
--- a/sdcard/sdcard.cpp
+++ b/sdcard/sdcard.cpp
@@ -160,6 +160,7 @@
std::string dest_path_default = "/mnt/runtime/default/" + label;
std::string dest_path_read = "/mnt/runtime/read/" + label;
std::string dest_path_write = "/mnt/runtime/write/" + label;
+ std::string dest_path_full = "/mnt/runtime/full/" + label;
umask(0);
if (multi_user) {
@@ -172,7 +173,10 @@
default_normal, use_esdfs) ||
!sdcardfs_setup_secondary(dest_path_default, source_path, dest_path_write, uid, gid,
multi_user, userid, AID_EVERYBODY, full_write ? 0007 : 0027,
- derive_gid, default_normal, use_esdfs)) {
+ derive_gid, default_normal, use_esdfs) ||
+ !sdcardfs_setup_secondary(dest_path_default, source_path, dest_path_full, uid, gid,
+ multi_user, userid, AID_EVERYBODY, 0007, derive_gid,
+ default_normal, use_esdfs)) {
LOG(FATAL) << "failed to sdcardfs_setup";
}
} else {
@@ -186,7 +190,10 @@
derive_gid, default_normal, use_esdfs) ||
!sdcardfs_setup_secondary(dest_path_default, source_path, dest_path_write, uid, gid,
multi_user, userid, AID_EVERYBODY, full_write ? 0007 : 0022,
- derive_gid, default_normal, use_esdfs)) {
+ derive_gid, default_normal, use_esdfs) ||
+ !sdcardfs_setup_secondary(dest_path_default, source_path, dest_path_full, uid, gid,
+ multi_user, userid, AID_EVERYBODY, 0007, derive_gid,
+ default_normal, use_esdfs)) {
LOG(FATAL) << "failed to sdcardfs_setup";
}
}