mountinfo

package
v1.6.0-rc6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 16, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FilesystemType names for filesystem which are used in /proc/pid/mountinfo
	FilesystemTypeBPFFS   = "bpf"
	FilesystemTypeCgroup2 = "cgroup2"
)

Variables

This section is empty.

Functions

func IsMountFS

func IsMountFS(mntType string, mapRoot string) (bool, bool, error)

IsMountFS returns two boolean values:checks whether the current mapRoot: - whether the current mapRoot has any mount - whether that mount's filesystem is of type mntType

Types

type MountInfo

type MountInfo struct {
	MountID        int64
	ParentID       int64
	StDev          string
	Root           string
	MountPoint     string
	MountOptions   string
	OptionalFields []string
	FilesystemType string
	MountSource    string
	SuperOptions   string
}

MountInfo is a struct representing information from /proc/pid/mountinfo. More information about file syntax: https://www.kernel.org/doc/Documentation/filesystems/proc.txt

func GetMountInfo

func GetMountInfo() ([]*MountInfo, error)

GetMountInfo returns a slice of *MountInfo with information parsed from /proc/self/mountinfo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL