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

pull/372/head
Aman Gupta 8 years ago
parent b6da2bd76e
commit 5e1770d1f2

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

Loading…
Cancel
Save