Skip to content

Commit

Permalink
read disk partitions on linux from /proc/mounts intead of /etc/mtab
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed May 19, 2017
1 parent b6da2bd commit 5e1770d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion disk/disk_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ var fsTypeMap = map[int64]string{
//
// should use setmntent(3) but this implement use /etc/mtab file
func Partitions(all bool) ([]PartitionStat, error) {
filename := common.HostEtc("mtab")
filename := common.HostProc("mounts")
lines, err := common.ReadLines(filename)
if err != nil {
return nil, err
Expand Down

0 comments on commit 5e1770d

Please sign in to comment.