summaryrefslogtreecommitdiff
path: root/libgo/go/os/stat_openbsd.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/os/stat_openbsd.go')
-rw-r--r--libgo/go/os/stat_openbsd.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/libgo/go/os/stat_openbsd.go b/libgo/go/os/stat_openbsd.go
index 66189a6b9ba..b0a569e24cd 100644
--- a/libgo/go/os/stat_openbsd.go
+++ b/libgo/go/os/stat_openbsd.go
@@ -24,8 +24,10 @@ func fileInfoFromStat(st *syscall.Stat_t, name string) FileInfo {
}
fs.mode = FileMode(st.Mode & 0777)
switch st.Mode & syscall.S_IFMT {
- case syscall.S_IFBLK, syscall.S_IFCHR:
+ case syscall.S_IFBLK:
fs.mode |= ModeDevice
+ case syscall.S_IFCHR:
+ fs.mode |= ModeDevice | ModeCharDevice
case syscall.S_IFDIR:
fs.mode |= ModeDir
case syscall.S_IFIFO: