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:
Far
2022-11-14 15:56:01 +08:00
parent 48b116bebb
commit ed3ad6e65f
3 changed files with 42 additions and 7 deletions
+6 -5
View File
@@ -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;