mountinfo

package
v3.0.0-rc67 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mountinfo reads the mounts of the node, as /proc/self/mountinfo lists them: unlike /proc/mounts, it says which directory of a filesystem a mount shows, as the subvolume of a btrfs or the directory of a bind mount.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	// Root is the directory of the filesystem the mount shows.
	Root string

	// Target is the mount point.
	Target string

	FSType string

	// Source is the device mounted, or what stands for it, as the
	// dataset of a zfs.
	Source string

	// Options are the options of the mount, SuperOptions the ones of
	// the filesystem.
	Options      string
	SuperOptions string
}

Entry is one mount.

func Parse

func Parse(b []byte) []Entry

Parse reads the lines of a /proc/self/mountinfo:

36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 - ext3 /dev/root rw,errors=continue

func Read

func Read() ([]Entry, error)

Read returns the mounts of the node, in the order they were made.

Jump to

Keyboard shortcuts

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