@@ -21,8 +21,7 @@ import (
2121 "os"
2222 "strings"
2323
24- "github.com/prometheus/procfs/btrfs"
25- "github.com/prometheus/procfs/internal/fs"
24+ filesystem "github.com/prometheus/procfs/internal/fs"
2625 "github.com/prometheus/procfs/internal/util"
2726)
2827
@@ -216,30 +215,30 @@ const (
216215// FS represents the pseudo-filesystems proc and sys, which provides an
217216// interface to kernel data structures.
218217type FS struct {
219- proc * fs .FS
220- sys * fs .FS
218+ proc * filesystem .FS
219+ sys * filesystem .FS
221220}
222221
223222// NewDefaultFS returns a new blockdevice fs using the default mountPoints for proc and sys.
224223// It will error if either of these mount points can't be read.
225224func NewDefaultFS () (FS , error ) {
226- return NewFS (fs .DefaultProcMountPoint , fs .DefaultSysMountPoint )
225+ return NewFS (filesystem .DefaultProcMountPoint , filesystem .DefaultSysMountPoint )
227226}
228227
229228// NewFS returns a new blockdevice fs using the given mountPoints for proc and sys.
230229// It will error if either of these mount points can't be read.
231230func NewFS (procMountPoint string , sysMountPoint string ) (FS , error ) {
232231 if strings .TrimSpace (procMountPoint ) == "" {
233- procMountPoint = fs .DefaultProcMountPoint
232+ procMountPoint = filesystem .DefaultProcMountPoint
234233 }
235- procfs , err := fs .NewFS (procMountPoint )
234+ procfs , err := filesystem .NewFS (procMountPoint )
236235 if err != nil {
237236 return FS {}, err
238237 }
239238 if strings .TrimSpace (sysMountPoint ) == "" {
240- sysMountPoint = fs .DefaultSysMountPoint
239+ sysMountPoint = filesystem .DefaultSysMountPoint
241240 }
242- sysfs , err := fs .NewFS (sysMountPoint )
241+ sysfs , err := filesystem .NewFS (sysMountPoint )
243242 if err != nil {
244243 return FS {}, err
245244 }
@@ -484,5 +483,5 @@ func (fs FS) SysBlockDeviceSize(device string) (uint64, error) {
484483 if err != nil {
485484 return 0 , err
486485 }
487- return btrfs .SectorSize * size , nil
486+ return filesystem .SectorSize * size , nil
488487}
0 commit comments