提交 952cbb9f 编写于 作者: O openharmony_ci 提交者: Gitee

!79 liteos补丁能力支持

Merge pull request !79 from jason_gitee/master
......@@ -62,6 +62,9 @@
#include "fs/mount.h"
#include "fs/driver.h"
#include "fs/fs.h"
#ifdef LOSCFG_FS_ZPFS
#include "zpfs.h"
#endif
/* At least one filesystem must be defined, or this file will not compile.
......@@ -255,6 +258,19 @@ int mount(const char *source, const char *target,
#endif
mnt = MountAlloc(mountpt_vnode, (struct MountOps*)mops);
#ifdef LOSCFG_FS_ZPFS
if (strcmp(filesystemtype, ZPFS_NAME) == 0)
{
ret = ZpfsPrepare(source, target, mnt);
if (ret < 0)
{
errcode = ret;
goto errout_with_mountpt;
}
}
#endif
mnt->mountFlags = mountflags;
mountpt_vnode->useCount++;
......
......@@ -91,10 +91,6 @@ int umount(const char *target)
struct Vnode *covered_vnode = NULL;
struct Mount *mnt = NULL;
int ret;
#ifdef LOSCFG_FS_ZPFS
bool isZpfs = false;
struct inode zpfsInode;
#endif
/* Verify required pointer arguments */
......@@ -144,16 +140,6 @@ int umount(const char *target)
goto errout;
}
#ifdef LOSCFG_FS_ZPFS
if (IsZpfsFileSystem(mountpt_vnode))
{
isZpfs = true;
zpfsInode.i_private = mountpt_vnode->i_private;
zpfsInode.u.i_ops = mountpt_vnode->u.i_ops;
zpfsInode.i_flags = mountpt_vnode->i_flags;
}
#endif
/* Release the vnode under the mount point */
if (fs_in_use(mnt, target))
{
......@@ -183,12 +169,6 @@ int umount(const char *target)
; /* block driver operations after umount */
}
#ifdef LOSCFG_FS_ZPFS
if (isZpfs)
{
ZpfsCleanUp((void*)&zpfsInode, fullpath);
}
#endif
covered_vnode->newMount = NULL;
covered_vnode->flag &= ~(VNODE_FLAG_MOUNT_ORIGIN);
VnodeDrop();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册