virtcontainers: Remove /dev from the ignored system mounts

Since we want to handle certain files in /dev for k8s case,
remove /dev from the mounts list that we ignore.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde
2018-04-17 11:51:28 -07:00
parent 10c596a4ff
commit 70c3fe9dcd
2 changed files with 3 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ import (
var rootfsDir = "rootfs"
var systemMountPrefixes = []string{"/proc", "/dev", "/sys"}
var systemMountPrefixes = []string{"/proc", "/sys"}
func isSystemMount(m string) bool {
for _, p := range systemMountPrefixes {

View File

@@ -31,7 +31,8 @@ func TestIsSystemMount(t *testing.T) {
{"/sys/fs/cgroup", true},
{"/sysfoo", false},
{"/home", false},
{"/dev/block/", true},
{"/dev/block/", false},
{"/mnt/dev/foo", false},
}
for _, test := range tests {