35#include <sys/statfs.h>
97 const char *mountpoint,
98 struct statfs *statbuf,
LIST_HEAD * GetMountList(void)
获取装载链表,并初始化
int(* foreach_mountpoint_t)(const char *devpoint, const char *mountpoint, struct statfs *statbuf, void *arg)
struct Mount * MountAlloc(struct Vnode *vnode, struct MountOps *mop)
int foreach_mountpoint(foreach_mountpoint_t handler, void *arg)
int ForceUmountDev(struct Vnode *dev)
举例: mount /dev/mmcblk0p0 /bin1/vs/sd vfat 将/dev/mmcblk0p0 挂载到/bin1/vs/sd目录
LIST_HEAD activeVnodeList
struct Vnode * vnodeCovered
struct Vnode * vnodeBeCovered
const struct MountOps * ops
int(* Statfs)(struct Mount *mount, struct statfs *sbp)
统计文件系统的信息,如该文件系统类型、总大小、可用大小等信息
int(* Sync)(struct Mount *mount)
同步挂载
int(* Unmount)(struct Mount *mount, struct Vnode **blkdriver)
卸载分区
vnode并不包含文件名,因为 vnode和文件名是 1:N 的关系