Documentation
¶
Index ¶
Constants ¶
View Source
const (
Wildcard = -1
)
Variables ¶
View Source
var (
ErrNotADeviceNode = errors.New("not a device node")
)
Functions ¶
func GetDeviceNumberString ¶
Types ¶
type Device ¶
type Device struct { Type rune `json:"type,omitempty"` Path string `json:"path,omitempty"` // It is fine if this is an empty string in the case that you are using Wildcards MajorNumber int64 `json:"major_number,omitempty"` // Use the wildcard constant for wildcards. MinorNumber int64 `json:"minor_number,omitempty"` // Use the wildcard constant for wildcards. CgroupPermissions string `json:"cgroup_permissions,omitempty"` // Typically just "rwm" FileMode os.FileMode `json:"file_mode,omitempty"` // The permission bits of the file's mode Uid uint32 `json:"uid,omitempty"` Gid uint32 `json:"gid,omitempty"` }
func GetDevice ¶
Given the path to a device and it's cgroup_permissions(which cannot be easilly queried) look up the information about a linux device and return that information as a Device struct.
func GetHostDeviceNodes ¶
func (*Device) GetCgroupAllowString ¶
Click to show internal directories.
Click to hide internal directories.