Update fs/vfs/fs_stat.c

Co-authored-by: patacongo <spudarnia@yahoo.com>
This commit is contained in:
Oleg 2020-05-25 18:25:41 +03:00 committed by patacongo
parent f6c3296f76
commit e1dbb6b2a9

View File

@ -389,7 +389,8 @@ int inode_stat(FAR struct inode *inode, FAR struct stat *buf)
if ((inode->u.i_bops != NULL) && (inode->u.i_bops->geometry)) if ((inode->u.i_bops != NULL) && (inode->u.i_bops->geometry))
{ {
struct geometry geo; struct geometry geo;
if (inode->u.i_bops->geometry(inode, &geo) >= 0 && geo.geo_available) if (inode->u.i_bops->geometry(inode, &geo) >= 0 &&
geo.geo_available)
{ {
buf->st_size = geo.geo_nsectors * geo.geo_sectorsize; buf->st_size = geo.geo_nsectors * geo.geo_sectorsize;
} }