mirror of
				https://github.com/containers/podman.git
				synced 2025-10-31 18:08:51 +08:00 
			
		
		
		
	Bump github.com/containers/common from 0.6.1 to 0.8.0
Bumps [github.com/containers/common](https://github.com/containers/common) from 0.6.1 to 0.8.0. - [Release notes](https://github.com/containers/common/releases) - [Commits](https://github.com/containers/common/compare/v0.6.1...v0.8.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
		![27856297+dependabot-preview[bot]@users.noreply.github.com](/assets/img/avatar_default.png) dependabot-preview[bot]
					dependabot-preview[bot]
				
			
				
					committed by
					
						 Daniel J Walsh
						Daniel J Walsh
					
				
			
			
				
	
			
			
			 Daniel J Walsh
						Daniel J Walsh
					
				
			
						parent
						
							ccb9e579c4
						
					
				
				
					commit
					eb86bfc344
				
			
							
								
								
									
										27
									
								
								vendor/github.com/containers/common/pkg/cgroupv2/cgroups_linux.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								vendor/github.com/containers/common/pkg/cgroupv2/cgroups_linux.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,27 @@ | ||||
| package cgroupv2 | ||||
|  | ||||
| import ( | ||||
| 	"sync" | ||||
| 	"syscall" | ||||
|  | ||||
| 	"golang.org/x/sys/unix" | ||||
| ) | ||||
|  | ||||
| var ( | ||||
| 	isCgroupV2Once sync.Once | ||||
| 	isCgroupV2     bool | ||||
| 	isCgroupV2Err  error | ||||
| ) | ||||
|  | ||||
| // Enabled returns whether we are running in cgroup 2 cgroup2 mode. | ||||
| func Enabled() (bool, error) { | ||||
| 	isCgroupV2Once.Do(func() { | ||||
| 		var st syscall.Statfs_t | ||||
| 		if err := syscall.Statfs("/sys/fs/cgroup", &st); err != nil { | ||||
| 			isCgroupV2, isCgroupV2Err = false, err | ||||
| 		} else { | ||||
| 			isCgroupV2, isCgroupV2Err = st.Type == unix.CGROUP2_SUPER_MAGIC, nil | ||||
| 		} | ||||
| 	}) | ||||
| 	return isCgroupV2, isCgroupV2Err | ||||
| } | ||||
		Reference in New Issue
	
	Block a user