From a9852aa8fff6b202512140b14d80e6a2e38a795d Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Tue, 8 Nov 2022 12:05:45 +0000 Subject: [PATCH] utils: Enable cgroup utils for FreeBSD This probably makes sense when using podman-remote and it lets the unit tests pass which makes 'make localunit' happy. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- utils/utils_freebsd.go | 22 ---------------------- utils/utils_supported.go | 4 ++-- utils/utils_test.go | 4 ++-- 3 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 utils/utils_freebsd.go diff --git a/utils/utils_freebsd.go b/utils/utils_freebsd.go deleted file mode 100644 index d239e9a5de..0000000000 --- a/utils/utils_freebsd.go +++ /dev/null @@ -1,22 +0,0 @@ -//go:build freebsd -// +build freebsd - -package utils - -import "errors" - -func RunUnderSystemdScope(pid int, slice string, unitName string) error { - return errors.New("not implemented for freebsd") -} - -func MoveUnderCgroupSubtree(subtree string) error { - return errors.New("not implemented for freebsd") -} - -func GetOwnCgroup() (string, error) { - return "", errors.New("not implemented for freebsd") -} - -func GetCgroupProcess(pid int) (string, error) { - return "", errors.New("not implemented for freebsd") -} diff --git a/utils/utils_supported.go b/utils/utils_supported.go index 8844d46fde..418c1f871a 100644 --- a/utils/utils_supported.go +++ b/utils/utils_supported.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package utils diff --git a/utils/utils_test.go b/utils/utils_test.go index f34dbdd7e3..180038afc6 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -1,5 +1,5 @@ -//go:build linux || darwin -// +build linux darwin +//go:build linux || darwin || freebsd +// +build linux darwin freebsd package utils