github.com/skanehira/moby@v17.12.1-ce-rc2+incompatible/pkg/mount/mountinfo.go (about)

     1  package mount
     2  
     3  // Info reveals information about a particular mounted filesystem. This
     4  // struct is populated from the content in the /proc/<pid>/mountinfo file.
     5  type Info struct {
     6  	// ID is a unique identifier of the mount (may be reused after umount).
     7  	ID int
     8  
     9  	// Parent indicates the ID of the mount parent (or of self for the top of the
    10  	// mount tree).
    11  	Parent int
    12  
    13  	// Major indicates one half of the device ID which identifies the device class.
    14  	Major int
    15  
    16  	// Minor indicates one half of the device ID which identifies a specific
    17  	// instance of device.
    18  	Minor int
    19  
    20  	// Root of the mount within the filesystem.
    21  	Root string
    22  
    23  	// Mountpoint indicates the mount point relative to the process's root.
    24  	Mountpoint string
    25  
    26  	// Opts represents mount-specific options.
    27  	Opts string
    28  
    29  	// Optional represents optional fields.
    30  	Optional string
    31  
    32  	// Fstype indicates the type of filesystem, such as EXT3.
    33  	Fstype string
    34  
    35  	// Source indicates filesystem specific information or "none".
    36  	Source string
    37  
    38  	// VfsOpts represents per super block options.
    39  	VfsOpts string
    40  }
    41  
    42  type byMountpoint []*Info
    43  
    44  func (by byMountpoint) Len() int {
    45  	return len(by)
    46  }
    47  
    48  func (by byMountpoint) Less(i, j int) bool {
    49  	return by[i].Mountpoint < by[j].Mountpoint
    50  }
    51  
    52  func (by byMountpoint) Swap(i, j int) {
    53  	by[i], by[j] = by[j], by[i]
    54  }