Move enabling sdcardfs behind a property
This allows devices that have sdcardfs enabled in the kernel to not use
it. When external_storage.sdcardfs.enabled=0, sdcardfs will not be
mounted. This is treated as default true to not affect upgrading
devices. It does not use the old ro.sys.sdcardfs as that has been
repurposed over time and no longer can be relied on to turn off
sdcardfs. This is included within emulated_storage.mk
Bug: 155222498
Test: mount|grep "type sdcardfs" should find nothing after boot complete
if external_storage.sdcardfs.enabled=0
Change-Id: I23d75fb1225aeabbcb1a035ad62fd042b6b3c7b5
diff --git a/Utils.h b/Utils.h
index e04dcaa..eac3cf4 100644
--- a/Utils.h
+++ b/Utils.h
@@ -36,6 +36,7 @@
static const char* kPropFuse = "persist.sys.fuse";
static const char* kVoldAppDataIsolationEnabled = "persist.sys.vold_app_data_isolation_enabled";
+static const char* kExternalStorageSdcardfs = "external_storage.sdcardfs.enabled";
/* SELinux contexts used depending on the block device type */
extern security_context_t sBlkidContext;
@@ -124,6 +125,7 @@
uint64_t GetTreeBytes(const std::string& path);
bool IsFilesystemSupported(const std::string& fsType);
+bool IsSdcardfsUsed();
bool IsFuseDaemon(const pid_t pid);
/* Wipes contents of block device at given path */