romfs:bugfix romfs_statfs

fix for df cmd infomation of romfs

Signed-off-by: guohao15 <guohao15@xiaomi.com>
This commit is contained in:
guohao15 2024-04-26 23:11:55 +08:00 committed by GUIDINGLI
parent c61734a469
commit 3e58620ccc
1 changed files with 3 additions and 2 deletions

View File

@ -1298,8 +1298,9 @@ static int romfs_statfs(FAR struct inode *mountpt, FAR struct statfs *buf)
/* Everything else follows in units of sectors */
buf->f_blocks = SEC_NSECTORS(rm, rm->rm_volsize + SEC_NDXMASK(rm));
buf->f_bfree = rm->rm_hwnsectors - buf->f_blocks;
buf->f_blocks = rm->rm_hwnsectors;
buf->f_bfree = buf->f_blocks -
SEC_NSECTORS(rm, rm->rm_volsize + SEC_NDXMASK(rm));
buf->f_bavail = buf->f_bfree;
buf->f_namelen = NAME_MAX;