Merge pull request #235 from alexoj/master
devices: filter /dev/console out of the node list
This commit is contained in:
commit
ac73007335
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue