From 387f7b3a7f1f5c56e38d5a50978d3ea56814417a Mon Sep 17 00:00:00 2001 From: Rohit Jnagal Date: Wed, 3 Jun 2015 17:59:17 +0000 Subject: [PATCH] Add support for xfs. --- fs/fs.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/fs.go b/fs/fs.go index 13a4475f..00c06456 100644 --- a/fs/fs.go +++ b/fs/fs.go @@ -75,8 +75,13 @@ func NewFsInfo(context Context) (FsInfo, error) { partitions := make(map[string]partition, 0) fsInfo := &RealFsInfo{} fsInfo.labels = make(map[string]string, 0) + supportedFsType := map[string]bool{ + // all ext systems are checked through prefix. + "btrfs": true, + "xfs": true, + } for _, mount := range mounts { - if !strings.HasPrefix(mount.Fstype, "ext") && mount.Fstype != "btrfs" { + if !strings.HasPrefix(mount.Fstype, "ext") && !supportedFsType[mount.Fstype] { continue } // Avoid bind mounts.