mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
POSIX: differentiate device and char device
This commit is contained in:
parent
d400a11832
commit
de27058d0b
|
@ -52,7 +52,11 @@ func (fp FullPath) AsInode(fileMode os.FileMode) uint64 {
|
||||||
} else if fileMode&os.ModeSymlink > 0 {
|
} else if fileMode&os.ModeSymlink > 0 {
|
||||||
inode += 2
|
inode += 2
|
||||||
} else if fileMode&os.ModeDevice > 0 {
|
} else if fileMode&os.ModeDevice > 0 {
|
||||||
|
if fileMode&os.ModeCharDevice > 0 {
|
||||||
|
inode += 6
|
||||||
|
} else {
|
||||||
inode += 3
|
inode += 3
|
||||||
|
}
|
||||||
} else if fileMode&os.ModeNamedPipe > 0 {
|
} else if fileMode&os.ModeNamedPipe > 0 {
|
||||||
inode += 4
|
inode += 4
|
||||||
} else if fileMode&os.ModeSocket > 0 {
|
} else if fileMode&os.ModeSocket > 0 {
|
||||||
|
|
Loading…
Reference in a new issue