Hide external storage from apps if it's not set as adoptable

If storage is not visible to apps and no need to spin up FUSE, it also
should not make FUSE mount point directory.

Change-Id: I6ecd2e5bf56b5dcf0e11834880256b156a62a9a0
Signed-off-by: Qin Chao <chao.qin@intel.com>
gugelfrei
Qin Chao 9 years ago
parent a9d5080109
commit e0074f142b

@ -123,10 +123,7 @@ status_t PublicVolume::doMount() {
setPath(mRawPath);
}
if (fs_prepare_dir(mRawPath.c_str(), 0700, AID_ROOT, AID_ROOT) ||
fs_prepare_dir(mFuseDefault.c_str(), 0700, AID_ROOT, AID_ROOT) ||
fs_prepare_dir(mFuseRead.c_str(), 0700, AID_ROOT, AID_ROOT) ||
fs_prepare_dir(mFuseWrite.c_str(), 0700, AID_ROOT, AID_ROOT)) {
if (fs_prepare_dir(mRawPath.c_str(), 0700, AID_ROOT, AID_ROOT)) {
PLOG(ERROR) << getId() << " failed to create mount points";
return -errno;
}
@ -146,6 +143,13 @@ status_t PublicVolume::doMount() {
return OK;
}
if (fs_prepare_dir(mFuseDefault.c_str(), 0700, AID_ROOT, AID_ROOT) ||
fs_prepare_dir(mFuseRead.c_str(), 0700, AID_ROOT, AID_ROOT) ||
fs_prepare_dir(mFuseWrite.c_str(), 0700, AID_ROOT, AID_ROOT)) {
PLOG(ERROR) << getId() << " failed to create FUSE mount points";
return -errno;
}
dev_t before = GetDevice(mFuseWrite);
if (!(mFusePid = fork())) {

Loading…
Cancel
Save