Merge "fs_mgr: report errno string for __mount errors" am: 6333cd0938 am: eef732555d am: ab6f80c350

am: 0c7862b805

Change-Id: Ica3272ac4c2e76fe2df04eeaa6e07e18d768b0f1
This commit is contained in:
Mark Salyzyn 2017-07-05 22:00:16 +00:00 committed by android-build-merger
commit 054192270f
1 changed files with 3 additions and 2 deletions

View File

@ -476,10 +476,11 @@ static int __mount(const char *source, const char *target, const struct fstab_re
if ((info.st_mode & S_IFMT) == S_IFLNK)
unlink(target);
mkdir(target, 0755);
errno = 0;
ret = mount(source, target, rec->fs_type, mountflags, rec->fs_options);
save_errno = errno;
LINFO << __FUNCTION__ << "(source=" << source << ",target="
<< target << ",type=" << rec->fs_type << ")=" << ret;
PINFO << __FUNCTION__ << "(source=" << source << ",target=" << target
<< ",type=" << rec->fs_type << ")=" << ret;
if ((ret == 0) && (mountflags & MS_RDONLY) != 0) {
fs_mgr_set_blk_ro(source);
}