Merge pull request #235 from alexoj/master

devices: filter /dev/console out of the node list
This commit is contained in:
Mrunal Patel 2014-10-24 11:20:41 -07:00
commit ac73007335
1 changed files with 4 additions and 1 deletions

View File

@ -100,7 +100,8 @@ func getDeviceNodes(path string) ([]*Device, error) {
out := []*Device{} out := []*Device{}
for _, f := range files { for _, f := range files {
if f.IsDir() { switch {
case f.IsDir():
switch f.Name() { switch f.Name() {
case "pts", "shm", "fd": case "pts", "shm", "fd":
continue continue
@ -113,6 +114,8 @@ func getDeviceNodes(path string) ([]*Device, error) {
out = append(out, sub...) out = append(out, sub...)
continue continue
} }
case f.Name() == "console":
continue
} }
device, err := GetDevice(filepath.Join(path, f.Name()), "rwm") device, err := GetDevice(filepath.Join(path, f.Name()), "rwm")