Skip to content
This repository has been archived by the owner on Aug 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #75 from 999eagle/patch-loop-devices
Browse files Browse the repository at this point in the history
Filter loop devices in disk stats
  • Loading branch information
cjbassi authored Dec 3, 2018
2 parents 1ab25d0 + 40260a8 commit a1e266a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/widgets/disk.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1e266a

Please sign in to comment.