Browse Source

Merge pull request #336 from trapexit/sigfpe

ignore filesystems which return zeros for statfs. closes #335
pull/340/head
Antonio SJ Musumeci 8 years ago
committed by GitHub
parent
commit
00235c15bf
  1. 6
      src/statfs.cpp

6
src/statfs.cpp

@ -83,11 +83,11 @@ _statfs_core(const char *srcmount,
if(STAT_FAILED(rv))
return;
if(min_bsize > fsstat.f_bsize)
if(fsstat.f_bsize && (min_bsize > fsstat.f_bsize))
min_bsize = fsstat.f_bsize;
if(min_frsize > fsstat.f_frsize)
if(fsstat.f_frsize && (min_frsize > fsstat.f_frsize))
min_frsize = fsstat.f_frsize;
if(min_namemax > fsstat.f_namemax)
if(fsstat.f_namemax && (min_namemax > fsstat.f_namemax))
min_namemax = fsstat.f_namemax;
fsstats.insert(std::make_pair(st.st_dev,fsstat));

Loading…
Cancel
Save