Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
virtcontainers: Remove /dev from the ignored system mounts
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
amshinde committed Apr 19, 2018
1 parent 10c596a commit 70c3fe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion virtcontainers/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 2 additions & 1 deletion virtcontainers/mount_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 70c3fe9

Please sign in to comment.