summaryrefslogtreecommitdiff
path: root/pkg/util/utils_windows.go
blob: 703e5472a6f5d9440ce7414a635b2a37e41e3cc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
//go:build windows
// +build windows

package util

import (
	"errors"
	"fmt"
	"path/filepath"

	"github.com/containers/storage/pkg/homedir"
)

var errNotImplemented = errors.New("not yet implemented")

// IsCgroup2UnifiedMode returns whether we are running in cgroup 2 unified mode.
func IsCgroup2UnifiedMode() (bool, error) {
	return false, fmt.Errorf("IsCgroup2Unified: %w", errNotImplemented)
}

// GetContainerPidInformationDescriptors returns a string slice of all supported
// format descriptors of GetContainerPidInformation.
func GetContainerPidInformationDescriptors() ([]string, error) {
	return nil, fmt.Errorf("GetContainerPidInformationDescriptors: %w", errNotImplemented)
}

// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
// the pause process
func GetRootlessPauseProcessPidPath() (string, error) {
	return "", fmt.Errorf("GetRootlessPauseProcessPidPath: %w", errNotImplemented)
}

// GetRootlessPauseProcessPidPath returns the path to the file that holds the pid for
// the pause process
func GetRootlessPauseProcessPidPathGivenDir(unused string) (string, error) {
	return "", fmt.Errorf("GetRootlessPauseProcessPidPath: %w", errNotImplemented)
}

// GetRuntimeDir returns the runtime directory
func GetRuntimeDir() (string, error) {
	data, err := homedir.GetDataHome()
	if err != nil {
		return "", err
	}
	runtimeDir := filepath.Join(data, "containers", "podman")
	return runtimeDir, nil
}

// GetRootlessConfigHomeDir returns the config home directory when running as non root
func GetRootlessConfigHomeDir() (string, error) {
	return "", errors.New("this function is not implemented for windows")
}