From b92857f79179c8a204d6d68556375d6cd712f038 Mon Sep 17 00:00:00 2001 From: Michael Andres Date: Thu, 12 Jul 2012 18:13:34 +0200 Subject: [PATCH] filter zero sized devices in disk usage counter(bnc#769819) --- zypp/DiskUsageCounter.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zypp/DiskUsageCounter.cc b/zypp/DiskUsageCounter.cc index 085df2a5a..aa33a75fe 100644 --- a/zypp/DiskUsageCounter.cc +++ b/zypp/DiskUsageCounter.cc @@ -264,6 +264,14 @@ namespace zypp } else { + // + // Filter zero sized devices (bnc#769819) + // + if ( sb.f_blocks == 0 || sb.f_bsize == 0 ) + { + DBG << "Filter zero-sized mount point : " << l << std::endl; + continue; + } ret.insert( DiskUsageCounter::MountPoint( mp, sb.f_bsize, ((long long)sb.f_blocks)*sb.f_bsize/1024, ((long long)(sb.f_blocks - sb.f_bfree))*sb.f_bsize/1024, 0LL, ro ) ); -- 2.34.1