podman

Форк
0
/
util_freebsd.go 
40 строк · 1.0 Кб
1
//go:build !remote
2

3
package libpod
4

5
import (
6
	"errors"
7
	"syscall"
8

9
	spec "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"
17
func systemdSliceFromPath(parent, name string, resources *spec.LinuxResources) (string, error) {
18
	return "", errors.New("not implemented systemdSliceFromPath")
19
}
20

21
// deleteSystemdCgroup deletes the systemd cgroup at the given location
22
func deleteSystemdCgroup(path string, resources *spec.LinuxResources) error {
23
	return nil
24
}
25

26
// No equivalent on FreeBSD?
27
func LabelVolumePath(path, mountLabel string) error {
28
	return nil
29
}
30

31
// Unmount umounts a target directory
32
func Unmount(mount string) {
33
	if err := unix.Unmount(mount, unix.MNT_FORCE); err != nil {
34
		if err != syscall.EINVAL {
35
			logrus.Warnf("Failed to unmount %s : %v", mount, err)
36
		} else {
37
			logrus.Debugf("failed to unmount %s : %v", mount, err)
38
		}
39
	}
40
}
41

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.