read disk partitions on linux from /proc/mounts intead of /etc/mtab

This commit is contained in:
Aman Gupta 2017-05-18 19:19:31 -07:00
parent b6da2bd76e
commit 5e1770d1f2
1 changed files with 1 additions and 1 deletions

View File

@ -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