diff --git a/fs/include/fs/mount.h b/fs/include/fs/mount.h index c2a3a46d3ac371126c24db3c409cfc2104a92771..cd524cdab9c571e2aa2bff75be36593042d4ddba 100644 --- a/fs/include/fs/mount.h +++ b/fs/include/fs/mount.h @@ -35,6 +35,7 @@ #include "fs/vfs_util.h" #include "fs/vnode.h" #include +#include struct MountOps; @@ -50,6 +51,7 @@ struct Mount { void *data; /* private data */ uint32_t hashseed; /* Random seed for vfshash */ unsigned long mountFlags; /* Flags for mount */ + char pathName[PATH_MAX]; /* path name of mount point */ }; struct MountOps { diff --git a/fs/proc/os_adapt/proc_vfs.c b/fs/proc/os_adapt/proc_vfs.c index 87412b1141c02a5d7a04ff3bf74e0ec5418ed909..21560ece461aa96dd5129aac52991ad3e51ee3ce 100755 --- a/fs/proc/os_adapt/proc_vfs.c +++ b/fs/proc/os_adapt/proc_vfs.c @@ -257,9 +257,18 @@ int VfsProcfsClose(struct file *filep) return result; } +int VfsProcfsStatfs(struct Mount *mnt, struct statfs *buf) +{ + (void)memset_s(buf, sizeof(struct statfs), 0, sizeof(struct statfs)); + buf->f_type = PROCFS_MAGIC; + + return LOS_OK; +} + const struct MountOps procfs_operations = { .Mount = VfsProcfsMount, .Unmount = NULL, + .Statfs = VfsProcStatfs, }; static struct VnodeOps g_procfsVops = {