disk: Check for error objects returned by Getfsstat

pull/540/head
Michal Rostecki 7 years ago
parent 7c7dec96c6
commit ff2e736f72

@ -23,7 +23,9 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
return ret, err
}
fs := make([]Statfs, count)
_, err = Getfsstat(fs, MntWait)
if _, err = Getfsstat(fs, MntWait); err != nil {
return ret, err
}
for _, stat := range fs {
opts := "rw"
if stat.Flags&MntReadOnly != 0 {

@ -29,7 +29,9 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
}
fs := make([]Statfs, count)
_, err = Getfsstat(fs, MNT_WAIT)
if _, err = Getfsstat(fs, MNT_WAIT); err != nil {
return ret, err
}
for _, stat := range fs {
opts := "rw"

@ -27,7 +27,9 @@ func PartitionsWithContext(ctx context.Context, all bool) ([]PartitionStat, erro
}
fs := make([]Statfs, count)
_, err = Getfsstat(fs, MNT_WAIT)
if _, err = Getfsstat(fs, MNT_WAIT); err != nil {
return ret, err
}
for _, stat := range fs {
opts := "rw"

Loading…
Cancel
Save