diff options
Diffstat (limited to 'libgo/go/os/stat_plan9.go')
-rw-r--r-- | libgo/go/os/stat_plan9.go | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/libgo/go/os/stat_plan9.go b/libgo/go/os/stat_plan9.go index 96f056c1117..274d0d86f34 100644 --- a/libgo/go/os/stat_plan9.go +++ b/libgo/go/os/stat_plan9.go @@ -11,12 +11,6 @@ import ( const _BIT16SZ = 2 -func sameFile(fs1, fs2 *fileStat) bool { - a := fs1.sys.(*syscall.Dir) - b := fs2.sys.(*syscall.Dir) - return a.Qid.Path == b.Qid.Path && a.Type == b.Type && a.Dev == b.Dev -} - func fileInfoFromStat(d *syscall.Dir) FileInfo { fs := &fileStat{ name: d.Name, @@ -37,6 +31,10 @@ func fileInfoFromStat(d *syscall.Dir) FileInfo { if d.Mode&syscall.DMTMP != 0 { fs.mode |= ModeTemporary } + // Consider all files not served by #M as device files. + if d.Type != 'M' { + fs.mode |= ModeDevice + } return fs } |