From cafe9d5b63c93d7d0c20154bb8ffa510dd50cbef Mon Sep 17 00:00:00 2001 From: Leandro Pereira Date: Fri, 31 Oct 2008 16:40:00 -0200 Subject: Only show filesystems with total_size > 0bytes --- hardinfo2/arch/linux/common/filesystem.h | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- cgit v1.2.3