mirror of
https://github.com/containers/podman.git
synced 2025-07-15 03:02:52 +08:00
fix lint in pkg/rootless
Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
This commit is contained in:
@ -7,6 +7,9 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// TryJoinPauseProcess attempts to join the namespaces of the pause PID via
|
||||
// TryJoinFromFilePaths. If joining fails, it attempts to delete the specified
|
||||
// file.
|
||||
func TryJoinPauseProcess(pausePidPath string) (bool, int, error) {
|
||||
if _, err := os.Stat(pausePidPath); err != nil {
|
||||
return false, -1, nil
|
||||
|
@ -514,6 +514,8 @@ func TryJoinFromFilePaths(pausePidPath string, needNewNamespace bool, paths []st
|
||||
|
||||
return joinUserAndMountNS(uint(pausePid), pausePidPath)
|
||||
}
|
||||
|
||||
// ReadMappingsProc parses and returns the ID mappings at the specified path.
|
||||
func ReadMappingsProc(path string) ([]idtools.IDMap, error) {
|
||||
file, err := os.Open(path)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user