vendor: opencontainers/runc v1.0.0-rc91-48-g67169a9d
full diff: https://github.com/opencontainers/runc/compare/v1.0.0-rc91...67169a9d43456ff0d5ae12b967acb8e366e2f181 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
		
							
								
								
									
										11
									
								
								vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/opencontainers/runc/libcontainer/devices/devices.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -37,12 +37,12 @@ func DeviceFromPath(path, permissions string) (*configs.Device, error) {
 | 
			
		||||
		major     = unix.Major(devNumber)
 | 
			
		||||
		minor     = unix.Minor(devNumber)
 | 
			
		||||
	)
 | 
			
		||||
	switch {
 | 
			
		||||
	case mode&unix.S_IFBLK == unix.S_IFBLK:
 | 
			
		||||
	switch mode & unix.S_IFMT {
 | 
			
		||||
	case unix.S_IFBLK:
 | 
			
		||||
		devType = configs.BlockDevice
 | 
			
		||||
	case mode&unix.S_IFCHR == unix.S_IFCHR:
 | 
			
		||||
	case unix.S_IFCHR:
 | 
			
		||||
		devType = configs.CharDevice
 | 
			
		||||
	case mode&unix.S_IFIFO == unix.S_IFIFO:
 | 
			
		||||
	case unix.S_IFIFO:
 | 
			
		||||
		devType = configs.FifoDevice
 | 
			
		||||
	default:
 | 
			
		||||
		return nil, ErrNotADevice
 | 
			
		||||
@@ -104,6 +104,9 @@ func GetDevices(path string) ([]*configs.Device, error) {
 | 
			
		||||
			}
 | 
			
		||||
			return nil, err
 | 
			
		||||
		}
 | 
			
		||||
		if device.Type == configs.FifoDevice {
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
		out = append(out, device)
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user