fs/hostfs/hostfs.c: Ensure f_type is equal to HOSTFS_MAGIC.

This commit is contained in:
Xiang Xiao 2018-08-26 12:13:58 -06:00 committed by Gregory Nutt
parent 8c4cf3f2c9
commit 3616a0fd06
1 changed files with 2 additions and 5 deletions

View File

@ -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;