podman
1//go:build !remote
2
3package libpod
4
5import (
6"errors"
7"syscall"
8
9spec "github.com/opencontainers/runtime-spec/specs-go"
10"github.com/sirupsen/logrus"
11"golang.org/x/sys/unix"
12)
13
14// systemdSliceFromPath makes a new systemd slice under the given parent with
15// the given name.
16// The parent must be a slice. The name must NOT include ".slice"
17func systemdSliceFromPath(parent, name string, resources *spec.LinuxResources) (string, error) {
18return "", errors.New("not implemented systemdSliceFromPath")
19}
20
21// deleteSystemdCgroup deletes the systemd cgroup at the given location
22func deleteSystemdCgroup(path string, resources *spec.LinuxResources) error {
23return nil
24}
25
26// No equivalent on FreeBSD?
27func LabelVolumePath(path, mountLabel string) error {
28return nil
29}
30
31// Unmount umounts a target directory
32func Unmount(mount string) {
33if err := unix.Unmount(mount, unix.MNT_FORCE); err != nil {
34if err != syscall.EINVAL {
35logrus.Warnf("Failed to unmount %s : %v", mount, err)
36} else {
37logrus.Debugf("failed to unmount %s : %v", mount, err)
38}
39}
40}
41