mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	dependencies: update netns to v0.0.4
Signed-off-by: Humble Chirammal <humble.devassy@gmail.com>
This commit is contained in:
		
							
								
								
									
										9
									
								
								vendor/github.com/vishvananda/netns/netns_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										9
									
								
								vendor/github.com/vishvananda/netns/netns_linux.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,7 +2,6 @@ package netns
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"io/ioutil"
 | 
			
		||||
	"os"
 | 
			
		||||
	"path"
 | 
			
		||||
	"path/filepath"
 | 
			
		||||
@@ -136,7 +135,7 @@ func GetFromDocker(id string) (NsHandle, error) {
 | 
			
		||||
 | 
			
		||||
// borrowed from docker/utils/utils.go
 | 
			
		||||
func findCgroupMountpoint(cgroupType string) (int, string, error) {
 | 
			
		||||
	output, err := ioutil.ReadFile("/proc/mounts")
 | 
			
		||||
	output, err := os.ReadFile("/proc/mounts")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return -1, "", err
 | 
			
		||||
	}
 | 
			
		||||
@@ -166,7 +165,7 @@ func findCgroupMountpoint(cgroupType string) (int, string, error) {
 | 
			
		||||
// borrowed from docker/utils/utils.go
 | 
			
		||||
// modified to get the docker pid instead of using /proc/self
 | 
			
		||||
func getDockerCgroup(cgroupVer int, cgroupType string) (string, error) {
 | 
			
		||||
	dockerpid, err := ioutil.ReadFile("/var/run/docker.pid")
 | 
			
		||||
	dockerpid, err := os.ReadFile("/var/run/docker.pid")
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
@@ -178,7 +177,7 @@ func getDockerCgroup(cgroupVer int, cgroupType string) (string, error) {
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
	output, err := ioutil.ReadFile(fmt.Sprintf("/proc/%d/cgroup", pid))
 | 
			
		||||
	output, err := os.ReadFile(fmt.Sprintf("/proc/%d/cgroup", pid))
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return "", err
 | 
			
		||||
	}
 | 
			
		||||
@@ -265,7 +264,7 @@ func getPidForContainer(id string) (int, error) {
 | 
			
		||||
		return pid, fmt.Errorf("Unable to find container: %v", id[:len(id)-1])
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	output, err := ioutil.ReadFile(filename)
 | 
			
		||||
	output, err := os.ReadFile(filename)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return pid, err
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user