Skip to content

Commit

Permalink
Hide overlay/shm filesystems per default
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Nov 1, 2020
1 parent 55fc39b commit 01459c8
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
4 changes: 4 additions & 0 deletions filesystems_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ func isNetworkFs(m Mount) bool {
func isSpecialFs(m Mount) bool {
return m.Fstype == "devfs"
}

func isHiddenFs(m Mount) bool {
return false
}
4 changes: 4 additions & 0 deletions filesystems_freebsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,7 @@ func isSpecialFs(m Mount) bool {

return false
}

func isHiddenFs(m Mount) bool {
return false
}
11 changes: 11 additions & 0 deletions filesystems_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,3 +266,14 @@ func isNetworkFs(m Mount) bool {
func isSpecialFs(m Mount) bool {
return specialMap[int64(m.Stat().Type)]
}

func isHiddenFs(m Mount) bool {
switch m.Device {
case "shm":
return true
case "overlay":
return true
}

return m.Fstype == "autofs"
}
4 changes: 4 additions & 0 deletions filesystems_openbsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ func isNetworkFs(m Mount) bool {
func isSpecialFs(m Mount) bool {
return m.Fstype == "devfs"
}

func isHiddenFs(m Mount) bool {
return false
}
4 changes: 4 additions & 0 deletions filesystems_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,7 @@ func isSpecialFs(m Mount) bool {
_, ok := windowsSandboxMountPoints[m.Mountpoint]
return ok
}

func isHiddenFs(m Mount) bool {
return false
}
5 changes: 3 additions & 2 deletions groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ func renderTables(m []Mount, filters FilterOptions, opts TableOptions) {
continue
}
}
// skip autofs
if v.Fstype == "autofs" {

// skip hidden devices
if isHiddenFs(v) && !*all {
continue
}

Expand Down

0 comments on commit 01459c8

Please sign in to comment.