Stormfetch will no longer crash if there is an error while reading partition size
This commit is contained in:
parent
720eb845ca
commit
b90b869643
3
utils.go
3
utils.go
@ -345,7 +345,6 @@ func getMountedPartitions() []partition {
|
||||
}
|
||||
labels[link] = entry.Name()
|
||||
}
|
||||
|
||||
var partitions []partition
|
||||
for _, entry := range mounts {
|
||||
p := partition{
|
||||
@ -362,7 +361,7 @@ func getMountedPartitions() []partition {
|
||||
buf := new(syscall.Statfs_t)
|
||||
err = syscall.Statfs(p.MountPoint, buf)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
continue
|
||||
}
|
||||
totalBlocks := buf.Blocks
|
||||
freeBlocks := buf.Bfree
|
||||
|
Loading…
x
Reference in New Issue
Block a user