Commit 6bca9f21 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

nodefs: document ToErrno, NewListDirStream

parent f9e18c2b
...@@ -13,6 +13,7 @@ import ( ...@@ -13,6 +13,7 @@ import (
// OK is the Errno return value to indicate absense of errors. // OK is the Errno return value to indicate absense of errors.
var OK = syscall.Errno(0) var OK = syscall.Errno(0)
// ToErrno exhumes the syscall.Errno error from wrapped error values.
func ToErrno(err error) syscall.Errno { func ToErrno(err error) syscall.Errno {
s := fuse.ToStatus(err) s := fuse.ToStatus(err)
return syscall.Errno(s) return syscall.Errno(s)
......
...@@ -28,6 +28,7 @@ func (a *dirArray) Close() { ...@@ -28,6 +28,7 @@ func (a *dirArray) Close() {
} }
// NewListDirStream wraps a slice of DirEntry as a DirStream.
func NewListDirStream(list []fuse.DirEntry) DirStream { func NewListDirStream(list []fuse.DirEntry) DirStream {
return &dirArray{list} return &dirArray{list}
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment