devices

package
v1.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package devices provides some helper functions for constructing device configurations for runc. These are exclusively used by higher-level runtimes that need to configure runc's device list based on existing devices.

Deprecated: Use github.com/moby/sys/devices instead. This package will be removed in runc 1.6.

Index

Constants

This section is empty.

Variables

View Source
var ErrNotADevice = devices.ErrNotADevice

ErrNotADevice denotes that a file is not a valid linux device.

Deprecated: Use devices.ErrNotADevice instead. This package will be removed in runc 1.6.

Functions

func DeviceFromPath deprecated

func DeviceFromPath(path, permissions string) (*config.Device, error)

DeviceFromPath takes the path to a device and its cgroup_permissions (which cannot be easily queried) to look up the information about a linux device and returns that information as a Device struct.

Deprecated: Use devices.DeviceFromPath instead. This package will be removed in runc 1.6.

func GetDevices deprecated added in v1.0.0

func GetDevices(path string) ([]*config.Device, error)

GetDevices recursively traverses a directory specified by path and returns all devices found there.

Deprecated: Use devices.GetDevices instead. This package will be removed in runc 1.6.

func HostDevices deprecated

func HostDevices() ([]*config.Device, error)

HostDevices returns all devices that can be found under /dev directory.

Deprecated: Use devices.HostDevices instead. This package will be removed in runc 1.6.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL