Support adding devices by dir

This enables cases where devices exist in a subdirectory of /dev,
particularly where those device names are not portable across machines,
which makes it problematic to specify from a runtime such as cri.

Added this to `ctr` as well so I could test that the code at least
works.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
Brian Goff
2020-12-15 01:28:34 +00:00
parent a1138182d5
commit 7776e5ef2a
8 changed files with 217 additions and 45 deletions

View File

@@ -153,7 +153,7 @@ var (
},
cli.StringSliceFlag{
Name: "device",
Usage: "add a device to a container",
Usage: "file path to a device to add to the container; or a path to a directory tree of devices to add to the container",
},
cli.BoolFlag{
Name: "seccomp",