mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
200f56315e
Currently, libcontainer/devices contains two things: 1. Device-related configuration data structures and accompanying methods. Those are used by runc itself, mostly by libct/cgroups. 2. A few functions (HostDevices, DeviceFromPath, GetDevices). Those are not used by runc directly, but have some external users (cri-o, microsoft/hcsshim), and they also have a few forks (containerd/pkg/oci, podman/pkg/util). This commit moves (1) to a new separate package, config (under libcontainer/cgroups/devices), adding a backward-compatible aliases (marked as deprecated so we will be able to remove those later). Alas it's not possible to move this to libcontainer/cgroups directly because some IDs (Type, Rule, Permissions) are too generic, and renaming them (to DeviceType, DeviceRule, DevicePermissions) will break backward compatibility (mostly due to Rule being embedded into Device). Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>