sys

package
v1.4.4-0...-e7ddffe Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindMount

func BindMount(source, target, fsType string, recursive, readOnly bool, superBlockFlags string) error

BindMount does bind-mount of source to target.

func GetDeviceByFSUUID

func GetDeviceByFSUUID(fsuuid string) (device string, err error)

GetDeviceByFSUUID get device name by it's FSUUID.

func GetMounts

func GetMounts(includeMajorMinorMap bool) (mountPointMap, deviceMap, majorMinorMap, rootMountPointMap map[string]utils.StringSet, err error)

GetMounts returns mount-point to devices and devices to mount-point maps.

func Mkdir

func Mkdir(name string, perm os.FileMode) (err error)

Mkdir is a util to mkdir with some special error handling

func Mount

func Mount(device, target, fsType string, flags []string, superBlockFlags string) error

Mount mounts device to target using fsType, flags and superBlockFlags.

func Unmount

func Unmount(target string, force, detach, expire bool) error

Unmount unmounts target with force, detach and expire options.

Types

type ErrMountPointAlreadyMounted

type ErrMountPointAlreadyMounted struct {
	MountPoint string
	Devices    []string
}

ErrMountPointAlreadyMounted denotes mount point already mounted error.

func (*ErrMountPointAlreadyMounted) Error

Error is error interface compatible method.

Jump to

Keyboard shortcuts

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