filter zero sized devices in disk usage counter(bnc#769819)
authorMichael Andres <ma@suse.de>
Thu, 12 Jul 2012 16:13:34 +0000 (18:13 +0200)
committerMichael Andres <ma@suse.de>
Thu, 12 Jul 2012 16:13:34 +0000 (18:13 +0200)
zypp/DiskUsageCounter.cc

index 085df2a5a5587a6e6d0f49beacd9c134ca18a142..aa33a75fe291336b073bbdadceb42d8c02bfe85a 100644 (file)
@@ -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 ) );