fix: fix the MS_REMOUNT support The mount interface can't deal with MS_REMOUNT flag now, fix it. Signed-off-by: Far <yesiyuan2@huawei.com> Change-Id: Id0960c8d92ce767b8d8ef98b3ba2e1d1ab7db15d
This commit is contained in:
@@ -282,6 +282,12 @@ int FatfsMount(struct MountPoint *mp, unsigned long mountflags,
|
||||
return (int)LOS_NOK;
|
||||
}
|
||||
|
||||
if (mountflags & MS_REMOUNT) {
|
||||
ret = Remount(mp, mountflags);
|
||||
FsUnlock();
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *ldPath = GetLdPath(mp->mDev);
|
||||
if (ldPath == NULL) {
|
||||
errno = EFAULT;
|
||||
@@ -289,11 +295,6 @@ int FatfsMount(struct MountPoint *mp, unsigned long mountflags,
|
||||
goto ERROUT;
|
||||
}
|
||||
|
||||
if (mountflags & MS_REMOUNT) {
|
||||
ret = Remount(mp, mountflags);
|
||||
goto ERROUT;
|
||||
}
|
||||
|
||||
fs = (FATFS *)malloc(sizeof(FATFS));
|
||||
if (fs == NULL) {
|
||||
errno = ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user