Skip to content
Permalink
Browse files

Merge pull request #75 from 999eagle/patch-loop-devices

Filter loop devices in disk stats
  • Loading branch information...
cjbassi committed Dec 3, 2018
2 parents 1ab25d0 + 40260a8 commit a1e266ab6e8b712cdd877fc91d1088d28303ebdc
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/widgets/disk.go
@@ -57,6 +57,10 @@ func (self *Disk) update() {
// add partition if it's new
for _, Part := range Partitions {
device := strings.Replace(Part.Device, "/dev/", "", -1)
// don't show loop devices
if strings.HasPrefix(device, "loop") {
continue
}
if _, ok := self.Partitions[device]; !ok {
// https://github.com/shirou/gopsutil/issues/555
// have to remove artifacts produced by gopsutil when there's a space in the mount path

0 comments on commit a1e266a

Please sign in to comment.
You can’t perform that action at this time.