From 3616a0fd061ce696378f0d6cc3b4cfc2aa65d16b Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Sun, 26 Aug 2018 12:13:58 -0600 Subject: [PATCH] fs/hostfs/hostfs.c: Ensure f_type is equal to HOSTFS_MAGIC. --- fs/hostfs/hostfs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c index 06050923b4..999afb5d5b 100644 --- a/fs/hostfs/hostfs.c +++ b/fs/hostfs/hostfs.c @@ -1065,14 +1065,11 @@ static int hostfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf) hostfs_semtake(fs); - /* Implement the logic!! */ - - memset(buf, 0, sizeof(struct statfs)); - buf->f_type = HOSTFS_MAGIC; - /* Call the host fs to perform the statfs */ + memset(buf, 0, sizeof(struct statfs)); ret = host_statfs(fs->fs_root, buf); + buf->f_type = HOSTFS_MAGIC; hostfs_semgive(fs); return ret;