mirror of
https://github.com/mudler/luet.git
synced 2025-09-08 10:39:19 +00:00
Update gomod and vendor
This commit is contained in:
34
vendor/github.com/moby/sys/mountinfo/mountinfo.go
generated
vendored
34
vendor/github.com/moby/sys/mountinfo/mountinfo.go
generated
vendored
@@ -1,20 +1,26 @@
|
||||
package mountinfo
|
||||
|
||||
import (
|
||||
"os"
|
||||
)
|
||||
|
||||
// GetMounts retrieves a list of mounts for the current running process,
|
||||
// with an optional filter applied (use nil for no filter).
|
||||
func GetMounts(f FilterFunc) ([]*Info, error) {
|
||||
return parseMountTable(f)
|
||||
}
|
||||
|
||||
// Mounted determines if a specified mountpoint has been mounted.
|
||||
// On Linux it looks at /proc/self/mountinfo.
|
||||
func Mounted(mountpoint string) (bool, error) {
|
||||
entries, err := GetMounts(SingleEntryFilter(mountpoint))
|
||||
if err != nil {
|
||||
return false, err
|
||||
// Mounted determines if a specified path is a mount point.
|
||||
//
|
||||
// The argument must be an absolute path, with all symlinks resolved, and clean.
|
||||
// One way to ensure it is to process the path using filepath.Abs followed by
|
||||
// filepath.EvalSymlinks before calling this function.
|
||||
func Mounted(path string) (bool, error) {
|
||||
// root is always mounted
|
||||
if path == string(os.PathSeparator) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
return len(entries) > 0, nil
|
||||
return mounted(path)
|
||||
}
|
||||
|
||||
// Info reveals information about a particular mounted filesystem. This
|
||||
@@ -40,18 +46,18 @@ type Info struct {
|
||||
// Mountpoint indicates the mount point relative to the process's root.
|
||||
Mountpoint string
|
||||
|
||||
// Opts represents mount-specific options.
|
||||
Opts string
|
||||
// Options represents mount-specific options.
|
||||
Options string
|
||||
|
||||
// Optional represents optional fields.
|
||||
Optional string
|
||||
|
||||
// Fstype indicates the type of filesystem, such as EXT3.
|
||||
Fstype string
|
||||
// FSType indicates the type of filesystem, such as EXT3.
|
||||
FSType string
|
||||
|
||||
// Source indicates filesystem specific information or "none".
|
||||
Source string
|
||||
|
||||
// VfsOpts represents per super block options.
|
||||
VfsOpts string
|
||||
// VFSOptions represents per super block options.
|
||||
VFSOptions string
|
||||
}
|
||||
|
Reference in New Issue
Block a user