diff options
author | Leandro Pereira <leandro@hardinfo.org> | 2008-10-31 16:40:00 -0200 |
---|---|---|
committer | Leandro Pereira <leandro@hardinfo.org> | 2008-10-31 16:40:00 -0200 |
commit | cafe9d5b63c93d7d0c20154bb8ffa510dd50cbef (patch) | |
tree | a8419d4ead9282245da1eacc10eb18de1eaf90e8 /hardinfo2/arch/linux/common/filesystem.h | |
parent | 84e4dc6b1776abccc6167c7f037ddca5b5a53244 (diff) |
Only show filesystems with total_size > 0bytes
Diffstat (limited to 'hardinfo2/arch/linux/common/filesystem.h')
-rw-r--r-- | hardinfo2/arch/linux/common/filesystem.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/hardinfo2/arch/linux/common/filesystem.h b/hardinfo2/arch/linux/common/filesystem.h index f5b932b8..0224e962 100644 --- a/hardinfo2/arch/linux/common/filesystem.h +++ b/hardinfo2/arch/linux/common/filesystem.h @@ -57,6 +57,10 @@ scan_filesystems(void) avail = (float) sfs.f_bsize * (float) sfs.f_bavail; used = size - avail; + if (size == 0.0f) { + continue; + } + if (avail == 0.0f) { use_ratio = 100.0f; } else { |