pkg/util: Add pid information descriptors for FreeBSD

[NO NEW TESTS NEEDED]

Signed-off-by: Doug Rabson <dfr@rabson.org>
This commit is contained in:
Doug Rabson 2022-10-05 17:30:08 +01:00
parent 80a6017e2e
commit b82b27cc48
1 changed files with 19 additions and 3 deletions

View File

@ -4,13 +4,29 @@
package util package util
import ( import (
"errors"
"github.com/opencontainers/runtime-tools/generate" "github.com/opencontainers/runtime-tools/generate"
) )
func GetContainerPidInformationDescriptors() ([]string, error) { func GetContainerPidInformationDescriptors() ([]string, error) {
return []string{}, errors.New("this function is not supported on freebsd") // These are chosen to match the set of AIX format descriptors
// supported in Linux - FreeBSD ps does support (many) others.
return []string{
"args",
"comm",
"etime",
"group",
"nice",
"pcpu",
"pgid",
"pid",
"ppid",
"rgroup",
"ruser",
"time",
"tty",
"user",
"vsz",
}, nil
} }
func AddPrivilegedDevices(g *generate.Generator, systemdMode bool) error { func AddPrivilegedDevices(g *generate.Generator, systemdMode bool) error {