Ignore squashfs partitions
ClosedPublic

Authored by broulik on Jul 10 2018, 12:48 PM.

Details

Summary

Keeps internal partitions like /snap mounts from cluttering up the overview
It's read-only, so you cannot really free up space there anyway.

Test Plan

No more /snap stuff in Filelight overview

Diff Detail

Repository
R352 Filelight
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Jul 10 2018, 12:48 PM
Restricted Application added a subscriber: kde-utils-devel. · View Herald TranscriptJul 10 2018, 12:48 PM
broulik requested review of this revision.Jul 10 2018, 12:48 PM
sitter requested changes to this revision.Jul 10 2018, 7:46 PM

I'd prefer something like

static const QSet<QByteArray> ignoreFS = { "tmpfs", "squashfs" };

for (const QStorageInfo &storage : QStorageInfo::mountedVolumes()) {
    if (!storage.isReady() || ignoreFS.contains(storage.fileSystemType())) {
        continue;
    }

It's how we do it in the listers as well I think, and it's easier to extend in the future that way.

This revision now requires changes to proceed.Jul 10 2018, 7:46 PM
broulik updated this revision to Diff 37529.Jul 10 2018, 7:57 PM
  • Use static const list of file systems
sitter accepted this revision.Jul 10 2018, 8:03 PM

lgtm

This revision is now accepted and ready to land.Jul 10 2018, 8:03 PM
dakon added a subscriber: dakon.Jul 10 2018, 8:15 PM

I wonder why tmpfs is listed here. Cleaning up /tmp may actually be useful. devtmpfs is indeed something that should be filtered. iso9660 would be another good candidate. And perhaps bind mounts.

You stil can they just aren't on the summary

This revision was automatically updated to reflect the committed changes.